Hot Posts

Operating System (Question Bank All Unit) B.E. 4th sem

B.E Forth Semester ( Computer Science and Engineering ) ( CBCS )  Operating System:4KS03/4KE03 (OS) (Question Bank)

Unit 1

1. What is an operating system? What are the operating system services? Explain in brief.

2. Enlist the components of the operating system and explain them.

3. Give the difference between Uniprogramming and Multiprogramming. What is the need for a process control block in Multiprogramming? Explain it in detail.

4. What is a thread? What are the benefits of multithreaded programming? Explain the many-to-many thread model.

5. Differentiate between a thread and a process. Give two advantages of a thread over multiple processes.

6. What is meant by a process? Explain the mechanism for process creation and process termination by the operating system.

7. Describe the actions taken by the kernel to switch content between processes.

8. Draw and describe the Process State Diagram.

9. Mention and explain the transitions of states in the process state diagram.

10. What are the differences between user-level threads and kernel-level threads? Under what circumstances is one better than the other?

11. Describe the actions taken by the thread library to context switch between user-level threads.

12. What is Interprocess Communication? Describe the types of Message Passing Systems. What is preemptive and non-preemptive scheduling?

13. What is TCB or PCB? Explain with a diagram.

14. How to create a child process from a parent process?

15. What are the different system calls in an operating system?

16. Explain the short-term scheduler, long-term scheduler, and medium-term scheduler in brief.

Unit 2

1. What is CPU Scheduling?
2. List and describe five scheduling criteria used in evaluating various scheduling policies.
3. What is meant by process priority?
4. What are the different types of priorities?
5. What role does priority play in process scheduling?
6. Differentiate between preemptive and non-preemptive scheduling.
7. Explain the multiple queuing scheduling algorithm.
8. What is context switching? Explain with an example.
9. What is dispatch latency? Describe the makeup of dispatch latency.
10. What are the CPU scheduling parameters?
11. Explain different types of CPU scheduling algorithms.
12. What relation holds between each pair of algorithms?
    a) Priority Scheduling algorithm and Shortest job first algorithm.
    b) Round robin Scheduling algorithm and Shortest job first algorithm.
    c) Priority Scheduling algorithm and First come first serve scheduling algorithm.
13. What are the scheduling queues and their role in process scheduling? Consider the following set of processes.
    Process  Arrival Time   Burst Time    Priority
    P1             0                       10            1
    P2             2                        1             3
    P3             3                        2              5
    P4             4                        1              1
    P5             5                        5              2
    a) Draw Gantt charts showing the execution of these processes using FCFS, SJF, RR, and priority scheduling schemes. (TQ=2MS)
    b) Compute the waiting and turnaround time for each process for each of the above schemes.
14. Consider the following set of processes:
    Process  Arrival Time   Burst Time  Priority
    P1             0                       7               5
    P2             3                       10             4
    P3             4                       5               3
    P4             5                       3               1
    P5             7                       4               2
    a) Draw Gantt charts showing the execution of these processes using FCFS, SJF, RR, and priority scheduling schemes. (TQ=4ms)
    b) Compute the waiting and turnaround time for each process for each of the above schemes.
15. What is multilevel queue scheduling? Explain with the help of a diagram.
16. What is multilevel feedback queue scheduling?
17. What is starvation and aging in an operating system?

Unit 3

1. What is a deadlock? Explain four necessary conditions for a deadlock to occur.
2. Describe in brief deadlock prevention.
3. Describe in brief deadlock detection & recovery.
4. What is semaphore? What operations are performed on semaphore?
5. What is a monitor? Write and explain the solution to the dining philosopher problem in brief using a monitor.
6. Differentiate between:
   6.1 Critical section and critical region
   6.2 Semaphore and monitor
   6.3 Deadlock prevention and deadlock avoidance
7. Elaborate with a diagram on the concept of a Resource Allocation Graph.
8. Explain various techniques used for deadlock recovery.
9. How are the wait/signal operations for a monitor different from those for semaphores?
10. List and explain various data structures used in the banker's algorithm.
11. Explain the safe state and unsafe state of the system.
12. Explain the Readers-Writers problem using semaphores.
13. List the three requirements that must be satisfied by the critical section problem.
14. What is the difference between synchronization and mutual exclusion?
15. What are various techniques used for deadlock detection? Consider the following snapshot of a system:
    ```
            Allocation       Max           Available
              A   B  C         A   B  C     A   B   C
    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
    ```
    Using the Banker's algorithm, find:
    - What is the content of matrix need?
    - Whether the system is in a safe state?
16. Consider the following snapshot of a system:
    ```
          Allocation    Max       Available
          A   B  C      A   B  C    A   B   C
    P0  1   1   2       4   3   3     2   1   0
    P1  2   1   2       3   2   2
    P2  4   0   1       9   0   2
    ```
    What is the Worst Fit algorithm?
