Project #29881 - operating systems

answer any 5

1. A set of jobs shown below arrive at the CPU Queue for scheduling. Their arrival times and service

times required at the CPU are shown below.

job Arriving time Service time

A 0 3

B 2 6

C 3 5

D 5 2

E 6 1

Obtain the average waiting time and the average residence time for the set of jobs over the

following schedule disciplines

 Shortest Time First

 Shortest Remaining Time First

 Higher Response Ratio Next

Comment on the results obtained.

2. We spent a great deal of time studying concurrency. For a set of concurrent jobs, one of the

operational objectives may be to maximize the level of concurrency among them. How would you

suggest we measure this quantity? Does the goal of maximizing concurrency involve

maximizing efficiency for the involved processor? Is there a difference? If so, how would you

measure efficiency of a processor handling a concurrent set of jobs over a given time


3. The issues regarding deadlock are not quite simple as we found out in the class. There are

several approaches: (a) deadlock avoidance approach, (b) deadlock detection and recovery by

killing one process, releasing all resources, (c) deadlock prevention by advanced reservation of

resources, (d) deadlock prevention by releasing all resources of a process if it needs to wait and

hold, (e) deadlock prevention by resource ordering, and (f) deadlock detection and roll back

processes to previous checkpoints.

A. Given all these choices, and the issues raised in question (2), rank order all the

above choices on a scale of 1 to 6 that is likely to achieve maximum concurrency.

Comment on your rank ordering.

B. Given all these choices, which one should be selected to ensure maximum

efficiency? Again, on this criterion, rank order the above choices given that

deadlock basically is a rare event. Comment on your ranking. Would your ranking

change if deadlocks occur frequently?

4. In this, we are to consider the Dining Philosopher problem. However, we are going to

assume that our philosophers are either ‘lefties’ (pick up left chopstick first), or ‘righties’ (pick up

right chopstick first) in addition to the usual slate of constraints on them. Thus, the behavior of a

typical ‘righty’ could be depicted as follows:

while (true) {




wait(CS[(i+1) mod 5]); //wait for the right chopstick

wait(CS[i]); //wait for the left chopstick

signal(CS[i]); //return left chopstick

signal(CS[(i+1) mod 5]); //return right chopstick


The lefty’s behavior could be similarly encoded.

A. Prove that any sitting arrangement of lefties and righties with at least one of lefties

and righties would make deadlock impossible.

B. Prove that any sitting arrangement of lefties and righties with at least one of each

would avoid starvation.

C. Suppose among the philosophers there is one or more ambidextrous individuals who

randomly behave with equal probability either as a righty or a lefty, or both (if he

cannot get his chopsticks in one mode, he would switch to alternative mode). Would

there be deadlock or starvation? State your reason.

5. What is garbage collection in real memory? Why is it an important issue? Suggest a design

scheme for a Memory Defragmenter (Garbage Collector) which could be evoked by the

Memory Manage Unit whenever the situation for garbage collection is warranted. Under what

circumstances the garbage collection task, according to your design, may become inefficient and

expensive? Rationalize your answer.

6. In the class, we considered the optimal page size problem based on two major parameters: (a)

the page table length, and (b) the internal fragmentation. Suppose, we now include two more

parameters: (c) page swapping, and (d) the degree of multiprogramming. How should the

optimal page size appear now?

Are there any other relevant parameters that we should include in our model? Show, how.

7. Virtual memory consideration allows us to choose between two different modes of memory

management schemes: Paging, or segmentation. By way of an appropriate analogy, we may

consider putting suitcases in the trunk of a car using large or small suitcases, but somehow they

never seem to fit well. An alternative design to this may be to open up all suitcases and distribute

their contents all over the trunk attaining a perfect fit, but with a different set of disadvantages.

From this angle, discuss the pros and cons of the two systems, or of any possible hybrid design

that may appear to be cheaper than both.

8. Suppose an interactive system is currently supporting 100 users with 15 seconds of think time

and a 5 requests/sec system-throughput.

a. What is the response time of the system?

b. Suppose the service demands of the workload evolve over time so that the systemthroughput

drops to 50% of its former value without any other change. What would be

the response time of an average job now?

c. How do you account for the fact that the response time in (b) is more than twice as

large as that in (a)?

9. Assume you have a page reference string for a process with m frames (initially all empty). The

page reference string has length p with n distinct page numbers occurring in it. For any page

replacement algorithms

a. What is the lower bound on the number of page faults?

b. What is the upper bound of the number of page faults?

Suppose a process is seemingly generating a large number of page faults. Argue for or against

giving the process more CPU time. Suppose you are observing a heavy page traffic on your

system. What conclusions can you derive now?

Subject Computer
Due By (Pacific Time) 05/04/2014 10:00 am
Report DMCA

Chat Now!

out of 1971 reviews

Chat Now!

out of 766 reviews

Chat Now!

out of 1164 reviews

Chat Now!

out of 721 reviews

Chat Now!

out of 1600 reviews

Chat Now!

out of 770 reviews

Chat Now!

out of 766 reviews

Chat Now!

out of 680 reviews
All Rights Reserved. Copyright by - Copyright Policy