✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Suppose 2 programs -- A and B -- with service times 156 time units and 168 time units respectively, are executing on a system with a single CPU. The programs make no I/O requests. Using a Round Robin policy with a time slice of 12 time units, the OS schedules the programs to run on the CPU -- program A runs first, then program B, then back to A, and so on. The OS uses timer interrupts to reassign the CPU from one program to another.
Assume 1) no other program/OS activity consumes CPU cycles, 2) both programs will consume their service times and successfully terminate, and 3) no interrupts occur before the CPU executes the first instruction from program A.
Based only on the information given, how many mode switches due to interrupts have occurred by the time program A has spent 155 time units running on the CPU?
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!