Operating System - B.Tech 4th Semester Examination, 2024

2024Semester 2Civil-CAEnd Semester
Bihar Engineering University, Patna
B.Tech 4th Semester Examination, 2024

Operating System

Time: 03 HoursCode: 105403Full Marks: 70

Instructions:

  1. The marks are indicated in the right-hand margin.
  2. There are NINE questions in this paper.
  3. Attempt FIVE questions in all.
  4. Question No. 1 is compulsory.
Q.1 Choose the correct answer of the following (any seven question only):[2x7=14]
  1. A _____ process is moved to the ready state when its time quantum expires.

    1. Blocked
    2. New
    3. Running
    4. Suspended
  2. Which of the following is also called job scheduler?

    1. DMA controller
    2. Short-term scheduler
    3. CPU scheduler
    4. Long-term scheduler
  3. Compaction is used to solve the problem of

    1. External fragmentation
    2. Internal fragmentation
    3. both (i) and (ii)
    4. None of these
  4. Which process can be affected by other processes executing in the system?

    1. Independent process
    2. Co-operative process
    3. Dependent Process
    4. child process
  5. What is the drawback of banker's algorithm?

    1. in advance processes rarely know how much resource they will need
    2. the number of processes changes as time progresses
    3. resource once available can disappear
    4. all of the mentioned
  6. An I/O port typically consists of four registers- status, control, _____ and _____ registers.

    1. system in, system out
    2. flow in, flow out
    3. data in, data out
    4. input, output
  7. The address loaded into the memory address register of the memory is referred to as

    1. Physical address
    2. IP address
    3. Port address
    4. Logical address
  8. Consider a disk queue with requests for I/O to blocks on cylinders: 98, 183, 37, 122, 14, 124, 65, 67. Considering FCFS (first cum first served) scheduling, the total number of head movements is, if the disk head is initially at 53 is?

    1. 600
    2. 630
    3. 620
    4. 640
  9. The Trap mode bit changes from 0 to 1 when _____ mode switches to _____ mode.

    1. Kernel, User
    2. User, User
    3. Kernel, Kernel
    4. User, Kernel
  10. Waiting Time is calculated as

    1. Turnaround Time - Burst Time
    2. Turnaround Time - Arrival Time
    3. Completion Time - Arrival Time
    4. Completion Time - Burst Time
Q.2 Solve both questions :[7+7=14]
  1. Define Thread? List some of the benefits of multithreading. Demonstrate the three methods to implement Threads.

  2. Assume the following workload in a system:

    Process Arrival Time Burst Time
    P0 1 3
    P1 0 6
    P2 3 2
    P3 4 7
    P4 2 8
    P5 6 5

    Illustrating the execution of these job using Round Robin Scheduling algorithm calculate when given Time Quantum = 3:
    (i) Average Turn Around Time
    (ii) Average Waiting Time

Q.3 Solve both questions :[7+7=14]
  1. Differentiate between:
    (i) User level Thread and Kernel level Thread
    (ii) Contiguous and Indexed allocation method
    (iii) Preemptive scheduling and Non-preemptive scheduling

  2. How is a process different from a program? With an example explain why Process synchronization is necessary in multiprocessing operating system?

Q.4 Solve both questions :[14]
  1. Describe the techniques for recovery from deadlock? Explain briefly resource allocation graph with examples.

  2. Consider a disk queue with requests for I/O to blocks on cylinders: 98, 183, 37, 122, 14, 124, 65, 67. Considering SSTF (shortest seek time first) scheduling, the total number of head movements is, if the disk head is initially at 53 is?

Q.5 Solve both questions :[7+7=14]
  1. What is the difference between fixed partition and variable partition also explains the need of compaction.

  2. What is virtual memory? How is it implemented? Explain TLB in virtual memory with neat diagram.

Q.6 Solve both questions :[7+7=14]
  1. What is Reader-Writer problem? Explain how Semaphore is used to resolve the problem of process synchronization.

  2. What is Belady's Anomaly? Why LRU and Optimal Page Replacement algorithm doesn't suffer from this problem.

Q.7 Solve both questions :[7+7=14]
  1. Compare and contrast Deadlock Prevention and Deadlock Avoidance. Can a system be in a state that is neither deadlock nor safe? If so, give an example. If not, prove that all states are either deadlock or safe.

Q.8 Solve this question :[14]
  1. Consider the following page reference string: 3, 4, 2, 1, 5, 5, 6, 2, 1, 2, 3, 7, 6, 3, 3, 2, 1, 2, 3, 6. Compare the page faults occur for the following replacement algorithms using four frames? Assume, initially all the frames are empty.
    (i) LRU replacement
    (ii) FIFO Replacement

Q.9 Write short notes on any two of the following:-[7x2=14]
    • Dispatcher and Scheduler
    • Starvation and Aging
    • Paging and Segmentation
    • Semaphore and Mutex