You are on page 1of 5

today cs604 paper

define bounded waiting and progress for critical section.


Ans:
2. Progress
If no process is executing in its critical section and some processes wish
to enter their
critical sections, then only those processes that are not executing in their
remainder
section can participate in the decision on which will enter its critical
section next, and
this selection cannot be postponed indefinitely.
3. Bounded Waiting
There exists a bound on the number of times that other processes are
allowed to enter
their critical sections after a process has made a request to enter its
critical section and
before that request is granted..
2 questions about thrashing
Q:algorithm for critical section sharing two variables
The processes share two variables:
boolean flag[2];
int turn;
The boolean array of flag is initialized to false, whereas turn maybe 0
or 1.
calculate effective time access .
Ans:
If HR is hit ratio and MR is miss ratio, the effective access time is given
by the following
equation
Teffective = HR (TTLB + Tmem) + MR (TTLB + 2Tmem)
Example 1
Tmem = 100 nsec
TTLB = 20 nsec
Hit ratio is 80%
Teffective = 0.8 (20 + 100) + 0.2 (20 + 2*100) nanoseconds = 140

nanoseconds
This means that with 80% chances of finding a page table entry in the
TLB, the effective
access time becomes 40% worse than memory access time without
paging. Example 2
Tmem = 100 nsec
TTLB = 20 nsec
Hit ratio is 98%
Teffective = 0.98 (20 + 100) + 0.02 (20 + 2*100) nanoseconds = 122
nanoseconds
types of file structure
Ans: Answer:- (Page 214) None
Simple record structure
Complex Structures
methods to recover deadlocks
Ans: When a deadlock detection algorithm determines that a deadlock
exists, several
alternatives exist. One possibility is to inform the operator that a
deadlock has occurred,
and to let the operator deal with the deadlock manually. The other
possibility is to let the
system recover from the deadlock automatically. There are two options
for breaking a
deadlock. One solution is simply to abort one or more processes to break
the circular
wait. The second option is to preempt some resources from one or more
of the
deadlocked processes.
whether the safe sequence is necessary for safe state or not justify?
A state is safe if the system can allocate resources to each process in
some order and still

avoid a deadlock. More formally a system is in a safe state only if there


exists a safe
sequence. A sequence of processes <P1, P2 Pn> is a safe sequence for
the current
allocation state if, for each Pi, the resources that Pi can still request can
be satisfied by the
currently available resources plus all the resources held by all the Pj with
j < i. In this
situation, if the resources that Pi needs are not immediately available,
then Pi can wait
until all P
j have finished. When they have finished, Pi can obtain all of its needed
resources, complete its designated task, return its allocated resources and
terminate.
When Pi terminates, Pi+1 can obtain its needed resources and terminate.
If no such
sequence exists, then the system is said to be unsafe.
high page fault result in low cpu utilization justify
Ans:
If a process does not have enough pages, the page-fault rate is very
high. This leads to
low CPU utilization. The operating system thinks that it needs to
increase the degree of
multiprogramming, because it monitors CPU utilization and find it to be
decreasing due
to page faults. Thus another process is added to the system and hence
thrashing occurs
and causes throughput to plunge.
--------------------------------------------------------aoa.today is my cs604 paper.macs 60% came from pastpaper file .some
were new.
what is munted and its types.

Ans: File System Mounting


A file system is best visualized as a tree, rooted at /. /dev, /etc, /usr, and
other directories
in the root directory are branches, which may have their own branches,
such as
/etc/passwd, /usr/local, and /usr/bin. Filling up the root file system is not
a good idea, so
splitting /var from / is a good idea.Another common reason to contain
certain directory
trees on other file systems is if they are to be housed on separate
physical disks, or are
separate virtual disks, or CDROM drives. Mounting makes file systems,
files, directories, devices, and special files available
for use at a particular location. Mount point is the actual location from
which the file
system is mounted and accessed. You can mount a file or directory if you
have access to
the file or directory being mounted and write permission for the mount
point
There are types of mounts:
Remote mount
Local mount Remote mounts are done on a remote system on which
data is transmitted over a
telecommunication line. Local mounts are mounts done on your local
system.
coceptual question bhi thee.
-----------------------------------------------------------------Q2) How can a user control the Thrashing? Marks (2)

Answer:- (Page 11) In order to stop thrashing, the degree of


multiprogramming needs to be reduced. The effects of thrashing can be
reduced by using a local page replacement.
To resolve thrashing due to excessive paging, what can a user do?
Answer:- Click here for detail To resolve thrashing due to excessive
paging, a user can do any of the following: Increase the amount of
RAM in the computer (generally the best long-term solution).
Decrease the number of programs being run on the computer. Replace
programs that are memory-heavy with equivalents that use less
memory.
Improve spatial locality by replacing loops

You might also like