GATE 2006 Computer Science and Information Technology (CS) Questions with Solutions

GATE 2006

191 questions

MCQ 1911-mark 191

Questions 151–155 of 191

Q151CPU Scheduling1 markMCQ−0.33 if wrong
The arrival time, priority, and duration of the CPU and I/O bursts for each of three processes P1,P2P_1, P_2 and P3P_3 are given in the table below. Each process has a CPU burst followed by an I/O burst followed by another CPU burst. Assume that each process has its own I/O resource.
ProcessArrivalPriorityBurst durationBurst durationBurst duration) Time(CPU)(I/O)(CPU) P102153P223 (lowest)331P331 (highest)231\begin{array}{|c|c|c|c|c|c|} \hline \textbf{Process} & \textbf{Arrival} & \textbf{Priority}& \textbf{Burst duration} & \textbf{Burst duration} & \textbf{Burst duration) }\\& \textbf{Time} & & \textbf{(CPU)} & \textbf{(I/O)} & \textbf{(CPU) } \\\hline \text{$P_1$} & 0 & 2 & 1 & 5 &3 \\\hline \text{$P_2$} & 2 & \text{3 (lowest)}& 3 & 3 & 1 \\\hline \text{$P_3$} & 3 & \text{1 (highest)}& 2 & 3 & 1 \\\hline \end{array}
The multi-programmed operating system uses preemptive priority scheduling. What are the finish times of the processes P1,P2P_1, P_2 and P3P_3?

Q152CPU Scheduling1 markMCQ−0.33 if wrong
Consider three processes, all arriving at time zero, with total execution time of 10, 20 and 30 units, respectively. Each process spends the first 20% of execution time doing I/O, the next 70% of time doing computation, and the last 10% of time doing I/O again. The operating system uses a shortest remaining compute time first scheduling algorithm and schedules a new process either when the running process get blocked on I/O or when the running process finishes its compute burst. Assume that all I/O operations can be overlapped as much as possible. For what percentage of time does the CPU remain idle?

Q153CPU Scheduling1 markMCQ−0.33 if wrong
Consider three processes (process id 0,1,2, respectively) with compute time bursts 2,4, and 8 time units. All processes arrive at time zero. Consider the longest remaining time first (LRTF) scheduling algorithm. In LRTF ties are broken by giving priority to the process with the lowest process id . The average turn around time is

Q154CPU Scheduling1 markMCQ−0.33 if wrong
Consider three CPU-intensive processes, which require 10,20 and 30 time units and arrive at times 0,2, and 6, respectively. How many context switches are needed if the operating system implements a shortes remaining time first scheduling algorithm? Do not count the context switches at time zero and at the end

Q155Memory Management1 markMCQ−0.33 if wrong
For each of the four processes P1,P2,P3,P_1, P_2, P_3, and P4P_4. The total size in kilobytes (KB) and the number of segments are given below.
ProcessTotal size (in KB)Number of segmentsP11954P22545P3453P43648\begin{array}{|c|c|c|}\hline \textbf{Process} & \textbf{Total size (in KB)} & \textbf{Number of segments} \\\hline \text{$P_1$} & \text{195}& \text{4}\\\hline \text{$P_2$} & \text{254} & \text{5}\\\hline \text{$P_3$} & \text{45}& \text{3} \\\hline \text{$P_4$} & \text{364}& \text{8} \\\hline \end{array}
The page size is 1 KB. The size of an entry in the page table is 4 bytes. The size of an entry in the segment table is 8 bytes. The maximum size of a segment is 256 KB. The paging method for memory management uses two-level paging, and its storage overhead is P. The storage overhead for the segmentation method is S. The storage overhead for the segmentation and paging method is T. What is the relation among the overheads for the different methods of memory management in the concurrent execution of the above four processes?