# Recent questions tagged operating-system

Suppose the following jobs are to be executed in a uni-processor system. Assume the overhead of context switching is one time unit. The average process turnaround time, the normalized turnaround time for process 2, and the processor efficiency using FCFS is, 12.8, 1.625, 83.3% 11.4, 2, 83.3% 11.6, 3.75, 80.6% 18.6, 3.375, 71.4% Shouldn’t the average turn around time be $11.8$?
I always face difficulties when solving this type of question so I am looking for a shortcut. I found a simple formula here, https://www.geeksforgeeks.org/gate-gate-cs-2019-question-51/. Using this formula for this problem, (4 KB/ 8 B )^2 * 2^11 I got 128 MB ... formula. I was also not able to use the formula for https://www.geeksforgeeks.org/gate-gate-cs-2004-question-49/ Please help. Thank you.
1 vote
This question is from iisc assignment . If a computer system has one processor, then the maximum number of processes (including both user and system processes) that can be in state RUNNING at any time instant is a) 1 b) 2 c) no more than 1 user process, but any number of system processes d) any number of both user and system processes
Is raid and buffering in syllabus?
what is the correct binary semaphore UP operation?? UP() { if(S.L is not empty) { wakeup(process p)} else S.value = 1; return; } or, UP() { S.value = 1; wakeup(process p); return; } which one is correct??
In segmented paging the logical address space of a program is divided into variable sized segments. Further the segments are divided into fixed size pages The page sizes of different segments are same or different?
Can we ignore the last 3 unit of idle time as we can utilize this time by giving it to another process, if available? Can anyone explain? 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 ... as possible. For what percentage of time does the CPU remain idle? (a) 0% (b) 10.6% (c) 30.0% (d) 89.4%
Can anyone explain me the solution of this question? 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
https://gateoverflow.in/3443/gate2007-it-10 for this question: the line : if (critical _flag == FALSE) can be written as: 1:t=critical_flag; 2:cmp t,false (compare t with false , 3 :JNZ 7(if it is not true after the comparison the zero flag is ... register the value of critical_flag is stored as false) can we argue that this is how the mutual exclusion is not preserved. Is my explanation correct.
. A computer has 32-bit virtual addresses and 4-KB pages. The program and data together fit in the lowest page (0–4095) The stack fits in the highest page. How many page table entries are needed for two-level paging, with 10 bits in each part?
In a 32-bit machine we subdivide the virtual address into 4 pieces as follows: 8-bit 4-bit 8-bit 12-bit We use a 3-level page table, such that the first 8 bits are for the first level and so on. Physical addresses are 44 bits and there are 4 protection ... how to calculate number of bits required in each page table entry of 1st,2nd level page tables..Need help in this aspect.. Thanks in advance
Consider the function given above, assume that x is shared variable initialized to 0. suppose that the foo function is called by four concurrent processes and that each process calls foo one time which of the following output is/are possible? 1234 4321 0123 2222 4444 1235 012 1124
Here is my approach: Initial all block are empty - {100,500,200,450,600} When 212 request come then blocks size after allocation - {100,288,200,450,600} When 417 request come then - {100,288,200,33,600} When 112 request come then - {100,176,200,33,600 ... sufficient space so first fit fails here Thats my approach but in given solution first fits work well. Please tell the were i am doing wrong..
If these 3 are the min. requirement from process scheduling algorithm – Min avg waiting time Min. avg Turnaround time No starvation. then can u please fill this table below by Yes(Y) or No(N) FCFS SJF SRTF RR LRTF premptive priority Min. avg WT Min. avg TAT No starvation
In this question – https://gateoverflow.in/252034/segmented-paging How to figure out that only one page table is present at a time? Overhead for only one page table is consider, Why?? Please explain...
Is it possible for 2 running processes to share the complete memory image in physical memory? And in which situation it is possible for the processes to share the memory image in physical memory?
The address sequence generated by tracing a particular program executing in a pure demand paging system with 100 bytes per page is 0100, 0200, 0430, 0499, 0510, 0530, 0560, 0120, 0220, 0240, 0260, 0320, 0410. Suppose that the memory can store only one page and if x is the address ... (A) 0 (B) 4 (C) 7 (D) 8 Ps: how to solve this question not getting address are allocated here when page fault occur
Is all the non-preemptive scheduler are suffer from convoy effect? And if not, then what are the schedulers which suffers from convoy effect?
A). A deadlock will occur. B) A semaphore is not a shared variable. C). Another process may then enter the critical section violating the mutual exclusion constraint. D). A signal on a semaphore is always given from outside the critical section.
Consider a file system with block size 4kb and disk size is 28 mb, to keep track of free block in the disk a bitmap is used. Then how many disk block required for bit map? (Answer given is 7)
Can someone please explain how TLB formula is changed when other concepts like page fault and cache concepts are introduced. There is a lot of confusion and not getting clear explanations. It would be very helpful for every beginners like me. TLB #### EMAT = Ht( t + m ) + ( ... memory concept also. ( p= page fault rate , PS= pagefault service time, c= cache access time, Hc= hit rate of cache )
Book says that segmentation supports user’s view of memory. But with segmentation there is a problem of fragmentation. To overcome that problem we divide segments into pages where any page can be stored into any frame. But at this point(in paged segmentation) how does user view of memory gets preserved as single segment may be scattered in different parts of memory.
For certain page trace starting with no page in the memory a demand paged memory system operator under the lru replacement policy results in 9 and 11 page faults when the primary memory is of 6 and 4 pages respectively when the same page trace is operated under the optimal policy the number of page faults maybe A 9 and 7 B 7 and 9 C 10 and 12 D 6 and 7
Which of the following statement is false a)with the least recently used page replacement policy when the page size is halved the number of page faults can be more than the double the original number of page faults b)the working set size is a monotonically non decreasing ... is used main memory may contain some pages which do not belong to the working set of any program d) none of the above
On a system using simple segmentation, compute the physical address for each of the logical address, given the following segment table. 1 - e, 2 - b, 3 - d, 4 - c, 5 - a 1 - b, 2 - c, 3 - e, 4 - d, 5 - a 1 - c, 2 - e, 3 - d, 4 - a, 5 - b
Assume a page reference string with 100 length and 5 distinct page number occuring in it, what is the lower bound on the number of page fault in best case ________.
What is the Emat (effective memory access time) when we are given page fault rate? In gate do we have to consider whether memory access time is included in the Page fault service time or not ? where { p = page fault rate, PS = Page fault service time, m = memory access time } Option 1(If we do not consider ... time ) Emat = p(PS + m) + (1-p)(m) = p(PS)+ m or Option 2: Emat = p(PS) + (1-p)(m)
Let us assume a disk with the rotational speed of 15000 rpm, 512 bytes per sector, 400 sectors per track and 1000 tracks on the disk, average seek time is 4ms. We want to transmit a file of size 1 Mbyte, which is stored contiguously on the disc. (a) What is the transfer time ... rotational delay in this case? (d) What is the total time to read 1 sector? (e) What is the total time to read 1 track?
Is there preemption in multiprogramming os? Definition which I read - Multiprogramming Os - When a process go for I/O the CPU is allocated to other process after process leaves CPU for I/O. Multitasking Os - multiprogramming os + preemption = multitasking os. ... . then my doubt is how multiprogramming os switch the process without preemption? plz clear my doubt. Has I understood wrong concept?
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 . A file of size 42797 KB is ... is <1200, 9, 40>. What is the cylinder number of the last sector of the file, if it is stored in a contiguous manner?
Which $\text{Data Structure}$ can be used to implement blocked queue during synchronization of processes. When there are $n$ process trying to access critical section but only one of them can be in the critical section and remaining all processes need to wait in the blocked queue for critical section to be free.
Can someone tell me how many times 0 gets printed in the following code ? main() { printf(“0”); fork(); if( fork() == 0 ) { printf(“0”); if( fork() == 0 ) { printf(“0”); } } } P.S. – Ignore the syntax error i just need the answer
1 vote