Operating Systems – Assignment Questions
Unit 1: Introduction and Operating System Structures
1. Define an operating system and explain its types.
2. Discuss the design goals, policies, and implementation of a typical operating system.
3. List and describe the different services provided by an operating system. Explain these
services concerning both programs and users.
4. Explain the multiprogramming operating system in detail and describe its memory layout
along with its advantages.
5. Describe the different sub-components of an operating system.
6. What are system calls? Explain the different categories of system calls with examples.
7. Explain real-time operating systems along with their types, advantages, and examples.
8. Define a virtual machine with a neat diagram. Describe its concept, working, and benefits.
9. Explain the microkernel-based operating system structure.
10. What is the purpose of a command interpreter? Why is it usually separate from the kernel?
11. Describe the major activities of an operating system concerning:
Process Management
File Management
Main Memory Management
Secondary Storage Management
12. Explain the storage system hierarchy of an operating system with a neat diagram.
13. Short Notes:
Real-time Embedded Systems
Advantages of Multiprocessor Systems
Unit 2: Processes and CPU Scheduling
1. Define a process. Describe the contents of a Process Control Block (PCB) with an example.
2. Explain the role of long-term, short-term, and medium-term schedulers in process
scheduling.
3. What is a thread? Differentiate between user-level and kernel-level threads.
4. What is inter-process communication (IPC)? Explain its types. Are function callbacks and
IPC the same?
5. Describe the actions taken by a kernel to context-switch between processes.
6. Describe the actions taken by a kernel to context-switch between kernel-level threads.
7. Consider the set of 5 processes whose arrival time and burst time are given below :
If the CPU scheduling policy is priority pre-emptive, calculate the average waiting time and
average turnaround time. (Higher priority number represents higher priority)
8. Explain different CPU scheduling algorithms with examples (FCFS, SJF, Priority
scheduling, Round Robin, etc.).
9. Describe the actions taken by a kernel to context-switch between processes.
10. Consider the following set of processes to be executing on uniprocessor system.
Draw the Gantt Chart and calculate average turnaround time and average waiting time for
i) SJF Non-preemptive
ii) SJF Preemptive
11. Consider the following data with burst time given in milliseconds:
i)Draw Gantt charts for the execution of these processes using FCFS, non-preemptive and
preemptive SJF, and non-preemptive Priority scheduling.
ii) What is the Average waiting time of each process for each of the scheduling algorithm.
12. Suppose the following jobs arrive for processing at the times indicated, each job will run the
listed amount of time.
i) Give a Gantt chart illustrating the execution of these jobs using the non- preemptive FCFS
and SJF scheduling algorithms.
ii) what is turnaround time and wait time of each job for the above algorithms?
13. Determine the average waiting time and draw a Gantt Chart for following process with
burst time using Shortest-Job-First scheduling algorithm.
Unit 3: Process Synchronization and Deadlocks
1. Explain the critical section problem and the requirements for its solution. Give a solution to
a 2-process critical section problem.
2. Describe Peterson’s solution for the critical section problem.
3. Explain the Dining Philosopher’s problem with the structure of philosophers.
4. Describe the three requirements to satisfy as a solution to critical-section problem.
5. Illustrate Peterson‘s Solution for critical section problem.
6. Explain the Readers-Writers problem and how it can be solved using semaphores.
Describe the necessary conditions for deadlock occurrence. Briefly explain. In a system, the
following state of processes and resources are given: R1→ P1, P1→ R2, P2→ R3, R2→ P2,
R3→ P3, P3→ R4, P4→ R3, R4→ P4, P4→ R1, R1→ P5. Draw Resource Allocation graph
for the system and check for deadlock condition. Explain your answer.
7. Explain the use of Resource Allocation Graph (RAG) in deadlock detection.
8. Write a pseudocode of Swap instruction used for process synchronization.
9. Examine banker’s algorithm for following snapshot of the system, there are 3 processes, P1,
P2 and P3. And 3 resource types, R1, R2 and R3.
There are 12 instances of resource type R1, 11 instances of resource type R2 and 20
instances of resource type R3.
At time T0, the situation is as follows
10. Examine banker’s algorithm after applying to the example given below A
system has 5 processes, P1, P2, P3, P4 and P5. There are 2 types of
resources A, and B. there are 10 instances of A, and 5 instances of B. At
time T0, the situation is as follows;
Is the system in a safe state at time T0?
Suppose now a time T1, process P2 requests one additional instance of resource type A.
11. Considering a system with five processes P0 through P4 and three resources of type A, B,
C. Resource type A has 10 instances, B has 5 instances and type C has 7 instances. Suppose
at time t following snapshot of the system has been taken: Find…
i. What will be the content of the Need matrix?
ii. Is the system in a safe state? If Yes, then what is the safe sequence?
Unit 4: Memory Management
1. Explain paging mechanism with neat diagram. State the importance of offset in it.
2. Discuss the need of page replacement. Differentiate between local and global page
replacement.
3. What is demand paging? Explain the steps in handling page fault using appropriate diagram.
4. Consider a logical address space of 8 pages of 1024 words each, mapped on to a physical
memory of 32 frames.
- How many bits are there in the logical address?
- How many bits are there in the physical address?
5. Consider the page reference string-
4, 7, 6, 1, 7, 6, 1, 2, 7, 2.
If there is there is three-page frames, calculate page faults for following algorithms
i) FIFO page replacement
ii) LRU page replacement
iii) Optimal page replacement
6. A process references 6 pages 1, 2, 3, 4, 5, 6 in the following order
1,2,3,4,2,1,5,6,2,1,2,3,7,6,3,2,1,2,3,6
Assuming that the replacement algorithm is LRU, Optimal and FIFO, find out the number
of page faults during the sequence of references, starting with an empty main memory with
3 frames.
7. Explain with the help of supporting diagram how TLB improves the performance of a
demand paging system.
8. Consider a logical address space of 64 pages of 1,024 words each, mapped onto a physical
memory of 32 frames.
a) How many bits are there in the logical address?
b) How many bits are there in the physical address?
9. Given five memory partitions of 100KB, 500KB, 200KB, 300KB, and 600KB (in order),
how would the first-fit, best-fit, and worst-fit algorithms place processes of 212KB, 417KB,
112KB, and 426KB (in order)? Which algorithm makes the most efficient use of memory?
10. 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 faults would occur for the following replacement algorithms, assuming
five frames? Remember that all frames are initially empty.
a) LRU replacement
b) FIFO replacement
c) Optimal replacement
11. Write short on:
i. Working set model.
ii. Fragmentation
12. Assume three frames and consider the reference page string below.
Reference page string: 5, 7, 6, 0, 7, 1, 7, 2, 0, 1, 7, 1, 0
Determine the number of page faults using optimal and least recently used page replacement
algorithm. State which algorithm is most efficient?
13. Given memory partitions of 150K, 250K, 500K, 300K and 600K (in order) how would each
of the first-fit, best-fit and worst-fit algorithms allocate processes of 212K, 417K, 112K and
426 K(in order)? Which algorithm makes the most efficient use of the memory?
14. 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
Find out the number of page faults if there are 3-page frames, using the following page
replacement algorithm i) LRU ii) FIFO iii) Optimal
15. Describe the action taken by the operating system when a page fault occurs with neat
diagram.
Unit 5: File Management and Disk Scheduling
1. Explain the concept of file. State various file operations.
2. Discuss linked and index disk space allocation methods with neat sketch.
3. Write a note on free space management.
4. What are the three methods for allocating disk space? Explain with help each method
suitable diagram, merits and demerits.
5. Consider two files systems A and B, that use contiguous allocation and linked allocation,
respectively. A file of size 100 blocks is already stored in A and also in B. Now, consider
inserting a new block in the middle of the file (between 50th and 51st block), whose data is
already available in the memory. Assume that there are enough free blocks at the end of the
file and that the file control blocks are already in memory. Let the number of disk accesses
required to insert a block in the middle of the file in A and B are nA and nB respectively,
then the calculate value of nA + nB.
6. Suppose that a disk drive has 200 cylinders, numbered 0 to 199. the drive currently services
a request at cylinder 50, and the previous request was at cylinder 25. the queue of pending
request in FIFO order is 82,170,43,140,24,16,190 Starting from the current position, what is
the total distance (in cylinders) that the disk arm moves to satisfy all pending requests, for
each of the following algorithms i)FCFS ii) SSFT iii) SCAN iv)LOOK v) C-SCAN vi) C-
LOOK.
7. Enlist and Explain in details the various operations performed on the file.
8. Describe the following file types with respect to extension used for the file and
9. functioning of the respective file type.
a) Executable
b) object
c) batch
d) library
e) archive
f) source code
10. Write the name of the terminology used for the boot-control block and volume-control
block in Unix and NT File System.
11. 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?
12. Explain the linked allocation type disk free space management.
13. Explain the contiguous and indexed file allocation methods.
14. Explain following disk scheduling techniques with its advantages …
i. Shortest Seek Time First
ii. SCAN
15. Describe the different file allocation methods. Also explain the methods of file
implementation with merits and demerits.
16. Suppose that a disk drive has 5000 cylinders, numbered 0 to 4999. the drive currently
services a request at cylinder 1043, and the previous request was at cylinder 1225. the queue
of pending request in FIFO order is 486, 1470, 913, 1774, 948, 1509, 1022, 1750, 130.
Starting from the current position, what is the total distance (in cylinders) that the disk arm
moves to satisfy all pending requests, for each of the following algorithms i) FCFS ii) SSFT
iii) SCAN iv) LOOK v) C-SCAN.
17. Describe how free-space management is implemented in file system. Also explain bit map
with the help of an example
18. Describe the different file allocation methods. Also explain the methods of file
implementation with merits and demerits.
19. Describe how free-space management is implemented in file system. Also explain bit map
with the help of an example