Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Chapter 4: 1. Compare the characteristics of a CPU-bound process versus an I/O-bound process. 2. Name three examples of I/O devices that cannot be shared.

Chapter 4:

1. Compare the characteristics of a CPU-bound process versus an I/O-bound process.

2. Name three examples of I/O devices that cannot be shared.

3. Five jobs arrive nearly simultaneously for processing and their estimated CPU cycles are, respectively: Job A 52 ms, Job B 512 ms, Job C 515 ms, Job D 57 ms, and Job E 5 3 ms.

a. Using FCFS, in what order would they be processed? What is the total time required to process all five jobs? What is the average turnaround time for each of these five jobs?

b. Using SJN, and assuming that all jobs are present when the algorithm begins, in what order would they be processed? What is the total time required to process all five jobs? What is the average turnaround time for all five jobs?

c. Using SJN, and assuming that all jobs are present when the algorithm begins, what is the average turnaround time for all five jobs using these speeds: Job A 5 12 ms, Job B 5 2 ms, Job C 515 ms, Job D 57 ms, and JobE53 ms.

4. Assume that your system has one queue for jobs waiting for printing, and another queue for those waiting for access to a disk. Which queue would you expect to have the faster response? Explain your reasoning.

5. Assume that the system has a multiple level queue with a variable time quan- tum per queue, and that the incoming job needs 80 ms to run to completion. If the first queue has a time quantum of 5 ms and each queue thereafter has a time quantum that is twice as large as the previous one, how many times will the job be interrupted and on which queue will it finish its execution? Calcu- late how much time in ms that it spends in each queue.

6. Using the same multiple level queue system from the previous exercise, if a job needs 175 ms to run to completion, how many times will the job be inter- rupted, and on which queue will it finish its execution?

7. Using SJN, calculate the start time and finish time for each of these seven jobs that arrive one CPU cycle apart. Then indicate the order in which the jobs run to completion. It might help to draw a timeline to understand when jobs arrive and finish.

Job Arrival Time CPU Cycle

A 0 4

B 1 11

C 2 4

D 4 1

E 5 9

F 7 4

G 8 2

8. Given the following information:

Job Arrival Time CPU Cycle

A 0 15

B 2 2

C 3 14

D 6 10

E 10 2

Calculate which jobs will have arrived ready for processing by the time the first job is finished or is first interrupted. Do the calculation using each of the fol- lowing scheduling algorithms.

a. FCFS

b. SJN

c. SRT

d. Round robin (use a time quantum of 5, but ignore the time required for context switching and natural wait)

9. Using the same information from the previous exercise, calculate the start time and finish time for each of the five jobs using each of the following scheduling algorithms. a. FCFS b. SJN c. SRT d. Round robin (using a time quantum of 5, but ignore the time required for context switching and natural wait)

Job Arrival Time CPU Cycle

A 0 15

B 2 2

C 3 14

D 6 10

E 10 2

10. Using the same information from the previous exercise, calculate the start time and finish time for each of the five jobs using each of the following scheduling algorithms (ignoring context switching overhead times).

a. FCFS

b. SJN

c. SRT

d. Round robin (using a time quantum of 5

Job Arrival Time CPU Cycle

A 0 15

B 2 2

C 3 14

D 6 10

E 10 2

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

Algorithm Design And Applications

Authors: Michael T. Goodrich, Roberto Tamassia

1st Edition

1118335910, 978-1118335918

More Books

Students also viewed these Algorithms questions