search
Log In
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Welcome to GATE CSE Doubts, where you can ask questions and receive answers from other members of the community.

Recent questions tagged operating-system

0 votes
1 answer 11 views
operating-system cpu-scheduling . someone please guide me how to approach this problem.
asked 5 days ago in Operating System Navy 5 points 11 views
0 votes
0 answers 6 views
Two processes, P1 and P2, need to access a critical section of code. Consider the following synchronization construct used by the processes: /* P1 */ while (true) { wants1 = true; while (wants2 == true); /* Critical Section */ wants1 = false; } /* ... IT IS WRITTEN PROGRESS IS THERE? In the case when both wants1 and wants2 are true it will indefinitely be postponed then why progress is there?
asked Jun 10 in Operating System anupam_12 5 points 6 views
0 votes
0 answers 12 views
Suppose our computer requires 2048x16 bytes of RAM and 512x16 bytes of ROM. Design the necessary hardware using 512x16 byte RAM and 256x16 byte ROM chips
asked Jun 7 in CO & Architecture AliOzmaral 5 points 12 views
1 vote
1 answer 843 views
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
asked Feb 18 in Operating System Arjun 257 points 843 views
2 votes
1 answer 853 views
A data file consisting of $1,50,000$ student-records is stored on a hard disk with block size of $4096$ bytes. The data file is sorted on the primary key $\textrm{RollNo}$. The size of a record pointer for this disk is $7$ bytes. Each student-record has ... disk. Assume that the records of data file and index file are not split across disk blocks. The number of blocks in the index file is ________
asked Feb 18 in Operating System Arjun 257 points 853 views
1 vote
3 answers 1K views
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.$
asked Feb 18 in Operating System Arjun 257 points 1K views
3 votes
1 answer 863 views
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
asked Feb 18 in Operating System Arjun 257 points 863 views
7 votes
3 answers 1.8K views
Consider a three-level page table to translate a $39-$bit virtual address to a physical address as shown below: The page size is $\text{4 KB} \;(1\text{KB}=2^{10}$ bytes$)$ and page table entry size at every level is $8$ bytes. A process $P$ is currently ... $2\text{GB}$ of physical memory. The minimum amount of memory required for the page table of $P$ across all levels is _________ $\text{KB}$.
asked Feb 18 in Operating System Arjun 257 points 1.8K views
2 votes
2 answers 1.2K views
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
asked Feb 18 in Operating System Arjun 257 points 1.2K views
3 votes
3 answers 1.6K views
Which of the following standard $C$ library functions will always invoke a system call when executed from a single-threaded process in a $\text{UNIX/Linux}$ operating system? $\textsf{exit}$ $\textsf{malloc}$ $\textsf{sleep}$ $\textsf{strlen}$
asked Feb 18 in Operating System Arjun 257 points 1.6K views
1 vote
1 answer 973 views
Consider a linear list based directory implementation in a file system. Each directory is a list of nodes, where each node contains the file name along with the file metadata, such as the list of pointers to the data blocks. Consider a given directory $\textsf{foo}$. Which of ... file from $\textsf{foo}$ Renaming of an existing file in $\textsf{foo}$ Opening of an existing file in $\textsf{foo}$
asked Feb 18 in Operating System Arjun 257 points 973 views
0 votes
5 answers 719 views
Three processes arrive at time zero with $\text{CPU}$ bursts of $16,\;20$ and $10$ milliseconds. If the scheduler has prior knowledge about the length of the $\text{CPU}$ bursts, the minimum achievable average waiting time for these three processes in a non-preemptive scheduler (rounded to nearest integer) is _____________ milliseconds.
asked Feb 18 in Operating System Arjun 257 points 719 views
3 votes
3 answers 1.4K views
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
asked Feb 18 in Operating System Arjun 257 points 1.4K views
0 votes
1 answer 59 views
I think the answer should be B). S1 is incorrect. This is because TLB needs to be saved on a context switch. TLB stores frame numbers of frequently referred pages and therefore it has to be updated on a context switch between the process. We cannot simply flush it for a process going out. Please clarify. Thanks!
asked Sep 8, 2020 in Operating System sankalpmittal 41 points 59 views
0 votes
1 answer 45 views
I think the answer should be 22 MB. We get Page Table Entry size = (22/8) B Page table size = 2^23 * 22/8 B = 22 MB. Why have they rounded 22/8 as 3B? Answer should be 22 MB and not 24 MB. Please clarify. Thanks!
asked Sep 8, 2020 in Operating System sankalpmittal 41 points 45 views
1 vote
1 answer 26 views
as per my knowledge of information in multicore systems we use spinlocks so that while one thread is busy waiting on while loop other thread can work on Critical section. my question is in gate question when busy waiting is being used using while loop do we always ... while one process is busy waiting no other process can work on CS. like in this qsn https://gateoverflow.in/1839/gate2006-61
asked Sep 7, 2020 in Operating System Sneha negi 9 points 26 views
0 votes
0 answers 28 views
How is the answer LIFO? If I take the following example: Process Arrival Time Burst Time Priority P0 0 3 1 P1 0 5 1 P2 3 3 1 P3 6 4 1 Now we know that the priority is dynamic and so if we draw the Gantt chart: P0 P1 P0 P1 P0 .. 0-1 1-2 2- ... P0 has completed first (first out) but it is the first to arrive. LIFO is clearly not being followed. Can someone clairify how the answer is LIFO? Thanks!
asked Sep 7, 2020 in Operating System sankalpmittal 41 points 28 views
0 votes
1 answer 39 views
I think the answer should be 65%. They say 8 processes arrive in 60 seconds. That means the first process will arrive at the time instant t = 7.5s. Now at the time t = 60s, 8th process will be arriving. However till this mark, 7 processes are finished. So this means, idle time = 60 - ... = 60 - 21 = 39s % of time CPU is idle = (39/60) * 100 = 65% Please clarify once if I am correct or not. Thanks!
asked Sep 6, 2020 in Operating System sankalpmittal 41 points 39 views
0 votes
1 answer 58 views
Hello, I have following doubts: Can User Level Threads run in parallel in multiprocessor system? What problem will we be facing if we access I/O devices in user mode? Can anyone please explain? Thank you!
asked Sep 6, 2020 in Operating System sankalpmittal 41 points 58 views
0 votes
0 answers 40 views
How is the option C) satisfy bounded waiting? I mean, there can be a case where the process Q keeps on executing the while loop while process P doesn’t even get the chance. Bounded waiting is the number of times/bounds after which a process gets the chance to enter the critical section. The above code clearly does not support bounded wait, even with option C. Can anyone explain? Thanks!
asked Sep 5, 2020 in Operating System sankalpmittal 41 points 40 views
0 votes
1 answer 49 views
Is there any good resources for Virtual Memory because i’m not able to do the question based on calculating effective memory access time in case of page fault,tlb miss and cache miss ?
asked Sep 2, 2020 in Operating System kaleen bhaiya 9 points 49 views
0 votes
1 answer 63 views
this code does not provide ME Progress Bounded Waiting it is a correct synchronization problem given answer is (d) but how it is free from starvation
asked Sep 1, 2020 in Operating System abcd9982 87 points 63 views
0 votes
1 answer 77 views
with a multilevel feedback scheduler,high priority jobs are placed at top level queue and low priority at bottom level queue is this statement True/False?
asked Sep 1, 2020 in Operating System abcd9982 87 points 77 views
0 votes
1 answer 28 views
My answer is 2^53 bytes but it says the answer is 2^34;
asked Aug 30, 2020 in Operating System G_kuldeep 5 points 28 views
0 votes
1 answer 57 views
Options are a = (6,1) b=(10,4,5) a=(1,5,6) b=(1,5,4,10) a= (5,6) b=(10,4,5) a=(6,1) b=(10,4,5,1)
asked Aug 30, 2020 in CO & Architecture ijnuhb 747 points 57 views
0 votes
0 answers 40 views
Is random page replacement a stack algorithm? Is belady’s anomaly applicable here?
asked Aug 29, 2020 in Operating System ijnuhb 747 points 40 views
0 votes
0 answers 29 views
#OS Memory Management Question on Paging and Translation Look-aside Buffer (TLB)
asked Aug 29, 2020 in Operating System dhruvikk6 5 points 29 views
0 votes
2 answers 37 views
0 votes
0 answers 38 views
Standard book is saying peteson's solution satisfies all the properties (M.E, progress, bounded waiting..) Let's say solution for two processes are: bool flag[2] = {false, false}; int turn; P0: flag[0] = true; P0_gate: turn = 1; while (flag[1] == ... not having any process in critical section; In the end both end up in infinite loop then how it is an valid solution to critical section? Thanks.
asked Aug 23, 2020 in Operating System G_kuldeep 5 points 38 views
0 votes
1 answer 85 views
Can Peterson’s solution to the mutual-exclusion problem works for non-preemptive scheduling?
asked Aug 21, 2020 in Operating System 404 found 37 points 85 views
0 votes
1 answer 39 views
Highest Response Ratio Next CPU Scheduling Algorithm behaves like Shortest Process Next When _____________. Burst Time of all Process is same Burst Time of all Process are different Arrival time of all Process is same Arrival time of all Process are different
asked Aug 18, 2020 in Operating System Pathki Shivamsh 9 points 39 views
0 votes
1 answer 35 views
What is difference between bounded waiting and busy waiting?
asked Aug 16, 2020 in Operating System munishchaturvedi 19 points 35 views
0 votes
1 answer 18 views
What are minm number of resources req for no dead lock if 3 user process ask for 2 unit of resource? I got ans as 6 but ans given 4. Why?
asked Aug 16, 2020 in Operating System munishchaturvedi 19 points 18 views
0 votes
3 answers 96 views
Consider a simple system running a single process. The size of physical frames and logical pages is 16 bytes. The RAM can hold 3 physical frames. The virtual addresses of the process are 6 bits in size. The program generates the following 20 virtual address ... achievable in this example, assuming an optimal page replacement algorithm were to be used? Repeat (2) above for the optimal algorithm.
asked Aug 15, 2020 in Operating System ijnuhb 747 points 96 views
0 votes
1 answer 24 views
A computer system has a page size of 1,024 bytes and maintains the page table for each process in main memory. The overhead required for doing a lookup in the page table is 500 ns. To recude this overhead, the comnputer has a TLB that caches 32 ... physical frame mappings. A TLB lookup requires 100ns. What TLB hit-rate is required to ensure an average virtual address translation time of 200ns?
asked Aug 15, 2020 in Operating System ijnuhb 747 points 24 views
0 votes
2 answers 40 views
Can SSTF in Disk Scheduling cause Starvation? Can FCFS cause it?
asked Aug 14, 2020 in Operating System munishchaturvedi 19 points 40 views
0 votes
1 answer 157 views
A short-term scheduler executes at least once every 20 msec. If it takes 2 msec to decide to execute a process for 2 msec, what is the percentage of CPU time wasted ? (a) 8 % (b) 9 % (c) 10 % (d) 11 %
asked Aug 13, 2020 in Operating System mohitshaw 5 points 157 views
0 votes
1 answer 30 views
0 votes
1 answer 91 views
0 votes
1 answer 12 views
How the change in direction of read/write head(or arm) affect disk scheduling? Is it may be a deciding factor in choosing particular type of disk scheduling?
asked Aug 13, 2020 in Operating System Divyanshu Shukla 1 point 12 views
...