Question

In: Computer Science

Assume that at time 3 no system resources are being used except for the processor and...

  1. Assume that at time 3 no system resources are being used except for the processor and memory. Now consider the following events:
  • At time 2: P0 is ready.
  • At time 4: P0 is selected by CPU scheduler  
  • At time 8: P0 executes a command to read from disk 0.
  • At time 16: An interrupt occurs from disk unit 0: P0's read is complete.

For each time 2, 4, 8 and 16, identify which state process is in. If a process is blocked, further identify the event on which is it blocked.

in Operating System

Solutions

Expert Solution

At time 2: P0 is ready.

Above statement means that P0 is newly created process which is in READY state.In Ready state,system is in main memory.

At time 4: P0 is selected by CPU scheduler  

Above statement means that P0 is being scheduled by CPU scheduler.now,if we ignore context switching time then as soon as process is scheduled it starts its execution in processor.so,At time 4 , P0 is in RUN state.In RUN state,process P0 is residing in Processor.if system is uniprocessor then there will be only one process at a time in RUN state.

At time 8: P0 executes a command to read from disk 0

From above we can conclude then from time= 4 to time = 8 process P0 was executing in processor.however,at time = 4,P0 needs to read a disk 0.so,due to this , process moves from RUN to BLOCK state.In Block state,process reside in main memory. P0 was blocked when P0 executes a command to read from disk 0(required event)

At time 16: An interrupt occurs from disk unit 0: P0's read is complete.

From above statement,we can conclude that from time = 8 to time = 16,process P0 was in BLOCK state executing a read operation on disk.At time = 16,its I/O is complete so disk will generate interrupt indicating completion of its I/O.assuming,there is no delay in responding interrupt,process P0 moves to READY state.since,it is in READY state,process P0 is residing in main memory.


Related Solutions

Assume that at time 5 no system resources are being used except for the processor and...
Assume that at time 5 no system resources are being used except for the processor and memory. Now consider the following events: At time 5: P1 executes a command to read from disk unit 1. At time 15: P2's time slice expires. At time 18: P4 executes a command to write to disk unit 1 At time 20: P3 executes a command to read from disk unit 2. At time 24: P2 executes a command to write to disk unit...
Commodity pricing contracts are being used for managing risk in long term producer-processor contracting relationships. Analyze...
Commodity pricing contracts are being used for managing risk in long term producer-processor contracting relationships. Analyze challenges of using long-term supply contracts. (10marks)
How is Management Information System is being used in industry
How is Management Information System is being used in industry
Assume you have the following jobs to execute with one processor: i t(pi) Arrival Time 0...
Assume you have the following jobs to execute with one processor: i t(pi) Arrival Time 0 75 0 1 40 10 2 25 10 3 20 80 4 45 85 Using the table, assume the context switch time is five time units with RR scheduling. Create a Gantt chart illustrating the execution of these processes. What is the turnaround time for process p3? What is the average wait time for the processes?
Answer the following questions about cache coherency protocols in a dual-processor system. a) If each processor...
Answer the following questions about cache coherency protocols in a dual-processor system. a) If each processor has a separate cache, what is the main advantage of the 4-state MESI snoopy cache coherency protocol compared to a snoopy cache coherency protocol that uses only 3 states M, S and I (modified, shared and invalid)? b) Suppose that processor P1 (in a dual-processor system) writes to a memory block. A copy of this same memory block is already in a modified line...
Write on how 3D printers are being used in the health system
Write on how 3D printers are being used in the health system
Assume that the prices of resources used to produce automobiles increases. What does the supply and...
Assume that the prices of resources used to produce automobiles increases. What does the supply and demand model predict will happen as a result in the market for automobiles? Question 4 options: A) Equilibrium price and quantity decrease. B) Equilibrium price increases, and equilibrium quantity decreases. C) Equilibrium price and quantity increase. D) Equilibrium price decreases, and equilibrium quantity increases.
The implication of resources being mobile domestically is that:
The implication of resources being mobile domestically is that:A) there is often unemployment.B) capital and land are often not suited for use in other industries.C) labor is paid the same wage and capital receives the same rental price in all domestic industries.D) they lose the chance to become guest workers in other nations.
Go Huskies is considering replacing a point-of-sale system that is currently being used. The old system...
Go Huskies is considering replacing a point-of-sale system that is currently being used. The old system is fully depreciated but can be used for another 4 years, at which time it would have no salvage value. Go Huskies can sell the old system for $55,000 on the date that the new system is purchased. Go Huskies has an effective tax rate of 30%, so the gain on the sale of the old system will be fully taxable. If the purchase...
Go Huskies is considering replacing a point-of-sale system that is currently being used. The old system...
Go Huskies is considering replacing a point-of-sale system that is currently being used. The old system is fully depreciated but can be used for another 4 years, at which time it would have no salvage value. Go Huskies can sell the old system for $55,000 on the date that the new system is purchased. Go Huskies has an effective tax rate of 30%, so the gain on the sale of the old system will be fully taxable. If the purchase...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT