Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q1: A computer has 4GB of RAM of which the OS occupies 512MB. The processes are all 256MB (for simplicity) and have the same characteristics.

image text in transcribed
image text in transcribed
Q1: A computer has 4GB of RAM of which the OS occupies 512MB. The processes are all 256MB (for simplicity) and have the same characteristics. If the goal is 99% CPU utilization, what is the maximum V/O wait that can tolerated? Q2: Multiple jobs in run Parallel and finish faster than if they had run sequentially. Suppose that two jobs, each needing 20 minutes of CPU time, start simultaneously. How long will the last one take to complete if they run sequentially? How long if they run in parallel? Assume 50% 1/0 wait. Q3. Consider the following piece of C code: Void main(X Fork(); Fork(); Exit(); How many child processes are created upon execution of this program. Draw the structure of processes just after second fork(). Q4. Five Jobs are waiting to be run. Their expected run times are 9,6, 3, 5, and X. In what order should they be run to minimize average response time? (Your answer will depend on X.) Q5 in the solution to the dining philosophers problem, why it the state variable set to HUNGRY in the procedure take_forks? put_forks(0); www } put both forks back on table worn } void take_forks(int i) { down(&mutex); state[i] = HUNGRY; test(i); up(&mutex); down(&s[i]); } /* i: philosopher number, from 0 to N-1 */ I enter critical region * record fact that philosopher i is hungry * * try to acquire 2 forks */ * exit critical region */ block if forks were not acquired */ void put_forks(i) /* i: philosopher number, from 0 to N-1 /

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

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

Database Design Application Development And Administration

Authors: Michael V. Mannino

4th Edition

0615231047, 978-0615231044

More Books

Students also viewed these Databases questions

Question

Calculate the lifetime value (LTV) of a loyal customer.

Answered: 1 week ago