Question

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

  1. Assume that at time 5 no system resources are being used except for the processor and memory and every process (1,3) is either in ready queue (ready to run) or at CPU. Now consider the following events: (Hints: if a process executes something, it is on CPU at the point, if a process going to do IO or create a process, it needs to give out CPU immediately, if a process is time-out, an event will occur and listed here.)

At time 5: P1 executes a command to read from disk unit 3.

At time 20: P3 executes a command to read from disk unit 2.

At time 33: An interrupt occurs from disk unit 2: P3's read is complete.

At time 36: An interrupt occurs from disk unit 3: P1's read is complete.

At time 48: P3 terminates

At Time 52: P1 terminates

For each time 22, 37, and 47, identify which state each process is in. If a process is blocked, further

identify the event on which is it blocked.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Let's consider the system at time t = 22.

At this time, we only have to consider the first two instructions.

At time 5: P1 executes a command to read from disk unit 3.

At time 20: P3 executes a command to read from disk unit 2.

So, at time t = 22, both processes P1 and P3 will be blocked for I/O.

Let's consider the system at time t = 37. We now have to consider the next two instructions.

At time 33: An interrupt occurs from disk unit 2: P3's read is complete.

At time 36: An interrupt occurs from disk unit 3: P1's read is complete.

Now both processes have finished reading data from the respective disk units. Hence, at this time both of them would be in the running state.

Let's consider the system at time t = 47. No new instruction has occurred between t = 37 and t = 47. Hence, both P1 and P3 would still be in the running state.

Let me know if you have any doubts in the comments.

Add a comment
Know the answer?
Add Answer to:
Assume that at time 5 no system resources are being used except for the processor and...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • (after a Stallings problem) Assume at time 5, no system resources are being used except the...

    (after a Stallings problem) Assume at time 5, no system resources are being used except the processor and memory. Given this, consider this sequence of events: at time = 5: P1 executes a command to read from disk unit 3; at time = 15: P5’s time slice expires; at time = 18: P7 executes a command to write to disk unit 3; at time = 20: P3 executes a command to read from disk unit 2; at time = 24:...

  • Please show also the work. Thank you. (after a Stallings problem) Assume at time 5, no...

    Please show also the work. Thank you. (after a Stallings problem) Assume at time 5, no system resources are being used except the processor and memory. Given this, consider this sequence of events: at time = 5: P1 executes a command to read from disk unit 3; at time = 15: P5's time slice expires; at time = 18: P7 executes a command to write to disk unit 3; at time = 20: P3 executes a command to read from...

  • The CPU and I/O times for 2 processes are shown below. Assume that P1 gets to...

    The CPU and I/O times for 2 processes are shown below. Assume that P1 gets to the ready queue just before P2 and the scheduling algorithm used by the OS is Round Robin with a time slice of 3 time units. Assume that the I/Os for the processes are different so that there is no I/O queue. Assume also that an interrupt from a completed IO for process "X" will place process "X" in the ready queue BEHIND the process...

  • Answer the following question: A Multi Level Feedback (MLF) algorithm uses 5 priority levels. All levels...

    Answer the following question: A Multi Level Feedback (MLF) algorithm uses 5 priority levels. All levels are using Round Robin (RR) Scheduling algorithm with Quantum: 1 ms, 2 ms, 4 ms, 8 ms, 16 ms respectively. Processes start at highest priority (Q=1) and is down graded to the lower priority if it didn't finish within 1 quantum. The following processes are to be scheduled: Arrival Io Wait 0 3 Process P1 P2 P3 CPU Burst 2 4 15 4 1...

  • Please help me create this CLI CPU Scheduling Simulator in java: First Come First Serve (FCFS)...

    Please help me create this CLI CPU Scheduling Simulator in java: First Come First Serve (FCFS) Round Robin (RR) Process information The process information will be read from an input file. The format is: pid arrival_time burst_time All of fields are integer type where: pid is a unique numeric process ID arrival_time is the time when the task arrives in the unit of milliseconds burst_time the is the CPU time requested by a task, in the unit of milliseconds The...

  • Implement the following 3 CPU scheduling algorithms Simulate and evaluate each with the set of eight...

    Implement the following 3 CPU scheduling algorithms Simulate and evaluate each with the set of eight processes below. Use any programming language. The program listing should be submitted with the report. FCFS (First Come First Serve) non-preemptive (partial results provided) SJF non-preemptive MLFQ Multilevel Feedback Queue (absolute priority in higher queues)             Queue 1 uses RR scheduling with Tq = 5             Queue 2 uses RR scheduling with Tq = 10             Queue 3 uses FCFS All processes enter first...

  • Vocabulary Exercises is the communication channel that connects all computer system components Cache types that are...

    Vocabulary Exercises is the communication channel that connects all computer system components Cache types that are generally implemented on the same chip as the CPU include 3. thus controlling access to the bus by all other The CPU is always capable of being a(a) devices in the computer system. 4. An) is a reserved area of memory used to resolve differences in data transfer rate or data transfer unit size. 5. A(n) is an area of fast memory where data...

  • This is for a Unix class. Please help me out. I am attaching a skeletal code of the program below, it just needs ti be filled in. Below is a skeletal code of the program. Fork a child process...

    This is for a Unix class. Please help me out. I am attaching a skeletal code of the program below, it just needs ti be filled in. Below is a skeletal code of the program. Fork a child process and then use the parent for reading and the child for writing.  This is just a way of sending and receiving messages asynchronously. /* ************************************************************* * Utility functions * ************************************************************** */ static void usageError(const char * progName, const char *msg) {...

  • scheduling program in C, please help 1 Objectives This programming project is to simulate a few...

    scheduling program in C, please help 1 Objectives This programming project is to simulate a few CPU scheduling policies discussed in the class. You will write a C program to implement a simulator with different scheduling algorithms. The simulator selects a task to run from ready queue based on the scheduling algorithm. Since the project intends to simulate a CPU scheduler, so it does not require any actual process creation or execution. When a task is scheduled, the simulator will...

  • 10) Unlike a signal, which conveys only the occurrence of a particular event and contains no...

    10) Unlike a signal, which conveys only the occurrence of a particular event and contains no information content, a pipe can be thought of as a scratch file created by a system call. It can be used as a communications channel between concurrently running processes. The interface call to a pipe is similar to that for any file. In fact, the process reads and writes to a pipe just like any file. Unlike files, however, pipes do not represent actual...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT