GATE 2021 (Session 2)
64 questions
MCQ 33 · MSQ 13 · NAT 181-mark 29 · 2-mark 35
Questions 26–30 of 64
Consider the following deterministic finite automaton (DFA)
The number of strings of length 8 accepted by the above automaton is _________
The number of strings of length 8 accepted by the above automaton is _________
Answer: 256
Each path from the start state gets to the final state after exactly 3 symbols (start level 1 level 2 final, taking either symbol at each step). The final state then stays put on both 0 and 1.
So any string of length is accepted. The number of strings of length 8 is .
Answer: 256
So any string of length is accepted. The number of strings of length 8 is .
Answer: 256
If and are two decimal digits and , the decimal value of is ___________
Answer: 3
Convert the binary fraction to decimal:
So 0.8xy5 = 0.8125 x = 1, y = 2 Sum of digits: x + y = 3
Answer: 3
So 0.8xy5 = 0.8125 x = 1, y = 2 Sum of digits: x + y = 3
Answer: 3
Consider a set-associative cache of size 2KB ( bytes) with cache block size of 64 bytes. Assume that the cache is byte-addressable and a 32 -bit address is used for accessing the cache. If the width of the tag field is 22 bits, the associativity of the cache is ______
Answer: 2
Block offset = bits. The tag has 22 bits the set index is 32 22 6 = 4 bits so there are 16 sets.
Number of lines = 2 KB / 64 B = 32. Associativity = 32 / 16 = 2.
Answer: 2
Number of lines = 2 KB / 64 B = 32. Associativity = 32 / 16 = 2.
Answer: 2
Consider a computer system with DMA support. The DMA module is transferring one 8-bit character in one CPU cycle from a device to memory through cycle stealing at regular intervals. Consider a 2 MHz processor. If 0.5% processor cycles are used for DMA, the data transfer rate of the device is __________ bits per second.
Answer: 80000
DMA cycles in one second = 0.5% of , which gives .
Every cycle transfers 8 bits the rate is bits/s.
Answer: 80000
Every cycle transfers 8 bits the rate is bits/s.
Answer: 80000
A data file consisting of 1,50,000 student-records is stored on a hard disk with block size of 4096 bytes. The data file is sorted on the primary key RollNo. The size of a record pointer for this disk is 7 bytes. Each student-record has a candidate key attribute called ANum of size 12 bytes. Suppose an index file with records consisting of two fields, ANum value and the record pointer the corresponding student record, is built and stored on the same disk. Assume that the records of data file and index file are not split across disk blocks. The number of blocks in the index file is ______
Answer: 698
The file is not sorted on ANum, so the index has to be dense. This means it has one entry for every record.
Size of one entry = 12 + 7 = 19 bytes Entries that fit in one block = .
Number of blocks needed =
Answer: 698
Size of one entry = 12 + 7 = 19 bytes Entries that fit in one block = .
Number of blocks needed =
Answer: 698