CS FundamentalsHardGATE CS · Advanced
Five processes (arrival time, CPU burst) are: P1 (1, 8), P2 (4, 1), P3 (0, 3), P4 (7, 6), P5 (5, 1). With preemptive shortest-remaining-time-first scheduling (ties go to the earlier arrival, then the lower process number), what is the average waiting time, where waiting time is turnaround minus burst?
- A. 8.2
- B. 4.4
- C. 3.0
- D. 2.0
Correct answer: D. 2.0
Simulate unit by unit, always running the ready process with least remaining time; waiting time = completion - arrival - burst. The non-preemptive SJF average is 4.4.
More Operating Systems questions
- The Banker's algorithm is applied to 5 processes P0-P4 and 3 resource types with Available = (1, 1, 3). P0: Allocation (1, 2, 1), Max (1…
- A system with 3 resource types has Available = (0, 0, 1) and 7 processes P0-P6. P0: Allocation (1, 1, 1), Request (1, 0, 0); P1…
- A disk has cylinders 0-199. The head is at cylinder 96 and is moving towards higher numbers; the pending requests are for cylinders 21…
- A file system uses 2 KB blocks and 4-byte block pointers. Each inode has 12 direct pointers plus one single-, one double- and one…
- A 32-bit machine uses two-level paging with 4 KB pages and 4-byte entries (10 bits for the top level, 10 for the second level, 12 for the…
- A paged system has a 10 ns TLB lookup and 100 ns per memory access, with a 95% TLB hit ratio. A TLB miss costs a two-level page-table…