Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q5) (Threads) What could the output of the concurrent (threaded) execution of process A and process B be? (State all possible outputs) Process A Process

Q5) (Threads) What could the output of the concurrent (threaded) execution of process A and process B be? (State all possible outputs)

Process A                                                                                             Process B

int x = 0;
int y = 0;
while (x == 0) {do nothing}
printf("A");
y = 1;
y = 0;
printf("D");
y = 1;
int x = 0;
int y = 0;
printf ("B");
x = 1;
while(y == 0) {do nothing}
printf ("C");

Consider a multiprogrammed system with degree of 6 (i.e., six programs in memory atthe same time). Assume that each process spends 40% of its time waiting for I/O. What will be the CPU utilization? (You can provide a formula instead of a numeric value)

Step by Step Solution

3.42 Rating (161 Votes )

There are 3 Steps involved in it

Step: 1

PROCESS WILL ALWAYS START FROM B AS IN PROCESS A IT WILL BLOCK AT WHILE TILL X IS NOT EQUAL 1 IT WILL ALWAYS PRINT D FIRST IN EVERY OUTPUT NOW AFTER T... 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

Modeling the Dynamics of Life Calculus and Probability for Life Scientists

Authors: Frederick R. Adler

3rd edition

840064187, 978-1285225975, 128522597X, 978-0840064189

More Books

Students also viewed these Operating System questions