In the picture attached, the    Say that the system is running 3 jobs, A, B, and C, and that all of them are CPU-intensive (i.e., each one does one infinitely long CPU burst). The system begins with A on the CPU at the beginning its time quantum while B and C are in the Ready Queue, in that order. a) Show the execution pattern (as a string of A’s, B’s, C’, and o’s) assuming that the scheduler time quantum is equal to 4 ms. Show the execution for more than 20ms (but less than 30ms). b) In the long run (i.e, assuming jobs don’t ever terminate), what percentage of the CPU time is wasted doing context-switching/scheduling? The answers I came up with is as follows: a) AAAAoBBBoCCCoAAAoBBBoCCCoAAA, because for the first 4ms, A gets to execute it's full time quantum, however, when context-switching to the next job, the switch is included in the time quantum. b) 2.77% spent context switching, divide the number of o's by the total amount of runtime.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

In the picture attached, the 

 

Say that the system is running 3 jobs, A, B, and C, and that all of them are CPU-intensive (i.e., each one does one infinitely long CPU burst). The system begins with A on the CPU at the beginning its time quantum while B and C are in the Ready Queue, in that order.

a) Show the execution pattern (as a string of A’s, B’s, C’, and o’s) assuming that the scheduler time quantum is equal to 4 ms. Show the execution for more than 20ms (but less than 30ms).

b) In the long run (i.e, assuming jobs don’t ever terminate), what percentage of the CPU time is wasted doing context-switching/scheduling?

The answers I came up with is as follows:

a) AAAAoBBBoCCCoAAAoBBBoCCCoAAA, because for the first 4ms, A gets to execute it's full time quantum, however, when context-switching to the next job, the switch is included in the time quantum.

b) 2.77% spent context switching, divide the number of o's by the total amount of runtime.

Consider a system that uses Round-Robin scheduling with a context-switching/scheduling overhead of duration 0.1ms. We represent the execution timeline of a job mix on
this system by indicating 1ms of computation for a process via an uppercase letter. For example, the following string:
AAAOBOCOAAODDD
means that process A executes for 3ms, then process B for 1ms, then process C for 1ms, then process A again for 2ms, then process D for 3ms, with appropriate context-
switches in between. This example execution lasts 10ms + 4 * 0.1ms = 10.4ms (10ms of actual process execution, .4ms of context-switch overhead).
Transcribed Image Text:Consider a system that uses Round-Robin scheduling with a context-switching/scheduling overhead of duration 0.1ms. We represent the execution timeline of a job mix on this system by indicating 1ms of computation for a process via an uppercase letter. For example, the following string: AAAOBOCOAAODDD means that process A executes for 3ms, then process B for 1ms, then process C for 1ms, then process A again for 2ms, then process D for 3ms, with appropriate context- switches in between. This example execution lasts 10ms + 4 * 0.1ms = 10.4ms (10ms of actual process execution, .4ms of context-switch overhead).
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY