search
Log In

Recent questions and answers in Operating System

7 votes
1 answer
1
S1: Context Switching occurs only in kernel mode. :TRUE S2: Context Switching in user mode is faster as compared to context switching in kernel mode. : TRUE If Context Switching occurs only in kernel mode, then how is CS in user mode faster as compared to that ... , perform context switching and then change back to user mode which means more time should be taken as compared to CS in kernel mode.
answered 1 day ago in Operating System Mohnish 717 views
0 votes
1 answer
2
Free disk space can be kept track of using a free list or a bitmap. Disk addresses require $D$ bits. For a disk with $B$ blocks, $F$ of which are free, state the condition under which the free list uses less space than the bitmap. For $D$ having the value $16$ bits, express your answer as a percentage of the disk space that must be free.
answered 2 days ago in Operating System Avinash Singh Kushwa 33 views
57 votes
8 answers
3
Consider a hard disk with $16$ recording surfaces $(0-15)$ having 16384 cylinders $(0-16383)$ and each cylinder contains $64$ sectors $(0-63)$. Data storage capacity in each sector is $512$ bytes. Data are organized cylinder-wise and the addressing format is <cylinder no., ... is the cylinder number of the last sector of the file, if it is stored in a contiguous manner? $1281$ $1282$ $1283$ $1284$
answered 2 days ago in Operating System Kushagra गुप्ता 11.1k views
25 votes
4 answers
4
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 4 days ago in Operating System Jatin Gupta 4.5k views
32 votes
6 answers
5
Let a memory have four free blocks of sizes $4k$, $8k$, $20k$, $2k$ ... $J7$ will be completed will be $16$ $19$ $20$ $37$
answered 5 days ago in Operating System Abir Mazumder 6.9k views
0 votes
3 answers
6
In real-time operating systems, which of the following is the most suitable scheduling scheme? round-robin first-come-first-served preemptive random scheduling
answered Aug 3 in Operating System sarvesh12369 180 views
0 votes
1 answer
7
Consider the following two-dimensional array: int X[64][64]; Suppose that a system has four page frames and each frame is $128$ words (an integer occupies one word). Programs that manipulate the $X$ array fit into exactly one page and always occupy page $0.$ The data are swapped in and out of the other three frames ... B for (int i = 0; i < 64; i++) for (int j = 0; j < 64; j++) X[i][j] = 0;
answered Aug 2 in Operating System shaktipratap 56 views
80 votes
9 answers
8
A processor uses $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 ... access a virtual address is approximately (to the nearest $0.5$ ns) $1.5$ ns $2$ ns $3$ ns $4$ ns
answered Jul 28 in Operating System shashankrustagi2021 16.8k views
6 votes
5 answers
9
LRTF ( LONGEST REMAINING TIME FIRST ALGORITHM ) causes starvation or not. please explain.
answered Jul 27 in Operating System avi_nex 1.7k views
34 votes
6 answers
10
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$
answered Jul 25 in Operating System ATHY02 7.3k views
0 votes
1 answer
11
1 vote
4 answers
12
Consider a uni-processor system executing four tasks T1, T2, T3, T4 each of which is composed of 10 sequence of jobs which arrive periodically at interval of 2, 4, 8, 16 ms resp. The priority of each task is directly proportional to its period and available tasks are ... 6 ms resp. Given all tasks initially arrive at t=0, the 2nd instance of T3 completes its execution at the end of ______ ms.
answered Jul 20 in Operating System Mohnish 435 views
9 votes
3 answers
13
How many times ‘4’ will be printed ? int main() { if (fork() && (!fork())) { if (fork() || fork()) { fork(); } } printf("4 "); return 0; } How to approach these kind of questions using Tree structure ??
answered Jul 19 in Operating System Sachin649 768 views
39 votes
5 answers
16
The following two functions $P1$ and $P2$ that share a variable $B$ with an initial value of $2$ ... $B$ can possibly take after the execution is______________________.
answered Jul 13 in Operating System sujithrkumar 4.2k views
0 votes
1 answer
17
If the main memory is of 8K bytes and the cache memory is of 2K words. It uses associative mapping. Then each word of cache memory shall be 1) 11 bits 2) 21 bits 3) 16 bits 4) 20 bits
answered Jul 13 in Operating System sachin486 181 views
1 vote
2 answers
18
Consider a system with a two level paging scheme in which a regular memory access takes 150 ns, and servicing a page fault takes 8 ms. An average instruction takes 100 ns of CPU time, and two memory accesses. The TLB hit ratio is 90%, and the page fault rate is one in every 10,000 instructions. What is the effective average instruction execution time? a) 645 ns b) 1050 ns c) 1215 ns d) 1230 ns
answered Jul 10 in Operating System ankur9771907913 419 views
65 votes
4 answers
19
A certain computation generates two arrays a and b such that $a[i] = f(i)$ for $0 \leq i < n$ and $b[i] = g(a[i])$ for $0 \leq i < n$. Suppose this computation is decomposed into two concurrent processes $X$ and $Y$ such that $X$ computes the array $a$ and $Y$ computes the array $b$. The processes ... R); } EntryY(R, S) { V(S); P(R); } ExitX(R, S) { V(R); P(S); } EntryY(R, S) { V(S); P(R); }
answered Jul 8 in Operating System HarshJoshi 12.6k views
1 vote
1 answer
20
Match the following WINDOWS system calls and UNIX system calls with reference to process control and File manipulation. ... $(a)-(iii) \: (b)-(iv) \: (c)-(ii) \: d-(i)$
answered Jul 6 in Operating System Hradesh patel 210 views
6 votes
9 answers
21
Consider the list of page references in the time line as below: 9 6 2 3 4 4 4 4 3 4 4 2 5 8 6 8 5 5 3 2 3 3 9 6 2 7 What is the working set at the penultimate page reference if &#8710; is 5? {8, 5, 3, 2, 9, 6} {4, 3, 6, 2, 5} {3, 9, 6, 2, 7} {3, 9, 6, 2}
answered Jul 5 in Operating System harypotter0 4.7k views
2 votes
2 answers
22
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 Jul 4 in Operating System Pawan_k 874 views
22 votes
2 answers
23
Which of the following is not a valid deadlock prevention scheme? Release all resources before requesting a new resource. Number the resources uniquely and never request a lower numbered resource than the last one requested. Never request a resource after releasing any resource. Request and all required resources be allocated before execution.
answered Jul 2 in Operating System TheAnteamatter 5.6k views
28 votes
7 answers
24
Consider the $3$ processes, $P1, P2$ and $P3$ shown in the table. $\small \begin{array}{|c|c|c|} \hline \textbf{Process} & \textbf{Arrival Time} & \textbf{Time Units Required} \\\hline \text{P1} & 0 & 5\\\hline \text{P2} & 1 & 7 \\\hline \text{P3} & 3 & 4 \\\hline \end{array}$The ... : $P1, P3, P2$ RR2: $P1, P3, P2$ FCFS: $P1, P2, P3$ RR2: $P1, P3, P2$ FCFS: $P1, P3, P2$ RR2: $P1, P2, P3$
answered Jul 1 in Operating System TheAnteamatter 5.5k views
19 votes
4 answers
25
If the time-slice used in the round-robin scheduling policy is more than the maximum time required to execute any process, then the policy will degenerate to shortest job first degenerate to priority scheduling degenerate to first come first serve none of the above
answered Jul 1 in Operating System TheAnteamatter 1.8k views
61 votes
3 answers
26
A uni-processor computer system only has two processes, both of which alternate $10$ $\text{ms}$ CPU bursts with $90$ $\text{ms}$ I/O bursts. Both the processes were created at nearly the same time. The I/O of both processes can proceed in ... first scheduling Static priority scheduling with different priorities for the two processes Round robin scheduling with a time quantum of $5$ $\text{ms}$
answered Jun 30 in Operating System TheAnteamatter 6.8k views
1 vote
2 answers
27
Consider linked allocation system, a program has just read the 15th disk block. After some point of time, If it next want to use the 20th block, then how many disk blocks must the program access? a: 5 b: 10 c:15 d:20
answered Jun 29 in Operating System premu 255 views
1 vote
1 answer
28
Suppose I have two processes requiring 50 bytes each. If I have a single partition of 100 bytes. Can both the processes occupy this hole or only one of them causing an internal fragmentation of 50 bytes ? Also if internal fragmentation is present then external fragmentation is also present?
answered Jun 28 in Operating System debasish paramanik 236 views
1 vote
2 answers
31
True/False Paging suffers from internal fragmentation?
answered Jun 23 in Operating System manikantsharma 245 views
2 votes
3 answers
32
We are given a computer system consisting of a CPU and a disk. We are told that, each user request has a compute time of 80 msec and an average generates 10 disk requests. We are further told that, the service time at the disk is 10 msec. What is the maximum number of user requests that can be satisfied per second?
answered Jun 22 in Operating System Chinmay Agnihotri 493 views
2 votes
2 answers
33
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 ?)
answered Jun 21 in Operating System AgarwalShubham 830 views
21 votes
5 answers
34
A paging scheme uses a Translation Look-aside Buffer (TLB). A TLB-access takes $10$ ns and the main memory access takes $50$ ns. What is the effective access time(in ns) if the TLB hit ratio is $\text{90%}$ and there is no page-fault? $54$ $60$ $65$ $75$
answered Jun 17 in Operating System manoj kanwar 4.5k views
29 votes
6 answers
35
A unix-style I-nodes has $10$ direct pointers and one single, one double and one triple indirect pointers. Disk block size is $1$ Kbyte, disk block address is $32$ bits, and $48$-bit integers are used. What is the maximum possible file size? $2^{24}$ bytes $2^{32}$ bytes $2^{34}$ bytes $2^{48}$ bytes
answered Jun 15 in Operating System prajjwalsingh_11 10.9k views
18 votes
2 answers
36
Match the following flag bits used in the context of virtual memory management on the left side with the different purposes on the right side of the table below. ... $\text{I-c, II-d, III-a, IV-b}$ $\text{I-b, II-c, III-d, IV-a}$
answered Jun 8 in Operating System Adarsh Pandey 2.7k views
0 votes
2 answers
37
51 votes
6 answers
38
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 Jun 4 in Operating System once_2019 9.5k views
9 votes
9 answers
39
Suppose two jobs, each of which needs $10$ minutes of CPU time, start simultaneously. Assume $50\%$ I/O wait time. How long will it take for both to complete, if they run sequentially? 10 20 30 40
answered Jun 3 in Operating System AliH 5.2k views
0 votes
3 answers
40
To see more, click for all the questions in this category.
...