Introduction to Algorithms
3rd Edition
ISBN: 9780262033848
Author: Thomas H. Cormen, Ronald L. Rivest, Charles E. Leiserson, Clifford Stein
Publisher: MIT Press
expand_more
expand_more
format_list_bulleted
Question
Chapter 27.1, Problem 4E
Program Plan Intro
To construct a computation dag for which on computation of a greedy scheduler could take double the time of computation of an another greedy scheduler, given the number of processors to be same.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Assuming a Round-Robin Scheduling works with a quantum time of 5, draw the timeline for CPU- and I/Obursts for the following three processes; A, B, C, with their arrival times, execution and I/O times.
k=5
m=10
p=3
true/false Consider a group of CPU-time sharing processes P1 , P2, ... Pn with CPU burst times of 1,2,...,n units respectively arrive at the same time. The average waiting time of these processes is always less than n2/6 (regardless of scheduling algorithm)
Using a number of different queues, each with its own scheduling strategy, is how the Multilevel scheduling algorithm works with the ready queue. Pick one: What's the deal? The time an individual process spends waiting should be minimized by the CPU scheduler. To choose one: The two alternatives are: FALSE or TRUE
Chapter 27 Solutions
Introduction to Algorithms
Ch. 27.1 - Prob. 1ECh. 27.1 - Prob. 2ECh. 27.1 - Prob. 3ECh. 27.1 - Prob. 4ECh. 27.1 - Prob. 5ECh. 27.1 - Prob. 6ECh. 27.1 - Prob. 7ECh. 27.1 - Prob. 8ECh. 27.1 - Prob. 9ECh. 27.2 - Prob. 1E
Ch. 27.2 - Prob. 2ECh. 27.2 - Prob. 3ECh. 27.2 - Prob. 4ECh. 27.2 - Prob. 5ECh. 27.2 - Prob. 6ECh. 27.3 - Prob. 1ECh. 27.3 - Prob. 2ECh. 27.3 - Prob. 3ECh. 27.3 - Prob. 4ECh. 27.3 - Prob. 5ECh. 27.3 - Prob. 6ECh. 27 - Prob. 1PCh. 27 - Prob. 2PCh. 27 - Prob. 3PCh. 27 - Prob. 4PCh. 27 - Prob. 5PCh. 27 - Prob. 6P
Knowledge Booster
Similar questions
- Explain the differences in how much the following scheduling algorithms discriminate in favor of short processes:a. FCFSb. RRc. Multilevel feedback queuesarrow_forward(1.a)A CPU-scheduling algorithm determines an order for the execution of its scheduled processes. Given n processes to be scheduled on one processor, how many different schedules are possible? Give a formula in terms of n. (b) What advantage is there in having different time-quantum sizes at different levels of a multilevel queueing system?arrow_forwardIn 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.arrow_forward
- Job scheduling: Consider the problem of scheduling n jobs of known durations t1, t2, . . . , tn for execution by a single processor. The jobs can be executed in any order, one job at a time. You want to find a schedule that minimizes the total time spent by all the jobs in the system. (The time spent by one job in the system is the sum of the time spent by this job in waiting plus the time spent on its execution.) Design a greedy algorithm for this problem. Does the greedy algorithm always yield an optimal solution? (Hint: You may get a clue from Prim’s Algorithm)arrow_forwardJob scheduling Consider the problem of scheduling n jobs of known durations t1,t2,. . .,tn for execution by a single processor. The jobs can be executed in any order, one job at a time. You want to find a schedule that minimizes the total time spent by all the jobs in the system. (The time spent by one job in the system is the sum of the time spent by this job in waiting plus the time spent on its execution.) Design a greedy algorithm for this problem. Does the greedy algorithm always yield an optimal solution?arrow_forwardIn this exercise, we consider the execution of a loop in a statically scheduled superscalar processor that has full forwarding. Loop: lw $t3, 0($s1) lw $t4, 0($s2) mul $t1, $t3, $t4 add $s0, $t1, $s0 addi $s1, $s1, -8 addi $s2, $s2, -8 bne $s1, $zero, Loop Unroll this loop so that three iterations of it are done at once and schedule it for a 2-issue pipelined processor. This processor can issue one ALU/branch instruction and one lw/sw instruction each cycle. Assume that the loop always executes a number of iterations that is a multiple of 3. You can use any unused registers when changing the code to eliminate dependencies.arrow_forward
- CODE IN JAVA !!!!!!!!!!!!!!!!!!!!!!!! Provide a full code of: CPU multilevel feedback queue scheduler: for this system, we have 3 levels of feedback queue scheduling: (1) top priority queue: Round-Robin quantum = 8ms; (2) middle priority queue: Round-Robin quantum = 16ms (3) low priority queue: FCFS Provide examples of the code's output at the bottom.arrow_forwardFigure 2 shows available free list in a heap of memory management scheme. Show the memoryallocation of process requests of size 90KB, 39KB, 27KB, 16KB and 36KB which will bereceived in order using:a) Best-Fit memory allocation methodb) Worst-Fit memory allocation method solve a & barrow_forwardSuppose Dr. WhyLie comes up to you and claims that he has invented a super-fastcomparison based priority queue. The speed of the priority queue operations are as follows(n is the number of items currently in the priority queue):a. insert a new item in O(sqrt(log n)) timeb. extract (remove and return) the smallest item from the priority queue in O(sqrt(logn)) time.Explain why Dr. WhyLie must be lying.arrow_forward
- Write an MPI program segment for all-to-all personalized broadcast on a ring of p processors, eachprocessor Pi, 0 ≤ i ≤ p − 1, holding M(i, 0), M(i, 1), ·M(i,(p − 1)). Message M(i, j), an integer, is destinedfrom Pi to Pj . Show only the p − 1 iterative loop. Ensure proper buffer size, MPI message size, howitems are organized and ordered at the destination buffer, etc., through each loop.arrow_forwardFour processes arrive at the same time with their priorities, execution times and I/O times given in the table below. Assuming a Round-Robin Scheduling works with a quantum time of 3, but the scheduler selects the process with highest priority from the queue (NOT those arrived earliest), other than currently pre-empted process, at each turn; a-)Draw the timeline for CPU- and I/O- bursts for these processes b-)Calculate average turn-around timearrow_forwardin round robin when three processes have to enter the ready queue at the instant , if one process has just finished I/O the other has preempted from CPU due to expiration of its quantum and third (C) has just started. which one will be inserted last (ie lowest priority ) ? a) the process that has just finished I/O b) One of the three will be random be selected c) The process that has been pre-empted from CPU due to expiration of its quantum time. d) The process that has just startedarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education