2022 question paper

OPERATING SYSTEM

24 questions

  1. Q1a. What is the difference between a multiprocessor and a multicore system?20222m

    Module 1: Introduction

    What is the difference between a multiprocessor and a multicore system?

    View this question on its own page →
  2. Q1b. What is multiprogramming?20222m

    Module 1: Introduction

    What is multiprogramming?

    View this question on its own page →
  3. Q1c. Define jacketing.20222m

    Module 2: Processes

    Define jacketing.

    View this question on its own page →
  4. Q1d. What operations can be performed on a semaphore?20222m

    Module 3: Inter-process Communication

    What operations can be performed on a semaphore?

    View this question on its own page →
  5. Q1e. What is the difference between a page and a frame?20222m

    Module 5: Memory Management

    What is the difference between a page and a frame?

    View this question on its own page →
  6. Q1f. In contiguous memory allocation (i) each process is contained in a single contiguous section of memory (ii) all processes are contained in a single contiguous section of memory (iii) the memory space is contiguous (iv) None of the above20222m

    Module 5: Memory Management

    In contiguous memory allocation
    (i) each process is contained in a single contiguous section of memory
    (ii) all processes are contained in a single contiguous section of memory
    (iii) the memory space is contiguous
    (iv) None of the above

    View this question on its own page →
  7. Q1g. If the size of logical address space is 2^m, and a page size is 2^n addressing units, then the high order bits of a logical address designate the page number, and the low order bits designate the page offset. (i) m, n (ii) n, m (iii) m-n, m (iv) m-n, n20222m

    Module 5: Memory Management

    If the size of logical address space is 2^m, and a page size is 2^n addressing units, then the high order bits of a logical address designate the page number, and the low order bits designate the page offset.
    (i) m, n
    (ii) n, m
    (iii) m-n, m
    (iv) m-n, n

    View this question on its own page →
  8. Q1h. If the wait for graph contains a cycle, then (i) a deadlock does not exist (ii) a deadlock exists (iii) the system is in a safe state (iv) either deadlock exists or system is in a safe state20222m

    Module 4: Deadlocks

    If the wait for graph contains a cycle, then
    (i) a deadlock does not exist
    (ii) a deadlock exists
    (iii) the system is in a safe state
    (iv) either deadlock exists or system is in a safe state

    View this question on its own page →
  9. Q1i. When the event for which a thread is blocked occurs? (i) Thread moves to the ready queue (ii) Thread remains blocked (iii) Thread completes (iv) A new thread is provided20222m

    Module 2: Processes

    When the event for which a thread is blocked occurs?
    (i) Thread moves to the ready queue
    (ii) Thread remains blocked
    (iii) Thread completes
    (iv) A new thread is provided

    View this question on its own page →
  10. Q1j. An I/O port typically consists of four registers-status, control, ______ and ______ registers. (i) system in, system out (ii) data in, data out (iii) flow in, flow out (iv) input, output20222m

    Module 6: File Management

    An I/O port typically consists of four registers-status, control, ______ and ______ registers.
    (i) system in, system out
    (ii) data in, data out
    (iii) flow in, flow out
    (iv) input, output

    View this question on its own page →
  11. Q2a. What is the purpose of interrupts? What are the differences between a trap and an interrupt? Can traps be generated intentionally by a user program? If so, for what purpose?20227m

    Module 1: Introduction

    What is the purpose of interrupts? What are the differences between a trap and an interrupt? Can traps be generated intentionally by a user program? If so, for what purpose?

    View this question on its own page →
  12. Q2b. Answer the following with justifications: (i) Does swapping improve or degrade the efficiency of system utilization? (ii) Can swapping be used in a multi-programming system?20227m

    Module 5: Memory Management

    Answer the following with justifications:
    (i) Does swapping improve or degrade the efficiency of system utilization?
    (ii) Can swapping be used in a multi-programming system?

    View this question on its own page →
  13. Q3a. Including the initial parent process, how many processes are created by the program shown below? ``c #include<stdio.h> #include<unistd.h> int main() { /*fork a child process */ fork(); /* fork another child process*/ fork(); /* and fork another*/ fork(); return 0; } ``20227m

    Module 2: Processes

    Including the initial parent process, how many processes are created by the program shown below?

    #include<stdio.h>
    #include<unistd.h>
    int main()
    {
        /*fork a child process */
        fork();
        /* fork another child process*/
        fork();
        /* and fork another*/
        fork();
        return 0;
    }
    
    View this question on its own page →
  14. Q3b. Describe the differences among short-term, medium-term, and long-term scheduling.20227m

    Module 2: Processes

    Describe the differences among short-term, medium-term, and long-term scheduling.

    View this question on its own page →
  15. Q4a. An airline reservation system, using a centralized database service, processes user requests concurrently. Is it preferable to use threads rather than processes in this system? Give reasons for your answer.20227m

    Module 2: Processes

    An airline reservation system, using a centralized database service, processes user requests concurrently. Is it preferable to use threads rather than processes in this system? Give reasons for your answer.

    View this question on its own page →
  16. Q4b. Consider a system running ten I/O-bound tasks and one CPU-bound task. Assume that the I/O-bound tasks issue an I/O operation once for every millisecond of CPU computing and that each I/O operation takes 10 milliseconds to complete. Also assume that the context-switching overhead is 0.1 millisecond and that all processes are long-running tasks. Describe the CPU utilization for round-robin scheduler when: (i) the time quantum is 1 millisecond; (ii) the time quantum is 10 milli-seconds.20227m

    Module 2: Processes

    Consider a system running ten I/O-bound tasks and one CPU-bound task. Assume that the I/O-bound tasks issue an I/O operation once for every millisecond of CPU computing and that each I/O operation takes 10 milliseconds to complete. Also assume that the context-switching overhead is 0.1 millisecond and that all processes are long-running tasks. Describe the CPU utilization for round-robin scheduler when:
    (i) the time quantum is 1 millisecond;
    (ii) the time quantum is 10 milli-seconds.

    View this question on its own page →
  17. Q5a. Clearly justify why deadlocks cannot arise in a bounded buffer producers-consumers system.20227m

    Module 4: Deadlocks

    Clearly justify why deadlocks cannot arise in a bounded buffer producers-consumers system.

    View this question on its own page →
  18. Q5b. Consider a system consisting of four resources of the same type that are shared by three processes, each of which needs at most two resources. Show that the system is deadlock-free.20227m

    Module 4: Deadlocks

    Consider a system consisting of four resources of the same type that are shared by three processes, each of which needs at most two resources. Show that the system is deadlock-free.

    View this question on its own page →
  19. Q6. Five batch jobs, A through E, arrive at a computer center at essentially the same time. They have an estimated running time of 15, 9, 3, 6 and 12 minutes, respectively. Their (externally defined) priorities are 6, 3, 7, 9 and 4, respectively, with a lower value corresponding to a higher priority. For each of the following scheduling algorithms, determine the waiting time for each process and the average waiting for all jobs. Ignore process switching overhead. Explain how you arrived at your answers. In the last three cases, assume that only one job at a time runs until it finishes and that all jobs are completely processor bound: (a) Priority scheduling (b) FCFS (run in order 15, 9, 3, 6 and 12) (c) Shortest job first202214m

    Module 2: Processes

    Five batch jobs, A through E, arrive at a computer center at essentially the same time. They have an estimated running time of 15, 9, 3, 6 and 12 minutes, respectively. Their (externally defined) priorities are 6, 3, 7, 9 and 4, respectively, with a lower value corresponding to a higher priority.
    For each of the following scheduling algorithms, determine the waiting time for each process and the average waiting for all jobs. Ignore process switching overhead. Explain how you arrived at your answers. In the last three cases, assume that only one job at a time runs until it finishes and that all jobs are completely processor bound:
    (a) Priority scheduling
    (b) FCFS (run in order 15, 9, 3, 6 and 12)
    (c) Shortest job first

    View this question on its own page →
  20. Q7. A bridge on a busy highway is damaged by a flood. One-way traffic is to be instituted on the bridge by permitting vehicles traveling in opposite directions to use the bridge alternately. The following rules are formulated for use of the bridge: (a) At any time, the bridge is used by vehicle(s) traveling in one direction only. (b) If vehicles are waiting to cross the bridge at both ends, only one vehicle from one end is allowed to cross the bridge before a vehicle from the other end starts crossing the bridge. (c) If no vehicles are waiting at one end, then any numbers of vehicles from the other end are permitted to cross the bridge. Develop a concurrent system to implement these rules.202214m

    Module 3: Inter-process Communication

    A bridge on a busy highway is damaged by a flood. One-way traffic is to be instituted on the bridge by permitting vehicles traveling in opposite directions to use the bridge alternately. The following rules are formulated for use of the bridge:
    (a) At any time, the bridge is used by vehicle(s) traveling in one direction only.
    (b) If vehicles are waiting to cross the bridge at both ends, only one vehicle from one end is allowed to cross the bridge before a vehicle from the other end starts crossing the bridge.
    (c) If no vehicles are waiting at one end, then any numbers of vehicles from the other end are permitted to cross the bridge.
    Develop a concurrent system to implement these rules.

    View this question on its own page →
  21. Q8a. Consider a simple paging system with the following parameters: * 2^32 bytes of physical memory * Page size of 2^10 bytes * 2^16 pages of logical address space (i) How many bits are in a logical address? (ii) How many bytes are in a frame? (iii) How many bits in the physical address specify the frame? (iv) How many entries are in the page table?20227m

    Module 5: Memory Management

    Consider a simple paging system with the following parameters:

    • 2^32 bytes of physical memory
    • Page size of 2^10 bytes
    • 2^16 pages of logical address space

    (i) How many bits are in a logical address?
    (ii) How many bytes are in a frame?
    (iii) How many bits in the physical address specify the frame?
    (iv) How many entries are in the page table?

    View this question on its own page →
  22. Q8b. Given five memory partitions of 100 KB, 500 KB, 200 KB, 300 KB and 600 KB (in order). How would the first-fit, best-fit, and worst-fit algorithms place processes of 212 KB, 417 KB, 112 KB and 426 KB (in order)? Which algorithm makes the most efficient use of memory?20227m

    Module 5: Memory Management

    Given five memory partitions of 100 KB, 500 KB, 200 KB, 300 KB and 600 KB (in order). How would the first-fit, best-fit, and worst-fit algorithms place processes of 212 KB, 417 KB, 112 KB and 426 KB (in order)? Which algorithm makes the most efficient use of memory?

    View this question on its own page →
  23. Q9a. Consider a demand-paging system with a paging disk that has an average access and transfer time of 20 milli-seconds. Addresses are translated through a page table in main memory, with an access time of 1 microsecond per memory access. Thus, each memory reference through the page table takes two accesses. To improve this time, we have added an associative memory that reduces access time to one memory reference if the page-table entry is in the associative memory. Assume that 80 percent of the accesses are in the associative memory and that of those remaining, 10 percent (or 2 percent of the total) cause page faults. What is the effective memory access time?20227m

    Module 5: Memory Management

    Consider a demand-paging system with a paging disk that has an average access and transfer time of 20 milli-seconds. Addresses are translated through a page table in main memory, with an access time of 1 microsecond per memory access. Thus, each memory reference through the page table takes two accesses. To improve this time, we have added an associative memory that reduces access time to one memory reference if the page-table entry is in the associative memory.
    Assume that 80 percent of the accesses are in the associative memory and that of those remaining, 10 percent (or 2 percent of the total) cause page faults. What is the effective memory access time?

    View this question on its own page →
  24. Q9b. The open-file table is used to maintain information about files that are currently open. Should the operating system maintain a separate table for each user or just maintain one table that contains references to files that are currently being accessed by all users? If the same file is being accessed by two different programs or users, should there be separate entries in the open-file table?20227m

    Module 6: File Management

    The open-file table is used to maintain information about files that are currently open. Should the operating system maintain a separate table for each user or just maintain one table that contains references to files that are currently being accessed by all users? If the same file is being accessed by two different programs or users, should there be separate entries in the open-file table?

    View this question on its own page →