Lovely Professional University: Operating System

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 3

LOVELY PROFESSIONAL

UNIVERSITY

OPERATING SYSTEM

CSE316
SUBMITTED TO: - Miss Preet Pal

SUBMITTED BY: - Inder Bagga


ROLL NO: - RB1801b42

SECTION: - b1801

REG NO: - 10800234

Declaration: - I declare that this assignment is my individual


work. I have not copied from any other student’s work or from
any other source except where due acknowledgment is made
explicitly in the text, nor has any part been written for me by
another person.

Student’s Signature:

Inder Bagga
1). Q1 How does a system detect thrashing? Once it detect
thrashing, what can the system do to eliminate this problem?

Sol: In simple words, thrashing is a situation where whenever a process needs to run, it swaps out
some other processes working set to disk. This happens when all the processes working set sizes
sum to larger than the amount of physical memory available in the system.
Thrashing can be detected by the system when the CPU utilization starts decreasing and the
number of page faults increases considerably.

Solution:2.

Number of frames LRU FIFO Optimal


1 20 20 20
2 18 18 15
3 15 16 11
4 10 14 8
5 8 10 7

Ans3:
With a single copy, several concurrent updates to a file may result in user obtaining incorrect
information, and the file being left in an incorrect state. With multiple copies, there is storage
waste and the various copies may not be consistent with respect to each other.

Ans.4:

Contiguous -- If file is usually accessed sequentially, if file is relatively small.

Indexed-- If file is large and usually accessed randomly.

Ans5:

Segmentation and paging are often combined in order to improve upon each other. Segmented
paging is helpful when the page table becomes very large. Paged segmentation handles the case
of having very long segments that require a lot of time for allocation. By paging the segments,
we reduce wasted memory due to external fragmentation as well as simplify the allocation.
Ans:6:
B. Randomly: A movie player that allows user to start playing movie at random
locations of the file.

You might also like