2022 question paper
OPERATING SYSTEM
24 questions
Q1a. What is the difference between a multiprocessor and a multicore system?20222m
Module 1: Introduction
View this question on its own page →What is the difference between a multiprocessor and a multicore system?
Q1b. What is multiprogramming?20222m
Q1c. Define jacketing.20222m
Q1d. What operations can be performed on a semaphore?20222m
Module 3: Inter-process Communication
View this question on its own page →What operations can be performed on a semaphore?
Q1e. What is the difference between a page and a frame?20222m
Module 5: Memory Management
View this question on its own page →What is the difference between a page and a frame?
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
View this question on its own page →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 aboveQ1g. 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
View this question on its own page →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, nQ1h. 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
View this question on its own page →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 stateQ1i. 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
View this question on its own page →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 providedQ1j. 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
View this question on its own page →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, outputQ2a. 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
View this question on its own page →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?
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
View this question on its own page →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?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
View this question on its own page →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; }Q3b. Describe the differences among short-term, medium-term, and long-term scheduling.20227m
Module 2: Processes
View this question on its own page →Describe the differences among short-term, medium-term, and long-term scheduling.
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
View this question on its own page →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.
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
View this question on its own page →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.Q5a. Clearly justify why deadlocks cannot arise in a bounded buffer producers-consumers system.20227m
Module 4: Deadlocks
View this question on its own page →Clearly justify why deadlocks cannot arise in a bounded buffer producers-consumers system.
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
View this question on its own page →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.
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
View this question on its own page →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 firstQ7. 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
View this question on its own page →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.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
View this question on its own page →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?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
View this question on its own page →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?
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
View this question on its own page →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?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
View this question on its own page →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?