Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

AMMAN ARAB UNIVERSITY Q 3 . Answer the following short questions: A ) List three advantages of threads B ) What is the purpose of

AMMAN ARAB UNIVERSITY
Q3. Answer the following short questions:
A) List three advantages of threads
B) What is the purpose of the Dispatcher?
C) Some CPU scheduling algorithms are sets of other CPU scheduling algorithms holds between RR and FCFS algorithms?
4. Suppose we have producer and consumer processes. The producer produces them into a (queue) buffer owned by the consumer, while the consumer consur buffer in FIFO order. Each item requires 1 time quantum to be produced and be consumed. The buffer is initially empty and has a maximum size of 3. consumer processes are well-synchronized using semaphores.
Consider the case when we run three producers P1,P2, and P3, and one consu the processes are runnable starting at time zero. Answer the following quest
A. If Round-Robin Scheduling used to execute those processes, how ma process produce and consume at the end of 10th time quantum? Assume queue order is P1,P2,P3,C1.
B. If Priority Scheduling is used to execute the processes and the priorities follows: P(C1)=4,P(P3)=3,P(P2)=2, and P(P1)=1. How many ite produce and consume at the end of 10th time quantum? Assume that higher priority. Explain your answer.
Consider the following two concurrently running processes P0 and P ariables A, B, C, X, Y, and Z.
P0: -
C=1;
A=4;
B=5;
x=A+B;
Y=x-C;
end.
P1: ,A=3;
B=2;
Z=x+Y;
end.
the code of P0 and P1 by adding synchronization variable(s) and st Z equals to 15.
onsider the initial value of the synchronization variable(s) "Semapl
FDCD-1, Rev. b
Ref.: Deans' Council Session (I3/2019-2020), Decision No..23, Date: 10/02/2020
Quality Assurance Council Session (3D/2019-2020), Decision No.. D4. Date: 26/P'
image text in transcribed

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_2

Step: 3

blur-text-image_3

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

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Sham Navathe

4th Edition

0321122267, 978-0321122261

More Books

Students also viewed these Databases questions