search
Log In

Recent questions and answers in Operating System

2 votes
3 answers
1
In the context of operating systems, which of the following statements is/are correct with respect to paging? Paging helps solve the issue of external fragmentation Page size has no impact on internal fragmentation Paging incurs memory overheads Multi-level paging is necessary to support pages of different sizes
answered Jun 13 in Operating System Arjun 1.3k views
1 vote
2 answers
2
Which of the following statement(s) is/are correct in the context of $\text{CPU}$ scheduling? Turnaround time includes waiting time The goal is to only maximize $\text{CPU}$ utilization and minimize throughput Round-robin policy can be used even when the $\text{CPU}$ time required by each of the processes is not known apriori Implementing preemptive scheduling needs hardware support
answered Jun 13 in Operating System Arjun 995 views
3 votes
2 answers
3
Consider a computer system with multiple shared resource types, with one instance per resource type. Each instance can be owned by only one process at a time. Owning and freeing of resources are done by holding a global lock $(L)$. The following scheme ... deadlocks will not occur The scheme may lead to live-lock The scheme may lead to starvation The scheme violates the mutual exclusion property
answered Jun 13 in Operating System Arjun 925 views
5 votes
3 answers
4
consider a system using 2 level paging applicable page table is divided into 2K pages each of size 4 KB. if pas is 64 MB which is divided into 16K frames memory is byte addressable . page tabke entry size is 2 bytes in both the levels calculate the length of logical and physical address. total number of entry at second level
answered Jun 13 in Operating System prkshprasad1 3.9k views
36 votes
6 answers
6
A user level process in Unix traps the signal sent on a Ctrl-C input, and has a signal handling routine that saves appropriate files before terminating the process. When a Ctrl-C input is given to this process, what is the mode in which the signal handling routine executes? User mode Kernel mode Superuser mode Privileged mode
answered Jun 11 in Operating System HitechGa 6.2k views
2 votes
2 answers
7
0 votes
1 answer
8
Suppose that the running time for each process in milliseconds is an exponential random variable with parameter λ=1/20. If process P1 arrives immediately ahead of the process P2 in the running state, then the probability that process P2 will have to wait more than 20 milliseconds is _____________ . A 0.274 B 0.324 C 0.428 D 0.368 How to approach this. even not able to understand the question.
answered Jun 2 in Operating System Pavankumar07 155 views
0 votes
1 answer
9
The read system call to fetch data from a file always blocks the invoking process.[True / False] [blocking means context switching to another process]
answered May 24 in Operating System afroze 59 views
1 vote
1 answer
10
Consider three processes (process id $0,1,2$ respectively) with compute time bursts $2,4$ and $8$ time units. All processes arrive at time zero. Consider the Longest Remaining Time First (LRTF) scheduling algorithm. In LRTF ties are broken by giving priority to the process with the lowest process id. The average turn around time is $13$ units $14$ units $15$ units $16$ units
answered May 24 in Operating System gateankit 526 views
3 votes
3 answers
11
Consider the following pseudocode, where $\textsf{S}$ is a semaphore initialized to $5$ in line $\#2$ and $\textsf{counter}$ is a shared variable initialized to $0$ in line $\#1$. Assume that the increment operation in line $\#7$ is $\textit{not}$ ... $0$ after all the threads successfully complete the execution of $\textsf{parop}$ There is a deadlock involving all the threads
answered May 23 in Operating System sanbaner 1.6k views
35 votes
7 answers
12
Consider the following two-process synchronization solution. ... two- process synchronization solution. This solution violates mutual exclusion requirement. This solution violates progress requirement. This solution violates bounded wait requirement.
answered May 22 in Operating System ayush29azad-IIT 8.3k views
58 votes
7 answers
13
The $P$ and $V$ operations on counting semaphores, where s is a counting semaphore, are defined as follows: $P(s):$ $s=s-1;$ If $s < 0$ then wait; $V(s):$ $s=s+1;$ If $s \leq0$ then wake up process waiting on s; Assume that $P_b$ and $V_b$ the wait and signal operations on ... $x_b$ and $y_b$ are respectively $0$ and $0$ $0$ and $1$ $1$ and $0$ $1$ and $1$
answered May 22 in Operating System sanbaner 13.8k views
61 votes
6 answers
14
Let the time taken to switch from user mode to kernel mode of execution be $T1$ while time taken to switch between two user processes be $T2$. Which of the following is correct? $T1 > T2$ $T1 = T2$ $T1 < T2$ Nothing can be said about the relation between $T1$ and $T2$
answered May 18 in Operating System dhritippaul 15k views
1 vote
3 answers
15
At a particular time of computation, the value of a counting semaphore is $7$. Then $20 \ P$ (wait) operations and $15 \ V$ (signal) operations are completed on this semaphore. What is the resulting value of the semaphore? $28$ $12$ $2$ $42$
answered May 16 in Operating System Hira Thakur 1.6k views
1 vote
3 answers
16
In a particular system it is observed that, the cache performance gets improved as a result of increasing the block size of the cache. The primary reason behind this is : Programs exhibits temporal locality Programs have small working set Read operation is frequently required rather than write operation Programs exhibits spatial locality
answered May 15 in Operating System Raavi Karthik 484 views
1 vote
3 answers
17
Consider the following functions $f()$ and $g().$ f(){ w = 3; w = 4; } g(){ z = w; z = z + 2*w; print(z); } We start with $w$ set to $0$ and execute $f()$ and $g()$ in parallel-that is, at each step we either execute one statement from $f()$ or one statement from $g()$. What is the set of possible values printed by $g()?$ $0,9,12$ $0,8,9,12$ $0,6,8,9,11,12$ $0,4,6,9,10,12$
answered May 9 in Operating System Hira Thakur 262 views
4 votes
5 answers
18
4 votes
4 answers
19
1 vote
3 answers
20
Consider the following multi-threaded code segment (in a mix of C and pseudo-code), invoked by two processes $P_1$ and $P_2$, and each of the processes spawns two threads $T_1$ and $T_2$: int x = 0; // global Lock L1; // global main () { create a thread to execute foo() ... will print the value of $y$ as $2.$ Both $T_1$ and $T_2$, in both the processes, will print the value of $y$ as $1.$
answered May 3 in Operating System Yash4444 1.1k views
0 votes
1 answer
21
Q1: SAFE OR NOT?? i have doubt with the answer given becz i am getting safe for question 1 and unsafe for question 2 but opposite answer is given in test series/.
answered Apr 28 in Operating System Shubham4070 210 views
4 votes
4 answers
24
Consider the following page reference string. $1\ 2\ 3\ 4\ 2\ 1\ 5\ 6\ 2\ 1\ 2\ 3\ 7\ 6\ 3\ 2\ 1\ 2\ 3\ 6\ $ What are the minimum number of frames required to get a single page fault for the above sequence assuming LRU replacement strategy? $7$ $4$ $6$ $5$
answered Apr 24 in Operating System Shubham4070 2.1k views
1 vote
1 answer
25
Suppose that a machine has $438-bit$ virtual addresses and $32-bit$ physical addresses. What is the main advantage of a multilevel page table over a single-level one? With a two-level page table, $16-KB$ pages, and $4-byte$ entries, how many bits should be allocated for the top-level page table field and how many for the next level page table field? Explain.
answered Apr 23 in Operating System kranti 112 views
2 votes
1 answer
26
Consider a system having $10$ IO bound jobs and $1$ CPU bound job.. If IO bound job issue an IO request once for every ms of CPU computation and that each IO request takes $10$ ms. If context switch overhead is $0.1$ ms.Using round -robin scheduling with a time quantum of $10$ ms. , the CPU efficiency is __________________
answered Apr 17 in Operating System mohit rathore 411 views
0 votes
4 answers
27
Consider the following four processes with their corresponding arrival time and burst time: $\begin{array} \text{Process}&\text{Arrival time}&\text{Burst time(in ms)}\\ \text{P1}&0.0&8\\ \text{P2}&0.6&6\\ \text{P3}&3.8&4\\ \text{P4}&4.4&2\end{array}$ What is the average turn around time (in ms) for these processes using FCFS scheduling algorithm? $15$ $12.8$ $13$ none of the options
answered Apr 17 in Operating System mohit rathore 794 views
1 vote
3 answers
28
Starvation can be avoided by which of the following statements: By using shortest job first resource allocation policy . By using first come first serve resources allocation policy. (i) only (i) and (ii) only (ii) only None of the options
answered Apr 17 in Operating System mohit rathore 387 views
4 votes
3 answers
29
Process is in a ready state _______ . when process is scheduled to run after some execution when process is unable to run until some task has been completed when process is using the $CPU$ none of the options
answered Apr 16 in Operating System Bikki_gupta 845 views
2 votes
2 answers
30
Three CPU-bound tasks, with execution times of $15,12$ and $5$ time units respectively arrive at times $0,t$ and $8$, respectively. If the operating system implements a shortest remaining time first scheduling algorithm, what should be the value of $t$ to have $4$ context switches? Ignore the context switches at time $0$ and at the end. $0<t<3$ $t=0$ $t<=3$ $3<t<8$
answered Apr 4 in Operating System heisenberggg 1.1k views
1 vote
3 answers
31
Jobs keep arriving at a processor. A job can have an associated time length as well as a priority tag. New jobs may arrive while some earlier jobs are running. Some jobs may keep running indefinitely. A ... the following job-scheduling policies is starvation free? Round - robin Shortest job first Priority queuing Latest job first None of the others
answered Apr 4 in Operating System heisenberggg 303 views
5 votes
3 answers
32
Consider the following set of processes, assumed to have arrived at time $0$. Consider the CPU scheduling algorithms Shortest Job First (SJF) and Round Robin (RR). For RR, assume that the processes are scheduled in the order$P_1, P_2, P_3, P_4$ ... absolute value of the difference between the average turnaround times (in ms) of SJF and RR (round off to $2$ decimal places is_______
answered Apr 4 in Operating System heisenberggg 4.3k views
5 votes
5 answers
33
Consider the following statements about process state transitions for a system using preemptive scheduling. A running process can move to ready state. A ready process can move to running state. A blocked process can move to running state. A blocked process can move to ready state. Which of the above statements are TRUE? I, II, and III only II and III only I, II, and IV only I, II, III and IV only
answered Apr 4 in Operating System heisenberggg 5.3k views
0 votes
1 answer
34
Names of some of the Operating Systems are given below: MS-DOS XENIX OS/$2$ In the above list, following operating systems didn’t provide multiuser facility. (a) only (a) and (b)only (b) and (c) only (a),(b) and (c)
answered Apr 3 in Operating System heisenberggg 92 views
0 votes
1 answer
35
Which statements is not correct about “init” process in Unix? It is generally the parent of the login shell. It has PID $1$. It is the first process in the system. Init forks and execs a ‘getty’ process at every port connected to a terminal.
answered Apr 3 in Operating System heisenberggg 159 views
1 vote
1 answer
36
Consider three CPU-intensive processes, which require $10,20$ and $30$ time units and arrive at times $0,2$ and $6$, respectively. How many context switches are needed if the operating system implements a shortest remaining time first scheduling algorithm? Do not count the context switches at time zero and at the end. $1$ $2$ $3$ $4$
answered Apr 3 in Operating System heisenberggg 432 views
1 vote
1 answer
37
Consider three processes, all arriving at time zero, with total execution time of $10,20$ and $30$ units, respectively. Each process spends the first $20\%$ of execution time doing I/O, the next $70\%$ of time doing computation, and the last $10\%$ of time doing I/O again. The ... as much as possible. For what percentage of time does the CPU remain idle? $0\%$ $10.6\%$ $30.0\%$ $89.4\%$
answered Apr 3 in Operating System heisenberggg 283 views
0 votes
2 answers
38
Determine the number of page faults when references to pages occur in the following order: $1,2,4,5,2,1,2,4$. Assume that the main memory can accommodate $3$ pages and the main memory already has the pages $1$ and $2$, with page $1$ having been brought earlier than page $2$.(LRU algorithm is used). $3$ $5$ $4$ None of these.
answered Apr 3 in Operating System heisenberggg 280 views
3 votes
2 answers
40
To see more, click for all the questions in this category.
...