You are on page 1of 2

Part A

Question1:- How does a system detect thrashing? Once it detect thrashing,


what can the systems do to eliminate this problem?
Answer: -
Thrashing: The high paging activity is called thrashing. A process is thrashing if it
is spending more time on paging than in executing. Thrashing is caused by
under allocation of the minimum number of pages required by a process,
forcing it to continuously page fault. The system can detect thrashing by
evaluating the level of CPU utilization as compared to the level of
multiprogramming.

System does following things to eliminate this problem:-


1.) It can be eliminated by reducing the level of multiprogramming.
2.) Thrashing can also be removed by using local replacement algorithm.

Question2:- consider the following page reference string:


1,2,3,4,2,1,5,6,2,1,2,3,7,6,3,2,1,2,3,6
How many page fault would occur for the following replacements
algorithms, assuming
one, two, three, four, five frames .remember all frames are initially empty,
so your first
unique pages will all cost one page fault each.
1 LRU Replacement
2. FIFO Replacements.
3. Optimal algorithm.

Answer:-
Page faults for LRU when:-
Frame size Page fault
One 20
Two 18
Three 15
Four 10
Five 8
Page faults for FIFO when:-
Frame size Page fault
One 20
Two 18
Three 16
Four 14
Five 10

Page faults for Optimal when:-


Frame size Page fault
One 20
Two 15
Three 11
Four 8
Five 7

Question3:- Some system provides file sharing by maintaining a


single copy of a file; other system maintains several copies one for
each of the users sharing the file. Discuss relative’s merits of each
approach?

Answer:-File sharing is the practice of distributing or providing access to digitally


stored information, such as computer programs, multi-media (audio, video),
documents, or electronic books. File sharing is the practice of taking one
copy of a file and making it available in multiple repository locations. The
surround SCM database is acting as a true share with only one copy of
the file in existence. There is only one single database object reflecting the
changes made to the shared file. The system which provides file sharing
between different users creating unique copies of the file and synchronizing
changes when they are made. These days all the systems use the concept
of sharing a single file with multiple users.

You might also like