0% found this document useful (0 votes)
17 views6 pages

Sample Questions Final 2019

The document contains questions about operating system concepts including deadlock conditions, resource allocation graphs, banker's algorithm, paging, file systems, and thrashing. It asks the reader to describe conditions for deadlock, draw resource allocation graphs, determine if system states are safe or unsafe using the banker's algorithm, explain paging techniques and their effects on fragmentation, step through an address translation process, simulate a paging algorithm, explain second chance page replacement, and answer multiple choice questions about thrashing and the working set model.

Uploaded by

bhavya tripathi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views6 pages

Sample Questions Final 2019

The document contains questions about operating system concepts including deadlock conditions, resource allocation graphs, banker's algorithm, paging, file systems, and thrashing. It asks the reader to describe conditions for deadlock, draw resource allocation graphs, determine if system states are safe or unsafe using the banker's algorithm, explain paging techniques and their effects on fragmentation, step through an address translation process, simulate a paging algorithm, explain second chance page replacement, and answer multiple choice questions about thrashing and the working set model.

Uploaded by

bhavya tripathi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Question 1.

1: When a deadlock occurs, all the following four conditions


must hold: 1) mutual exclusion, 2) hold and wait, 3) no preemption and
4) circular wait. Please describe:

1) What is the circular wait condition?


2) What is the difference between condition 2 and condition 4?

Question 1.2: Given the following description of the system state,


please draw the corresponding resource allocation graph.

The system has 5 Threads (T1, T2, T3, T4 and T5) and 5 Resources (R1,
R2, R3, R4 and R5). T2 owns R5 but waits for R4, T1 owns R4 but waits
for R1, T4 owns R2 but waits for R3, T3 owns R5 and R1 but waits for R2,
T5 owns R3 but waits for R5.
Question 2: Consider the following snapshot of a system:

Using the banker’s algorithm, determine whether or not each of the


following states is unsafe. If the state is safe, give the order in which the
processes may complete. Otherwise, describe why the state is unsafe.

1) Available = (0, 3, 0, 1)
2) Available = (1, 0, 0, 2)
Question 3.1: What is the difference between external fragmentation
and internal fragmentation? Why paging can eliminate external
fragmentation but not internal fragmentation?

Question 3.2: According to the following Diagram, please describe the


steps for address translation from virtual address to the corresponding
physical address.
Question 4.1: Demand paging uses a second chance page replacement
policy. It uses one reference bit to give every page one more chance in
FIFO replacement. Assume that the system has 3 page frames. Consider
the following page reference stream: 7, 0, 1, 2, 0, 3, 0, 4, 2, 3. Please fill
in the following table for the second‐chance algorithm. Please also give
the number of incurred page faults.
Request sequence 7 0 1 2 0 3 0 4 2 3

Frame 1
Second‐chance
Frame 2

Frame 3

Question 4.2: Explain why in the enhanced second‐chance algorithm,


replacing one page might need to search circular queue several times.
Question 5: Please answer the following multiple choice questions on
thrashing:
1. A process is thrashing if:
a) it spends a lot of time executing, rather than paging
b) it spends a lot of time paging, than executing
c) it has no memory allocated to it
d) none of the mentioned

2. When a subroutine is called,


a) it defines a new locality
b) it is in the same locality from where it was called
c) it does not define a new locality
d) none of the mentioned

3. In the working set model, for:


261577775162341234443434441323
if DELTA = 10, then the working set at time t1 (….7 5 1) is :
a) {1, 2, 4, 5, 6}
b) {2, 1, 6, 7, 3}
c) {1, 6, 5, 7, 2}
d) {1, 2, 3, 4, 5}

4. The accuracy of the working set depends on the selection of:


a) working set model
b) working set size
c) memory size
d) number of pages in memory

5. If the sum of the working – set sizes increases, exceeding the total number of available
frames:
a) then the process crashes
b) the memory overflows
c) the system crashes
d) the operating system selects a process to suspend
Question 6.1: What are the two distinct parts of a file system? What
are their functions?

Question 6.2: Contrast the performance of the three techniques for


allocating disk blocks (contiguous, linked, and indexed) for both
sequential and random file access.

Question 6.3: Consider a file system that uses inodes to represent files.
Disk blocks are 8 KB in size, and a pointer to a disk block requires 4
bytes. This file system has 12 direct disk blocks, as well as single, double,
and triple indirect disk blocks. What is the maximum size of a file that
can be stored in this file system?

You might also like