Exams › GATE › Technical › Computer Science and Information Technology Set 2 (CS2)
7 questions with worked solutions.
Answer: 25,60,000
The DMA controller transfers 8 bytes per cycle, and with a 4 MHz processor, it has 4 million cycles per second. Since only 1% of the cycles are used for DMA, the effective cycles for data transfer are 40,000 per second. Thus, the total data transferred per second is 40,000 cycles multiplied by 8 bytes, which equals 320,000 bytes or 2,560,000 bits.
Answer: q → ¬ p
The statement indicates that if a student scores more than 50% marks (q), then a fail grade cannot be given (¬p). This is correctly represented by the implication q → ¬p, meaning that a high score guarantees that a fail grade is not possible.
Answer: SRTF = 6, N-P-SJF = 7.5
The correct option indicates that under the preemptive SRTF scheduling, the average waiting time is minimized to 6 because processes are executed based on their remaining burst time, allowing shorter jobs to interrupt longer ones. In contrast, the non-preemptive SJF scheduling results in an average waiting time of 7.5, as processes are executed in the order of their burst times without preemption, leading to longer waiting times for some processes.
Answer: 10.1.2.0/24
The CIDR prefix 10.1.2.0/24 encompasses all IP addresses from 10.1.2.0 to 10.1.2.255, which includes the range specified in the question. This prefix allows for 256 addresses, making it the exact match for the given range.
Answer: Inorder traversal of T can be determined from V
The inorder traversal of a binary search tree always results in the values being sorted in ascending order. Since the set V consists of distinct integers, the inorder traversal can be directly derived from the sorted version of V, regardless of the insertion order.
Answer: (1) S → AaAb (2) S → BbBa (3) A → ε (4) B → ε
The correct option is right because it accurately fills the LL(1) parsing table based on the productions of the grammar. For the non-terminal S, the first production is chosen for 'a' and the second for 'b', while A can derive ε for 'a' and B can also derive ε for 'b', aligning with the grammar's rules.
Answer: 1; len1+1
The correct expressions are '1' for (P) because it resets the count of the new distinct integer, and 'len1+1' for (Q) because it adds the length of the previous longest subarray of the first distinct integer to the current count, effectively extending the subarray to include the new distinct integer.