Question: Please explain why Suppose a single-core system is running two threads A and B. Each of these threads alternates between using the processor for a

 Please explain why Suppose a single-core system is running two threadsA and B. Each of these threads alternates between using the processorfor a certain number of time units and waiting for some I/O Please explain why

Suppose a single-core system is running two threads A and B. Each of these threads alternates between using the processor for a certain number of time units and waiting for some I/O operation to complete. While waiting for an I/O operation, threads do not require the processor. Initially, threads A and B are both waiting for an I/O operation to complete. For this question, assume overheads, such as from context switching, are negligible Thread A does the following in this order: becomes runnable (because an I/O operation completes) at time 1 uses 4 time units of CPU time waits until time 10 for an input to become available uses 4 time units of CPU time terminates . Thread B does the following in this order: becomes runnable at time 2 uses 2 time units of CPU time waits 2 time units for an I/O operation to complete uses 2 time units of CPU time waits 2 time units for an I/O operation to complete uses 2 time units of CPU time terminates . . If the system runs thread A and B using a first-come, first-served (FCFS) scheduling policy, then thread A will terminate at time If the system runs thread A and B using a first-come, first-served (FCFS) scheduling policy, then thread B will terminate at time

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!