Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider Peterson's algorithm for mutual exclusion between two concurrent processes i and j. The program executed by process is shown below. repeat flag [i] =

Consider Peterson's algorithm for mutual exclusion between two concurrent processes i and j. The program executed by process is shown below.

repeat

flag [i] = true;

turn = j;

while ( P ) do no-op;

Enter critical section, perform actions, then exit critical

section

flag [ i ] = false;

Perform other non-critical section actions.

until false;

For the program to guarantee mutual exclusion, the predicate P in the while loop should be

More than one word are put in one cache block to

(a) exploit the temporal locality of reference in a program

(b) exploit the spatial locality of reference in a program

(c) reduce the miss penalty

(d) none of the above

Which of the following statements is false?

a) Virtual memory implements the translation of a program's address space into physical memory address space

b) Virtual memory allows each program to exceed the size of the primary memory

c) Virtual memory increases the degree of multiprogramming

d) Virtual memory reduces the context switching overhead

Consider a set of n tasks with known runtimes r1, r2, ... rn to be run on a uniprocessor machine. Which of the following processor scheduling algorithms will result in the maximum throughput? Suppose the time to service a page fault is on the average 10 milliseconds, while a memory access takes 1 microsecond. Then a 99.99% hit ratio results in average memory access time of Which of the following need not necessarily be saved on a context switch between processes?

A process executes the code

fork ();

fork ();

fork ();

The total number of child processes created is

consider the 3 processes, P1, P2 and P3 shown in the table

ProcessArrival timeTime unit required

P105

P217

P334

The completion order of the 3 processes under the policies FCFS and RRS (round robin scheduling with CPU quantum of 2 time units) are

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

Inflation, Unemployment And Capital Malformations

Authors: Bernard Schmitt, Xavier Bradley, Alvaro Cencini

1st Edition

0429767064, 9780429767067

More Books

Students also viewed these Economics questions

Question

Determine Leading or Lagging Power Factor in Python.

Answered: 1 week ago