Unit 1 Part A
1. List the goals of an operating system in the view of the user and system. (1st )
2. Identify the modes of operations of the OS and give their significance. (1st)
3. Difference between multiprogramming and multitasking.(1st)
4. Difference between dual mode and multimode operations. (1st)
5. Rank the following storage systems from slowest to fastest:(2nd)
a. Hard-disk drives
b. Registers
c. Optical disk
d. Main memory
e. Nonvolatile memory
f. Magnetic tapes
g. Cache
6. What are some advantages of peer-to-peer systems over client–server
systems?(1st)
7. What is the purpose of interrupts? How does an interrupt differ from a trap? Can traps
be generated intentionally by a user program? (1st)
8. How the operating system handles a user application invoking the open() system call.
(2nd)
9. Draw diagram for representing the role of loader and linker. (2nd)
10. Draw the traditional unix operating system structure. (2nd)
11. Define monolithic structure(2nd).
12. what is meant by micro kernels.(2nd)
13. List the steps involved in booting and building an operating system.(2nd)
14. What is the purpose of the command interpreter? Why is it usually separate from the
kernel? (2nd)
15. What is the purpose of system programs? (2nd)
Part B
1. Explain in detail about the typical computer system organization with neat sketch.(1st)
2. Compare multi processor systems ,distributed systems and time sharing systems based
on its architectural diagram. (1st)
3. Explain in detail with following environments involved in computing.
a. Mobile computing
b. Traditional computing
c. Client server computing
d. Cloud computing (1st)
4. Explain the functionalities of operating system services with its neat structure. (2nd)
5. Explain system calls and its types with its functionalities in detail. (2nd)
6. Draw diagram layered operating system with neat sketch. (2nd)
7. A Process executes the code
fork();
fork();
fork();
calculate the total number of child processes created.
Answer:
The first fork(): 1 parent + 1 child = 2 processes.
After the second fork(): 2 existing processes + 2 new children = 4 processes.
After the third fork(): 4 existing processes + 4 new children = 8 processes.
Total child processes created = 8 (total processes) - 1 (initial parent process) = 7 child
processes.
So, the total number of child processes created by the given code sequence fork(); fork();
fork(); is 7.
Unit 2 PART A
1. Compare and contrast Single-threaded and multi-threaded processes. (2nd)
2. Diagram for state transition between processes(1st)
3. Draw the layout of a process in memory.(1st)
4. Define process control block.(PCB) (1st)
5. Draw the queuing diagram representation of process scheduling.(2nd)
6. How context switches between two processes is functioned with a neat sketch.(1st)
7. Show the multithreaded server architecture. (2nd)
8. List the benefits of multithreaded programming. (2nd)
9. Show the various circumstances which are used by CPU scheduling during decisions.
(2nd)
10. Mention the role of dispatcher with a neat sketch. (1st)
11. Infer the various criteria’s are used in CPU scheduling. (2nd)
12. What is load balancing? Why it is essential across all systems in an environment. (2nd)
13. Compare how the threads are more efficient than the process.
14. Define Time slice.
.
PART B
1. Define process state; explain the states of a process with a neat sketch. (1st)
2. Explain in detail about inter process communication in the message passing system .
(2nd)
3. Explain the models involved in multi threading with a neat sketch. (2nd)
4. Explain the difference between preemptive and nonpreemptive scheduling.
(2nd)
5. Consider the following set of processes, with the length of the CPU burst time given in
milliseconds:
Process Burst Time Priority
P1 2 2
P2 1 1
P3 8 4
P4 4 2
P5 5 3
The processes are assumed to have arrived in the order P1, P2, P3, P4, P5,all at time 0.
a. Draw four Gantt charts that illustrate the execution of these processes using the
following scheduling algorithms: FCFS, SJF, non preemptive priority (a larger priority
number implies a higher
priority), and RR (quantum = 2).
b. What is the turnaround time of each process for each of the scheduling algorithms in part
a?
c. What is the waiting time of each process for each of these scheduling algorithms?
d. Which of the algorithms results in the minimum average waiting time (over all
processes)? (16 Marks)
6. Consider the following set of processes, with the length of the CPU burst given in
milliseconds.
Process Execution Time Arrival Time Priority
P1 11 0 2
P2 3 0 1
P3 9 1 5
P4 4 2 4
P5 9 5 3
The processes are assumed to have arrived in the order P1, P2, P3, P4 and P5.
i. Draw Gantt charts that illustrate the execution of the process using the following
scheduling algorithms FCFS, SJF,SRTF, Preemptive Priority (larger priority implies
highest priority) and RR (Quantum=3)
ii. Calculate the turnaround time and waiting time of each process for the above
algorithms.
iii. Which scheduling algorithm results in minimal average waiting time?
iv. Which scheduling algorithm results in minimal average turnaround time? (2nd)
7. Illustrate the layout of a C program in memory, different process states and process
control block. (1st)
8. Explain in detail about the operations on processes with a neat diagram. (1st)
9. Consider the following set of processes with the length of the CPU-
burst time in given ms:
Process Burst Time Arrival time
P1 8 0
P2 4 1
P3 9 2
P4 5 3
P5 3 4
Draw Gantt charts illustrating the execution of these processes using FCFS, priority and
RR(quantum=2) scheduling. Also Identify the waiting time and turnaround time for each
scheduling algorithms.
10. Explain in detail about context switching. (2nd)
Unit 3 PART A
1. Give the four necessary conditions for deadlock. (2nd)
2. Find suitable methods for handling deadlocks in process synchronization. (2nd)
3. Name some classic problem of synchronization in process synchronization. (1st)
4. Relate how the exit section effectively supports critical section problems.(1st)
5. A system shares 9 tape drives. The current allocation and maximum requirement of tape
drives for 4 processes are shown in below:
Choose the suitable state of the system by applying banker’s algorithm. (1st)
6. Write an algorithm for granting the resources safely for a process.(1st)
7. Name two hardware instructions and their definitions which can be used for
implementing mutual exclusion.(1st)
8. Give the general structure of the typical critical section problem for a process.(1st)
9. Identify the following resource allocation graph has any deadlock or not. If ‘Yes; write the
sequences of it.
(2nd)
10. Considering a system with five processes P0 through P4 and three resource types A, B,
C. Resource type A has 10 instances, B has 5 Instances and type C has 7 instances. Suppose
at time t0 following snapshot of the system has been taken:
Process Allocation Max Available
ABC ABC ABC
P0 0 1 0 7 5 3 3 3 2
P1 2 0 0 3 2 2
P2 3 0 2 9 0 2
P3 2 1 1 2 2 2
P4 0 0 2 4 3 3
Construt the need matrix for the above process. (2nd)
11. At a particular time of computation the value of a counting semaphore is 7. Then 20P
operations and 15v operations were completed on this semaphore. Find the result of the
semaphore. (1st)
PART B
1. Elaborate in detail about hardware support for synchronization. (16 Marks) (1st)
2. Explain semaphore with its usage and implementation in detail. (16 Marks) (1st)
3. Explain monitors with its condition variables and implementation in detail. (16 Marks)
(1st)
4. Consider the following snapshot of a system:
Allocation Max Available
AB C D AB C D AB C D
T0 0 0 1 2 0012 1520
T1 1 0 0 0 1750
T2 1 3 5 4 2356
T3 0 6 3 2 0652
T4 0 0 1 4 0656
Answer the following questions using the banker’s algorithm:
a. What is the content of the matrix Need?
b. Is the system in a safe state?
c. If a request from thread T1 arrives for (0,4,2,0), can the request be granted immediately.
(16 Marks) (2nd)
5.Consider the following snapshot of a system.
Allocation Max
Process ABCD ABCD
PO 3 0 1 4 5 1 1 7
P1 2 2 1 0 3 2 1 1
P2 3 1 2 1 3 3 2 1
P3 0 5 1 0 4 6 1 2
P4 4 2 1 2 6 3 2 5
Apply the banker's algorithm determines whether or not each of the following states is
unsafe. If the state is safe, illustrate the order in which the processes may complete.
Otherwise, illustrate why the state is unsafe.
1) Available=(0, 3, 0, 1)
2) Available=(1, 0, 0, 2) (2nd)
5. State the solution to the dining philosophers problem using semaphores, accompanied by
a neat sketch.
6. How wait( ) and signal( ) semaphore operations could be implemented in multiprocessor
environments, using the Test and Set( ) instruction. The solution should exhibit minimal
busy waiting. Develop Pseudocode for implementing the operations.
7. State the working functionality of critical section problems with its own functionalities.
(2nd)
8. How to form a resource allocation graph that denotes a deadlock situation with suitable
examples.
Unit 4
PART A
Infer about internal and external fragmentation in contiguous memory allocation.(1st)
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? (1st)
Assume a 1-KB page size, what are the page numbers and offsets for the address reference
3085 in paging? (1st)
Suppose a computer system with 256 bytes main memory runs a process with 4
unequal size segments. The process is loaded in the main memory using the
following segment table, (1st)
Segment Number Base address Length (in bytes)
0 31 32
1 79 16
2 95 32
3 127 128
If the computer system uses the 9-bit addresses, what is the physical address
corresponding to the logical address 110011001?
List out the various fields used in counter implementation of LRU algorithm. (2nd)
How contiguous memory allocation differs from non-contiguous memory allocation in terms
of memory management? (1st)
A process size is 72,766 bytes and page size is 2048 bytes. Find the number of pages and
fragmentation size in paging? (1st)
Find effective access time with page hit ratio of 99%, memory access time of 10ns and disk
access time of 20ns. (2nd)
Write the steps in handling page fault. (1st)
Consider the following page reference string:
1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5
Assume demand paging with four frames, find the page fault rate of LRU policy? (2nd)
Infer the conversion steps from logical address to physical address. (1st)
PART B
1. Outline the three types of contiguous memory allocation algorithms with an
example. (1st)
2. Consider the following page reference string:
7, 2, 3, 1, 2, 5, 3, 4, 6, 7, 7, 1, 0, 5, 4, 6, 2, 3, 0, 1.
Assuming demand paging with three frames, how many page faults would occur for the
following replacement algorithms?
• LRU replacement
• FIFO replacement
• Optimal replacement (2nd
3. Consider the main memory with 5 page frames and page references,
3, 8, 2, 3, 9, 1, 6, 3, 8, 9, 3, 6, 2, 1, 3
Assume demand paging, check whether FIFO and LRU replacement algorithms have same
number of page fault? (2nd)
4. Given memory partition of 100KB, 500KB, 200KB and 600KB (in order), how
would the first fit algorithm place the following processes of size 212KB,
417KB, 112KB and 426KB (in order) and calculate internal and external
fragmentation? (1st)
5. Show the concept of Demand paging with neat diagram.
6. Draw the diagram of segmentation memory management schemeand explain
its principle.
7. 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. How many page faults would occur for the following replacement
algorithms, assuming one, two, three, four frames? Find that all frames are
initially empty, so your first unique pages will all cost one fault each.
a. LRU Replacement
b. FIFO Replacement
c. Optimal Replacement
8. For the Page Reference String: 7, 0, 1, 2, 0, 3, 0, 4, 2, 3, 0, 3, 2, 1, 2, 0. 1. 7, 0,
1 Calculate the Page Faults applying (i)Optimal(ii)LRU and(iii)FIFO Page
Replacement Algorithms for a Memory with three frames.
9. Explain the following allocation algorithms: 1) First-fit 2) Best-fit 3) Worst-
fit.
Unit 5
PART A
Define transfer rate in storage management. (1st)
Consider a system that supports 5,000 users. Suppose that you want to allow 4,990 of these
users to be able to access one file. How would you specify this protection scheme in UNIX?
(1st)
Specify the details of per-file file control block. (1st)
Differentiate between single level directory and two level directory.(2nd)
What do you meant by replay attack? (2nd)
How is bandwidth calculated in HDD scheduling? (1st)
Differentiate between UFS and NTFS in file system operations. (2nd)
Specify the two techniques used in directory implementation. (2nd)
Draw the four-layered model of security.(2nd)
PART B
1. Discuss about any two disk scheduling algorithms with an example. (1st)
2. Using suitable illustrations, write a note on the following free-space list methods in
free-space management, (2nd)
a. Bit vector
b. Linked list
c. Grouping and counting
3. Summarize the three major methods of allocating secondary storage space in the file
system implementation with an example. (1st)
4. Suppose that a disk drive has 8 cylinders. The queue of pending requests, in FIFO
order, is: 98, 183, 37, 122, 14, 124, 65, 67. Starting from the current head position,
what is the total head movement that the disk arm moves to satisfy all the pending
requests for each of the following disk-scheduling algorithms?
a. FCFS
b. SSTF
c. SCAN (1st)
5. Suppose that a disk drive has 5,000 cylinders. Numbered 0 to 4999. The drive is
currently serving a request at cylinder 143. And the previous request was at cylinder
125. The queue of pending requests in FIFO order is
86,1470,913,1774,948,1509,1022,1750,130.
Starting from the current head position, Calculate the total distance (in cylinders) that
the disk arm moves to satisfy all the pending requests for each of the following disk-
scheduling algorithms.
a. FCFS
b. SSTF
c. SCAN
d. C-SCAN
6. Design the concept of contiguous allocation, indexed & linked allocation method in
disk block allocation for files and explain.
7. Disk requests come in to the disk for cylinders 10, 22, 20, 2, 40, 6 and 38. A seek
takes 6 msec per cylinder move. How much seek time is for Closest cylinder next
algorithm? Initially arm is at cylinder 20.Starting track at 100.The queue of pending
request is, 55,58,39,18,90,160,150,38,184 – FCFS, SCAN ( elevator), SSTF,C SCAN
8. Explain various Disk Scheduling Algorithms with illustration.