Opearating System
Opearating System
OF
OPERATING SYSTEM
(CSE316)
Q1 How does a system detect thrashing? Once it detect thrashing, what can the
system do to eliminate this problem?
Ans: if the number of frames allocated to a low priority process is lower than the
minimum number required by the computer architecture then in this case we must
suspend the execution of this low priority process. After this we should page out all of its
remaining pages and freeing all of its allocated frames. This provision introduces a swap
in, swap-out level of intermediate CPU scheduling. Let take an example of a process that
does not have enough number of frames. If the process does not have the number of
frames it needs to support pages in active use, it will quickly page fault. The only option
remains here for process is to replace some active pages with the page that requires a
frame. However, since all of its pages are in active use, it must replace a page that will be
needed again right away. Consequently, it quickly faults again and again that mean
replacing pages that it must bring back in immediately. This high paging activity is called
Thrashing. Or we can say that a process is thrashing if it is spending more time in paging
then executing.
1 LRU Replacement
2. FIFO Replacements.
3.Optimal algorithm.
3 frame
1 4 , 5 , 1 , 7
3 1, 6, 3
Total page fault=10
4 frame
1 6
2
3 5 , 3
4 6 , 7 , 1
Total page fault=10
5 frame
3 6
4 3
5 7
Total page fault=8
Q3 Some system provide file sharing by maintaining a single copy of a file; other
system maintain several copies one for each of the users sharing the file. discuss
relatives merits of each approach?
File sharing in Surround SCM allows a single copy of a file to exist in multiple repository
locations. Since the file is shared, if it is ever updated all locations will reflect those
updates simultaneously. There are several best practice suggestions and caveats
associated with file sharing. It is important to understand how the Surround SCM
architecture facilitates file sharing so that best practice strategies can be devised early on
to help you get the most out of file sharing with the least amount of effort.
when a user performs a Get to their local file system a file shared to multiple repositories
with multiple working directories will exist as separate copies. This means that while a
file shared in Surround will always be identical across all the repositories it is shared to,
that same file might exist as different copies in your local working directory.
Part B
Q4 Consider the system that supports the strategies of contiguous ,linked and
indexed allocation. What criteria should be used in deciding which strategy is best
utilized for a particular file?
Ans: starting with lets discuss about each strategy and the criteria for their appropriate
use:
No external fragmentation.
Q5. Segmentation and paging can be combined together into one scheme. What is
the reason for this combination?
Ans: lets discuss about segmentation and paging :
Paging – Computer memory is divided into small partitions that are all the same size and
referred to as, page frames. Then when a process is loaded it gets divided into pages
which are the same size as those previous frames. The process pages are then loaded into
the frames.
3. it Supports sparse address spaces. If segment is not used, no need for page table.
Decreases memory required for page tables.
.
Q6 Give an example of an application in witch data in a file shouldbe accessed in the
following order.
1. Sequentially
2. Randomaly
When we are retrieving data from a magnetic tape we are accesing it in sequential mode.
As for a more perfect example take that of listening songs in a tape recorder or the audio
cassette player.in that we can’t go to to the desired song directly we will have to pass
through every single coming before it.so when we are unable to access the desired file
directly than by such a process of going through different files is called as sequential
access of file.