Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Consider three processes (process id 0, 1, 2 respectively) with compute time bursts 2, 4, and 8-time units. All processes arrive at time zero.

1. Consider three processes (process id 0, 1, 2 respectively) with compute time bursts 2, 4, and 8-time units. All processes arrive at time zero. Consider the longest remaining time first (LRTF) scheduling algorithm. In LRTF ties are broken by giving priority to the process with the lowest process id. Find the average turnaround time. Show your work.

2. Consider three processes, all arriving at time zero, with total execution time of 10, 20 and 30 units, respectively. Each process spends the first 20% of execution time doing I/O, the next 70% of time doing computation, and the last 10% of time doing I/O again. The operating system uses a shortest remaining compute time first scheduling algorithm and schedules a new process either when the running process gets blocked on I/O or when the running process finishes its compute burst. Assume that all I/O operations can be overlapped as much as possible. For what percentage of time does the CPU remain idle? Show your work

image text in transcribedimage text in transcribedimage text in transcribed

5. Three processes A, B and C each execute a loop of 100 iterations. In each iteration of the loop, a process performs a single computation that requires to CPU milliseconds and then initiates a single I/O operation that lasts for tio milliseconds. It is assumed that the computer where the processes execute has sufficient number of I/O devices and the OS of the computer assigns different 1/0 devices to each process. Also, the scheduling overhead of the OS is negligible. The processes have the following characteristics: Process id tc 100 ms 350 ms 200 ms tio 500 ms 500 ms 500 ms The processes A, B, and C are started at times 0, 5 and 10 milliseconds respectively, in a pure time sharing system (round robin scheduling) that uses a time slice of 50 milliseconds. The time in milliseconds at which process C would complete its first I/O operation is _. Show your work. (10 points) 4. An operating system uses Shortest Remaining Time first (SRT) process scheduling algorithm. Consider the arrival times and execution times for the following processes: 27 Process Execution time Arrival time 20 P2 25 15 P3 10 30 P4 What is the total waiting time for process P2? Show your work. (10 points) 45 3. In the following process state transition diagram for a uniprocessor system, assume that there are always some processes in the ready state: Now consider the following statements: Start Ready Running Terminated Blocked II. If a process makes a transition D, it would result in another process making transition A immediately. A process P2 in blocked state can make transition E while another process Pl is in running state. The OS uses preemptive scheduling. The OS uses non-preemptive scheduling. III. IV. Which of the following statements is true? a) I and II b) I and III c) II and III d) II and IV. Provide explanation. No explanation = No credit. (10 points) 5. Three processes A, B and C each execute a loop of 100 iterations. In each iteration of the loop, a process performs a single computation that requires to CPU milliseconds and then initiates a single I/O operation that lasts for tio milliseconds. It is assumed that the computer where the processes execute has sufficient number of I/O devices and the OS of the computer assigns different 1/0 devices to each process. Also, the scheduling overhead of the OS is negligible. The processes have the following characteristics: Process id tc 100 ms 350 ms 200 ms tio 500 ms 500 ms 500 ms The processes A, B, and C are started at times 0, 5 and 10 milliseconds respectively, in a pure time sharing system (round robin scheduling) that uses a time slice of 50 milliseconds. The time in milliseconds at which process C would complete its first I/O operation is _. Show your work. (10 points) 4. An operating system uses Shortest Remaining Time first (SRT) process scheduling algorithm. Consider the arrival times and execution times for the following processes: 27 Process Execution time Arrival time 20 P2 25 15 P3 10 30 P4 What is the total waiting time for process P2? Show your work. (10 points) 45 3. In the following process state transition diagram for a uniprocessor system, assume that there are always some processes in the ready state: Now consider the following statements: Start Ready Running Terminated Blocked II. If a process makes a transition D, it would result in another process making transition A immediately. A process P2 in blocked state can make transition E while another process Pl is in running state. The OS uses preemptive scheduling. The OS uses non-preemptive scheduling. III. IV. Which of the following statements is true? a) I and II b) I and III c) II and III d) II and IV. Provide explanation. No explanation = No credit. (10 points)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2012 Administration

Authors: Adam Jorgensen, Steven Wort

1st Edition

1118106881, 9781118106884

More Books

Students also viewed these Databases questions

Question

Explain why potassium and sodium exhibit similar properties.

Answered: 1 week ago

Question

8. Provide recommendations for how to manage knowledge.

Answered: 1 week ago