GATE 2020
64 questions
MCQ 41 · NAT 231-mark 29 · 2-mark 35
Questions 61–64 of 64
Graph G is obtained by adding vertex s to and making s adjacent to every vertex of . The minimum number of colours required to edge-colour G is _______
Answer: 7
Let the sides of be and . The vertex is adjacent to all 7 of them, so . The 7 edges at must get different colours, so at least 7 colours are needed.
7 colours are enough:
- Colour edge with colour . At each the colours 1 to 4 all appear once. At each the three edges get different colours, and the colour is missing.
- Give the three edges the colours 5, 6, 7.
- Give edge the colour missing at . These 4 colours are different for different .
Now the 7 edges at have 7 different colours, each sees 1 to 4 and one of 5 to 7, and each sees all of 1 to 4. So this is a proper edge colouring with 7 colours.
Answer: 7
7 colours are enough:
- Colour edge with colour . At each the colours 1 to 4 all appear once. At each the three edges get different colours, and the colour is missing.
- Give the three edges the colours 5, 6, 7.
- Give edge the colour missing at . These 4 colours are different for different .
Now the 7 edges at have 7 different colours, each sees 1 to 4 and one of 5 to 7, and each sees all of 1 to 4. So this is a proper edge colouring with 7 colours.
Answer: 7
Consider a paging system that uses 1-level page table residing in main memory and a TLB for address translation. Each main memory access takes 100 ns and TLB lookup takes 20 ns. Each page transfer to/from the disk takes 5000 ns. Assume that the TLB hit ratio is 95%, page fault rate is 10%. Assume that for 20% of the total page faults, a dirty page has to be written back to disk before the required page is read from disk. TLB update time is negligible. The average memory access time in ns (round off to 1 decimal places) is ___________
Answer: 154.5 to 155.5
The TLB lookup of 20 ns is always done.
- TLB hit (0.95): one memory access, 100 ns
- TLB miss (0.05): page table access of 100 ns, then
no fault (0.9): 100 ns
fault (0.1): page read 5000 ns, plus dirty write-back (20%) 0.2 5000, plus access 100 = 6100 ns
ns
Answer: 155
- TLB hit (0.95): one memory access, 100 ns
- TLB miss (0.05): page table access of 100 ns, then
no fault (0.9): 100 ns
fault (0.1): page read 5000 ns, plus dirty write-back (20%) 0.2 5000, plus access 100 = 6100 ns
ns
Answer: 155
Consider a database implemented using B+ tree for file indexing and installed on a disk drive with block size of 4 KB. The size of search key is 12 bytes and the size of tree/disk pointer is 8 bytes. Assume that the database has one million records. Also assume that no node of the B+ tree and no records are present initially in main memory. Consider that each record fits into one disk block. The minimum number of disk accesses required to retrieve any record in the database is _______
Answer: 4
Let us check each part:
- Order p of an internal node: .
- Each leaf holds this many keys: .
For records, the number of leaves is . The next level up has nodes. After that comes 1 root. So the tree has 3 levels.
Disk accesses = 3 (tree levels) + 1 (record block) = 4
Answer: 4
- Order p of an internal node: .
- Each leaf holds this many keys: .
For records, the number of leaves is . The next level up has nodes. After that comes 1 root. So the tree has 3 levels.
Disk accesses = 3 (tree levels) + 1 (record block) = 4
Answer: 4
Consider a TCP connection between a client and a server with the following specifications; the round trip time is 6 ms, the size of the receiver advertised window is 50 KB, slow-start threshold at the client is 32 KB, and the maximum segment size is 2 KB. The connection is established at time t=0. Assume that there are no timeouts and errors during transmission. Then the size of the congestion window (in KB) at time t+60 ms after all acknowledgements are processed is _______
Answer: 44
At the start, cwnd is 1 MSS = 2 KB. In slow start it doubles after every RTT (6 ms) until it reaches ssthresh = 32 KB. After that, it grows by 1 MSS = 2 KB in each RTT:
- t = 0: 2, 6: 4, 12: 8, 18: 16, 24: 32 (threshold reached)
- 30: 34, 36: 36, 42: 38, 48: 40, 54: 42, 60: 44
The value 44 KB stays under the 50 KB receiver window.
Answer: 44
- t = 0: 2, 6: 4, 12: 8, 18: 16, 24: 32 (threshold reached)
- 30: 34, 36: 36, 42: 38, 48: 40, 54: 42, 60: 44
The value 44 KB stays under the 50 KB receiver window.
Answer: 44