17. Consider the following snapshot of a system:
    ```
       Allocation   Max   Available
       A   B   C     A   B   C     A   B   C
    P0  0   2   0     7   5   3     Best fit,
    P3  0   1   2     11   2   3     on to a of KB (in of most 4 page memory
    P4  1   1   2
    ```
    Given the order, 212, have the
    - Best fit,
    - Worst fit, and
    - First fit algorithms been used?

Unit 4

1. List and explain activities involved in Memory Management.
2. Explain the working of demand paging.
3. Explain virtual memory management in detail.
4. Explain memory protection by using relocation and limit registers as strategies used to solve the dynamic storage allocation problem (First fit, best fit, worst fit).
5. Describe paging using a translation look-aside buffer.
6. Explain LRU and Optimal page replacement algorithms.
7. What is locality of reference? How is this principle used in virtual memory? Calculate logical and physical address bits given a logical address space of 32 pages of 1024 words per page mapped to physical memory of 16 frames.
8. Differentiate between:
   a. Relocation and compaction.
   b. Paging and demand paging.
   c. Swapping and thrashing.
   d. Paging and segmentation.
   e. Logical and physical address.
9. What is thrashing? What are the causes of thrashing? How can the effects of thrashing be limited?
10. Given memory partitions of 100 KB, 500 KB, 200 KB, 300 KB, and 600 KB, how would each of the first fit, best fit, and worst fit algorithms place processors of sizes 417 KB, 112 KB, and 426 KB (in order)? Which algorithm makes efficient use of memory?
11. What is segmentation? Explain briefly the segmentation hardware.
12. How many page faults occur for the following reference string using frames: 1, 2, 3, 4, 5, 3, 4, 1, 6, 7, 8, 7, 8, 9, 7, 8, 9, 5, 4, 5, 4, 2? Use:
    a. LRU policy.
    b. Optimal policy.
13. For the page reference string 1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7 and three page frames, use FIFO, LRU, and Optimal page replacement policies. Find out which policy is best and why.
14. What are the actions taken by the operating system if a page fault occurs in the system?
15. How is logical to physical address translation done in paging? Explain with an example.
16. Describe the terms:
    a. Internal and external fragmentation.
    b. Dirty Page and Clean Page.

17. Consider the following segment table:
   
    Segment Base Length
           0 219 600
           1 2300 14
           2 90 100
           3 1327 580
           4 1952 96

   What are the physical addresses for the following logical addresses?
   a. 0430
   b. 110
   c. 2500
   d. 3400
   e. 4112

Unit 5

1. What are the different types of files? 
2. What are the functions of each type of file? 
3. Explain in brief the following allocation method: 
   a) Contiguous Allocation 
   b) Linked Allocation 
   c) Indexed Allocation 
4. Compare and contrast various techniques used for free space management. 
5. With the help of neat diagrams, explain index allocation and linked allocation of disk space to a file with advantages and disadvantages. 
6. Explain in brief the in-memory structure of a file system along with open, read, and close operations. 
7. What are shared files? How are shared files implemented? How is the deletion operation dealt with shared files? 
8. What is meant by consistency semantics? Explain the implementation in modern operating systems. 
9. Explain the different operations that need to be performed on a directory. 
10. With the help of neat diagrams, explain the following directory structures: 
    a) Tree structure 
    b) Acyclic graph 
11. List and explain the various file attributes. 
12. What are the different accessing methods of a file? 
13. Define UFD and MFD. 
14. What are the types of path names? Explain with examples. 
15. Explain the concept of file recovery. 
16. What are the functions of the Virtual File System (VFS)? 
17. Explain file system mounting and mount point. 
18. Explain single-level directory and two-level directory.

Unit 6

1. Consider the disk of 0 through 199 cylinders and the head is at 53. Let the pending requests are 98, 183, 37, 122, 14, 124, 65, 67. Compute the total number of cylinders traversed in the following scheduling:
   1.1. SSTF
   1.2. SCAN
   1.3. C-SCAN
   1.4. C-LOOK

2. Explain with a neat diagram the I/O hardware, explaining in brief the important components.

3. Explain in brief RAID level 3, level 4, and level 5 structures.

4. Describe the services provided by the kernel I/O subsystem.

5. Explain in brief swap space management.

6. Explain blocking I/O and non-blocking I/O.

7. Explain with an example the handshaking notion (polling) in brief.

8. What are boot blocks and bad blocks? Describe each in brief.

9. Describe spooling and device reservation.

10. Explain transforming I/O to hardware operations with the help of the life cycle of an I/O request.

11. Explain swap space management with the help of the BSD text-segment swap map.

12. Define an interrupt. Explain it in detail.

13. Explain disk management in detail.

14. Name and describe five major services provided by the kernel I/O subsystem.

15. What is a DMA Controller? Explain the various steps of the DMA transfer process.

16. Explain the application I/O interface.