0% found this document useful (0 votes)
13 views

Tutorial 4

The document contains 8 tutorials covering various topics in operating systems including memory management, virtual memory, paging, segmentation, processes and threads, concurrency and deadlocks. The tutorials provide questions to test understanding of key concepts and algorithms related to these topics. Students are divided into 8 groups with each group assigned different questions to answer related to topics such as deadlocks vs starvation, bounded buffer problem, virtual memory, paging, segmentation, Banker's algorithm, page faults and more.

Uploaded by

shemi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Tutorial 4

The document contains 8 tutorials covering various topics in operating systems including memory management, virtual memory, paging, segmentation, processes and threads, concurrency and deadlocks. The tutorials provide questions to test understanding of key concepts and algorithms related to these topics. Students are divided into 8 groups with each group assigned different questions to answer related to topics such as deadlocks vs starvation, bounded buffer problem, virtual memory, paging, segmentation, Banker's algorithm, page faults and more.

Uploaded by

shemi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

TUTORIAL 4

Group 1:

1. Why is deadlock state more critical than starvation? Draw the resource
allocation graph (i) with deadlock (ii) with a cycle but no deadlock.(6
marks)
2. Describe the Bounded - buffer problem and give a solution for the same
using
semaphores. Write the structure of producer and consumer processes.6
marks)

Group 2:

1. How does swapping result in better memory management? (3 marks)


2. Explain the concept of virtual memory. Write one memory management
scheme
which supports virtual memory. (3 marks)
3. What is critical section problem? What are the requirements that need to
be
satisfied by any solution to critical section problem? Give a solution to a
2
process critical section problem.(6 marks)

Group 3:

1. Differentiate between compile time and load time address binding. (3


marks)
2. Explain FCFS, SSTF and SCAN disk scheduling algorithms, using the
given
disk queue of requests: 82,170,43,140,24,16,190. Find the total seek time
for
each case. Assume that, the disk has 200 cylinders ranging from 0 to 199
and
the current position of head is at cylinder 50. (9 marks)

Group 4:

1. Explain with the help of supporting diagram, how translation look-aside


buffer
(TLB) improves the performance of a paging system. (8 marks)
2. Consider the page reference string 1,2,3,4,2,1,5,6,2,1,2,3,7,6,3,2,1,2,3,6.
For a
system with 3 frames compute the number of page faults for the
following page
replacement methods: (i) FCFS (ii) Optimal (ii) LRU. (9 marks)

Group 5:

1. Consider a logical address space of 256 pages with a 4-KB page size,
mapped onto
a physical memory of 64 frames. Find the (i) number of bits in the logical
address
(ii) number of bits in the physical address (iii) number of bits in the offset
part of
logical address. (3 marks)
2. Write the algorithm or pseudocode for solving the Dining-Philosophers
problem
using semaphores. Is the solution prone to deadlocks or starvation? Discuss.
(5 marks)
3. Compare the memory organization schemes of pure paging and pure
segmentation
with respect to the following issues: (i) External Fragmentation (ii)
Internal
Fragmentation.(5 marks)

Group 6:

1. Consider the following snapshot of a system with five processes P1, P2,
P3, P4,
P5 and four resources A, B, C, D. What is the total number of instances
of A, B,
C, and D? Using Bankers Algorithm check whether the system is in safe
state
or not. (9 marks)

2. With a diagram write the steps involved in handling a page fault.


(6marks)

Group 7:

1. Consider the following segment table.


What are the physical addresses for the following logical addresses?
(i) 4, 350 (ii) 2, 100 (iii) 3, 70 (iv) 0, 25 (v) 1, 130 (9 marks)

2. Explain how a process larger than the physical memory can be executed
with the
help of virtual memory. Describe the concept using demand paging.(6
marks)
3. llustrate the wait and signal operations used in semaphores (3 marks)

Group 8:

1. List out the necessary conditions which can lead to a deadlock situation
in a system? (3 marks)
2. Calculate the number of page faults for the following reference string
with three page frames,
using the following algorithms.
9, 2, 3, 1, 2, 5, 3, 4, 6, 9, 9, 1, 0, 5, 4, 6, 2, 3, 0, 1
(i) FIFO (ii) Optimal (iii) LRU (8 marks)
3. Consider the following segment table.

What are the physical addresses for the following logical addresses?
(i) 0, 430 (ii) 1, 10 (iii) 2,500 (iv) 3, 400 (v) 4, 112 (9 marks)

You might also like