# Recent questions and answers in Operating System

1
A processor uses $36$ bit physical address and $32$ bit virtual addresses, with a page frame size of $4$ Kbytes. Each page table entry is of size $4$ ... level page tables are respectively $\text{20,20,20}$ $\text{24,24,24}$ $\text{24,24,20}$ $\text{25,25,24}$
1 vote
2
One of the disadvantages of user level threads compared to Kernel level thread is If a user level thread of a process executes a system call, all threads in that process are blocked. Scheduling is application dependent. Thread switching doesn’t require kernel mode privileges. The library procedures invoked for thread management in user level threads are local procedures.
3
Match the following for Unix file system : ... Codes: a-iii, b-i, c-ii, d-iv a-iii, b-i, c-iv, d-ii a-iv, b-iii, c-ii, d-i a-iv, b-iii, c-i, d-ii
4
Which two are valid constructions for Thread? Thread(Runnable r, String name) Thread() Thread(int priority) Thread(Runnable r, ThreadGroup g) Thread(Runnable r, int priority) $1$ and $3$ $2$ and $4$ $1$ and $2$ $2$ and $5$
5
Consider the following CPU processes with arrival times (in milliseconds) and length of CPU bursts (in milliseconds) as given below: ... remaining time first scheduling algorithm is used to schedule the processes, then the average waiting time across all processes is _____________ milliseconds.
6
Consider the below program as two concurrent processes: Semaphore x:= 0; P1: repeat forever P2: repeat forever 1.V(x); 4. P(x); 2.Compute; 5.Compute; 3.P(x); 6.V(x); Consider the following statements about process P1 & P2: (1) It is possible for process P1 to ... never get the chance to run , and it wil starve (THIS IS WHAT I THOUGHT THE ANSWER SHOULD BE , PLEASE COMMENT, IF I AM WRONG ANYWHERE)
7
Which scheduling policy is most suitable for Real time operating systems? FCFS LCFS Round Robin Priority
8
Consider the processes P1, P2, P3, P4 whose arrival times are 0, 1, 2, 3 and Burst times are 5, 2, 13, 7. If the Context Switching time is 1 unit (ms), what is the average waiting time if Shortest Job Next scheduling algorithm is used? (a) 7.5 (b) 6.25 (c) 6.5 (d) None (The Doubt i am facing here is , would we be covering the context switching time in the starting ?)
1 vote
9
Consider the following three processes with the arrival time and CPU burst time given in miliseconds: Process Arrival Time Burst Time $P_1$ 0 7 $P_2$ 1 4 $P_3$ 2 8 The Gantt Chart for preemptive SJF scheduling algorithm is _______
10
11
Consider a uniprocessor system executing three tasks $T_{1}, T_{2}$ and $T_{3}$ each of which is composed of an infinite sequence of jobs (or instances) which arrive periodically at intervals of $3$, $7$ and $20$ milliseconds, respectively ... the 1st millisecond and task preemptions are allowed, the first instance of $T_{3}$ completes its execution at the end of_____________________milliseconds.
12
A scheduling algorithm assigns priority proportional to the waiting time of a process. Every process starts with priority zero (the lowest priority). The scheduler re-evaluates the process priorities every $T$ time units and decides the next process to ... algorithm is equivalent to the shortest-job-first algorithm. This algorithm is equivalent to the shortest-remaining time-first algorithm.
1 vote
13
Consider the following piece of C code: void main( ) { fork( ); fork( ); exit( ); } How many child processes are created upon execution of this program?
14
A processor uses $\text{2-level}$ page tables for virtual to physical address translation. Page tables for both levels are stored in the main memory. Virtual and physical addresses are both $32$ bits wide. The memory is byte addressable. For virtual to physical address translation, the $10$ most ... the page tables of this process is $\text{8 KB}$ $\text{12 KB}$ $\text{16 KB}$ $\text{20 KB}$
15
Mutual Exclusion is important for deadlock to happen. Is this statement necessarily true always ?
16
Match $\text{List I}$ with $\text{List II}$ ... C-III, D-IVA-II, B-IV, C-III, D-IA-II, B-IV, C-I, D-IIIA-IV, B-III, C-II, D-I$Match$
17
18
A hard disk has $63$ sectors per track, $10$ platters each with $2$ recording surfaces and $1000$ cylinders. The address of a sector is given as a triple $\langle c, h, s \rangle$, where $c$ is the cylinder number, $h$ is the surface number and $s$ is the sector number. Thus, the ... is $\langle 0, 15, 31 \rangle$ $\langle 0, 16, 30 \rangle$ $\langle 0, 16, 31 \rangle$ $\langle 0, 17, 31 \rangle$
19
Normally user programs are prevented from handling I/O directly by I/O instructions in them. For CPUs having explicit I/O instructions, such I/O protection is ensured by having the I/O instruction privileged. In a CPU with memory mapped I/O, there is no explicit ... (s) I/O protection is ensured by a hardware trap I/O protection is ensured during system configuration I/O protection is not possible
20
One way to prevent deadlocks is to eliminate the hold-and-wait condition. In the text it was proposed that before asking for a new resource, a process must first release whatever resources it already holds (assuming that is possible). However, doing so introduces ... that it may get the new resource but lose some of the existing ones to competing processes. Propose an improvement to this scheme.
21
P0: P(S), P(Q), Print(“Hello”), V(Q), V(S) P1: P(Q), P(S), Print(“Hi”), V(Q), V(S) Where S & Q are two semaphores initialized to 1. In the above situation: (a) Deadlock may occur (b) Bounded Waiting is satisfied (c) Deadlock never occurs d) Both (a)&(b)
22
Which of the following allocation scheme does not support direct access in file allocation scheme? (a)Linked Allocation (b)Indexed Allocation (c)Contiguous Allocation both (a) and (b)
1 vote
23
Suppose the following jobs are to be executed in a uniprocessor system. Assume the overhead of context switching is one time unit. The average process turnaround time, thenormalized turnaround time for process 2, and the processor efficiency using SRTF is, a. 11.4, 2, 83.3% b. 18.6, 3.375 ... .8, 1.625, 83.3% d. 11.6, 3.75, 80.6% Does we have to count the context switch for the first process also?
24
A shared variable $x$, initialized to zero, is operated on by four concurrent processes $W, X, Y, Z$ as follows. Each of the processes $W$ and $X$ reads $x$ from memory, increments by one, stores it to memory, and then terminates. Each of the processes $Y$ and $Z$ ... $S$ is initialized to two. What is the maximum possible value of $x$ after all processes complete execution? $-2$ $-1$ $1$ $2$
25
Which of the following scheduling algorithms is non-preemptive? Round Robin First-In First-Out Multilevel Queue Scheduling Multilevel Queue Scheduling with Feedback
26
Consider a hypothetical machine with $3$ pages of physical memory, $5$ pages of virtual memory, and $<A, B, C, D, A, B, E, A, B, C, D, E, B, A, B>$ as the stream of page reference by an application. If $P$ and $Q$ are the number of page faults that the application ... respectively, then $(P,Q)=$ _______(Assuming enough space for storing $3$ page frames) $(11,10)$ $(12,11)$ $(10,11)$ $(11,12)$
27
Consider a disk system having $60$ cylinders. Disk requests are received by a disk drive for cylinders $10,22,20,2,40,6$ and $38$, in that order. Assuming the disk head is currently at cylinder $20$, what is the time taken to satisfy all the ... cylinder to adjacent one and Shortest Seek Time First (SSTF) algorithm is used? $240$ milliseconds $96$ milliseconds $120$ milliseconds $112$ milliseconds
28
Suppose you have a Linux file system where the block size is $2K$ bytes, a disk address is $32$ bits, and an $i-$node contains the disk addresses of the first $12$ direct blocks of file, a single indirect block and a double indirect block. Approximately, what is the largest file that can be represented by an $i-$node? $513$ Kbytes $513$ MBytes $537$ Mbytes $537$ KBytes
29
Consider a single-level page table system, with the page table stored in the memory. If the hit rate to TLB is $80\%$, and it takes $15$ nanoseconds to search the $TLB$, and $150$ nanoseconds to access the main memory, then what is the effective memory access time, in nanoseconds? $185$ $195$ $205$ $175$
1 vote
30
Assuming that the system call $\text{fork}()$ never fails, consider the following C program $P1$ and $P2$ ... Both Statement $I$ and Statement $II$ are false Statement $I$ is correct but Statement $II$ is false Statement $I$ is incorrect but Statement $II$ is true
31
Comprehension: For the question given below: concern a disk with a sector size of $512$ bytes, $2000$ tracks per surface, $50$ sectors per track, five double-sided platters, and average seek time of $10$ milliseconds. If $T$ is the capacity of a track in bytes, and $S$ is the capacity of each surface in ... $(T,S)=$ _______ $(50 K, 50000 K)$ $(25 K, 25000 K)$ $(25 K, 50000 K)$ $(40 K, 36000 K)$
32
Comprehension: For the question given below: concern a disk with a sector size of $512$ bytes, $2000$ tracks per surface, $50$ sectors per track, five double-sided platters, and average seek time of $10$ milliseconds. What is the capacity of the disk, in bytes? $25,000 K$ $500,000 K$ $250,000 K$ $50,000 K$
33
Comprehension: For the question given below: concern a disk with a sector size of $512$ bytes, $2000$ tracks per surface, $50$ sectors per track, five double-sided platters, and average seek time of $10$ milliseconds. Given below are two statements: Statement $I$: The ... $II$ are false Statement $I$ is correct but Statement $II$ is false Statement $I$ is incorrect but Statement $II$ is true
34
Comprehension: For the question given below, concern a disk with a sector size of $512$ bytes, $2000$ tracks per surface, $50$ sectors per track, five double-sided platters, and average seek time of $10$ milliseconds. If the disk platters rotate at $5400$ rpm ( ... minute), then approximately what is the maximum rotational delay? $0.011$ seconds $0.11$ seconds $0.0011$ seconds $1.1$ seconds
35
For the question given below, concern a disk with a sector size of $512$ bytes, $2000$ tracks per surface, $50$ sectors per track, five double-sided platters, and average seek time of $10$ milliseconds. If one track of data can be transferred per revolution, then what is the data transfer rate? $2,850$ KBytes/second $4,500$ KBytes/second $5,700$ KBytes/second $2,250$ KBytes/second
36
The file manager is responsible for naming files saving files deleting files all of these
37
In real-time operating systems, which of the following is the most suitable scheduling scheme? round-robin first-come-first-served preemptive random scheduling
If there are $32$ segments, each of size $1$ K byte, then the logical address should have $13 \text{ bits}$ $14 \text{ bits}$ $15 \text{ bits}$ $16 \text{ bits}$
The seek time of a disk is $30$ ms. It rotates at the rate of $30$ rotations/second. The capacity of each track is $300$ words. The access time is (approximately) $62$ ms $60$ ms $50$ ms $47$ ms
The address sequence generated by tracing a particular program executing in a pure demand paging system with $100$ records per page, with $1$ free main memory frame is recorded as follows. What is the number of Page Faults? $0100,0200,0430,0499,0510,0530,0560,0120,0220,0240,0260,0320,0370.$ $15,4$ $6,4$ $7,2$ $4,6$