if you want to remove an article from website contact us from top.

    which of the following scheduling algorithms could result in starvation? explain in detail? a. first-come, first-served b. shortest job first c. round robin d. priority

    Mohammed

    Guys, does anyone know the answer?

    get which of the following scheduling algorithms could result in starvation? explain in detail? a. first-come, first-served b. shortest job first c. round robin d. priority from screen.

    5.4 Which of the following scheduling algorithms could result in starvation? a. First

    Shortest job first and priority-based Shortest job first and priority-based scheduling algorithms could result in starvation.

    5.4 Which of the following scheduling algorithms could result in starvation? a. First-come, first-served b. Shortest job first c. Round robin d. Priority.

    Published byDayna Dawson

    Modified over 7 years ago

    73Share

    Similar presentations

    Ch. 7 Process Synchronization (1/2) I Background F Producer - Consumer process :  Compiler, Assembler, Loader, · · · · · · F Bounded buffer.

    Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 6: Process Synchronization.

    1 Operating Systems, 122 Practical Session 5, Synchronization 1.

    CH7 discussion-review Mahmoud Alhabbash. Q1 What is a Race Condition? How could we prevent that? – Race condition is the situation where several processes.

    Presentation on theme: "5.4 Which of the following scheduling algorithms could result in starvation? a. First-come, first-served b. Shortest job first c. Round robin d. Priority."— Presentation transcript:

    1 5.4 Which of the following scheduling algorithms could result in starvation? a. First-come, first-served b. Shortest job first c. Round robin d. Priority

    2 Shortest job first and priority-based

    Shortest job first and priority-based scheduling algorithms could result in starvation.

    3 5.5 Consider a system running ten I/O-bound tasks and one CPU-bound task. Assume that the I/O-bound tasks issue an I/O operation once for every millisec- nd of CPU computing and that each I/O operation takes 10 milliseconds to complete. Also assume that the context switching overhead is 0.1 millisecond and that all processes are long-running tasks. What is the CPU utilization for a round-robin scheduler when: a. The time quantum is 1 millisecond b. The time quantum is 10 milliseconds

    4 • The time quantum is 1 millisecond: Irrespective of which process is scheduled, the scheduler incurs a 0.1 millisecond context-switching cost for every context-switch. This results in a CPU utilization of 1/1.1 * 100 = 91%. • The time quantum is 10 milliseconds: The I/O-bound tasks incur a context switch after using up only 1 millisecond of the time quantum. The time required to cycle through all the processes is therefore 10* (as each I/O-bound task executes for 1 millisecond and then incur the context switch task, whereas the CPU-bound task executes for 10 milliseconds before incurring a context switch). The CPU utilization is therefore 20/21.1 * 100 = 94%.

    5 6.2 Explain why spinlocks are not appropriate for single-processor systems yet are often used in multiprocessor systems.

    6 ANS: Spinlocks are not appropriate for single-processor systems because the condition that would break a process out of the spinlock could be obtained only by executing a different process. If the process is not relinquishing the processor, other processes do not get the opportunity to set the program condition required for the first process to make progress. In a multiprocessor system, other processes execute on other processors and thereby modify the program state in order to release the first process from the spinlock.

    7 6.3 Explain why implementing synchronization primitives by disabling interrupts is not appropr- iate in a single-processor system if the synchr- onization primitives are to be used in user-level programs.

    8 If a user-level program is given the ability to disable interrupts, then it can disable the timer interrupt and prevent context switching from tak- ing place, thereby allowing it to use the proces- sor without letting other processes to execute.

    9 6.7 Show how to implement the wait() and signal() semap- hore operations in multiprocessor environments using the TestAndSet() instruction. The solution should exhibit minimal busy waiting.

    10 int guard = 0; int semaphore value = 0; wait() { while (TestAndSet(&guard) == 1); if (semaphore value == 0) { atomically add process to a queue of processes waiting for the semaphore and set guard to 0; } else { semaphore value--; guard = 0;}} signal() if (semaphore value == 0 && there is a process on the wait queue) wake up the first process in the queue of waiting processes else semaphore value++; guard = 0; }

    11 6. 8 The Sleeping-Barber Problem

    6.8 The Sleeping-Barber Problem. A barbershop consists of awaiting room with n chairs and a barber room with one barber chair. If there are no customers to be served, the barber goes to sleep. If a customer enters the barbershop and all chairs are occupied, then the customer leaves the shop. If the barber is busy but chairs are available, then the customer sits in one of the free chairs. If the barber is asleep, the customer wakes up the barber. Write a program to coordinate the barber and the customers.

    12 customer : semaphore = 0 // # of the customers waiting for services waiting : int = 0 // # of waiting customers barber : int = 0 // # of the barber waiting customer mutex : semaphore = 1 // for waiting mutual exclusion Barber : repeat wait(customer); wait(mutex); waiting = waiting – 1; signal(barber); signal(mutex); ….. cut hair(); until false

    स्रोत : slideplayer.com

    Explain with the help of an example which of the following scheduling algorithm could result in starvation.

    1 3.3k views

    Explain with the help of an example which of the following scheduling algorithm could result in starvation.

    written 3.9 years ago by

    snehalb • 650

    modified 12 months ago by

    IshanD • 30

    a. First come first serve basis. b. Shortest Job first c. Round vobin d. Priority

    operating systems ADD COMMENT EDIT

    1 Answer

    0 395 views

    written 12 months ago by

    IshanD • 30

    The answer is b. If a process with shorter burst-time is present in the queue, the CPU has to execute that particular process before moving on to other processes with larger Burst time. This may create a problem for processes with larger Burst time because a new process might come up when these processes are just about to go inside the Running State.

    Option d might seem a possible answer but Processes with same priorities are executed on a First-come first-serve basis which might solve the problem of starvation. Also, we can use Multi-level Feedback queues to solve the problem of Priority Scheduling.

    Note: Burst-Time is the actual time a Process requires to finish execution.

    ADD COMMENT EDIT

    Please log in to add an answer.

    स्रोत : www.ques10.com

    Chapter 6

    Study with Quizlet and memorize flashcards containing terms like What data structure is used to implement the ready queue for the following scheduling algorithms: First-come, first-served Shortest job first Round robin Priority, What is complexity of enqueue and dequeue operations on a FIFO queue with N items in it?, What is complexity of enqueue and dequeue operations on a priority queue with N items in it implemented with a list maintain in order? and more.

    Chapter 6 - Questions

    Term 1 / 8

    What data structure is used to implement the ready queue for the following scheduling algorithms:

    First-come, first-served

    Shortest job first Round robin Priority

    Click the card to flip 👆

    Definition 1 / 8 FCFS = FIFO Que

    Shortest Job first = Queue with new jobs inserted at end

    Round Robin = FIFO Que with a Quantum

    Priority = FIFO Queue with preemption

    Click the card to flip 👆

    Created by Gerne1337

    Terms in this set (8)

    What data structure is used to implement the ready queue for the following scheduling algorithms:

    First-come, first-served

    Shortest job first Round robin Priority FCFS = FIFO Que

    Shortest Job first = Queue with new jobs inserted at end

    Round Robin = FIFO Que with a Quantum

    Priority = FIFO Queue with preemption

    What is complexity of enqueue and dequeue operations on a FIFO queue with N items in it?

    Enqueue = O (1) Dequeue = O (1)

    You get the first in line, you kick it out, you stick new ones in the back

    What is complexity of enqueue and dequeue operations on a priority queue with N items in it implemented with a list maintain in order?

    Enqueue = O (n) Dequeue = O (1)

    What is complexity of enqueue and dequeue operations on a priority queue with N items in it implemented with a Heap?

    Enqueue = O (logn) Dequeue =O (1)

    Consider the exponential average formula used to predict the length of the next CPU burst. What are the implications of assigning the following values to the parameters used by the algorithm?

    α = 0 and τ0 = 100 milliseconds

    α = 0.99 and τ0 = 10 milliseconds

    If α > .50, then there is more bias on the current burst length

    If α < .50 then there is more bias on the previous predicted outcome

    Exponential average formula

    Which of the following scheduling algorithms could result in starvation? Which kind of starvation?

    First-come, first-served

    Shortest job first Round robin Priority

    FCFS = No starvation, everyone eventually gets its chacne

    Shortest job first = Longer processes will have more waiting time and eventually they will sufffer starvations

    Round Robin = Starvation doesn't really occur because everyone gets there chance after a quantum

    Priority = lower priority process's can experience starvation

    Assume that 5 threads are submitted to the ready-to-run queue at the times below and will have a burst length given below as well:

    Look at Gantt charts draw

    Students also viewed

    Chapter 6: CPU Sch 9 terms clachura OS 3~4 40 terms yochen_9 Chapter 5 18 terms emily13__ Chapter 1 Exercises 19 terms Pineapplepotato

    Sets found in the same folder

    COEN 177 Quiz 3 10 terms taylor_mau

    COEN 177 SALEM AGTASH MIDTERM 2

    28 terms Nickthefree COEN 177 Midterm 1 64 terms jyezalaleul OS Midterm 1 116 terms DL0303

    Other sets by this creator

    Chapter 3 - 4 - Questions

    2 terms Gerne1337

    Chapter 2 - Questions

    3 terms Gerne1337 Chapter 1 - Vocab 4 terms Gerne1337

    Chapter 1 - Questions

    8 terms Gerne1337

    Recommended textbook solutions

    The Language of Composition: Reading, Writing, Rhetoric

    2nd Edition

    Lawrence Scanlon, Renee H. Shea, Robin Dissin Aufses

    661 solutions

    Technical Writing for Success

    3rd Edition

    Darlene Smith-Worthington, Sue Jefferson

    468 solutions

    Technical Writing for Success

    3rd Edition

    Darlene Smith-Worthington, Sue Jefferson

    468 solutions

    Technical Writing for Success

    3rd Edition

    Darlene Smith-Worthington, Sue Jefferson

    468 solutions

    Other Quizlet sets

    GUIA DE PSICOTERAPIA II

    100 terms tania_carbajal3

    BMS 601 Module 3: RNA Processing and Degradat…

    57 terms brittiney_lowe

    11-24 Test Cards-BMS 110-Ivy

    95 terms sethd002 Sales interview 14 terms Gfmrnen 1/5

    स्रोत : quizlet.com

    Do you want to see answer or more ?
    Mohammed 2 month ago
    4

    Guys, does anyone know the answer?

    Click For Answer