Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Webpage for Operating System
Recent questions tagged operating-system
0
votes
0
answers
1
Andrew S. Tanenbaum (MOS) Edition 5 Exercise 3 Question 16 (Page No. 252)
The 32-bit Linux kernel supports a maximum of 32768 processes in the process table, and the kernel is allocated 1,073,741,824 (1 GiB) of the virtual address space. If memory address space is divided evenly ... virtual address space would be allocated to each process at a minimum, with the maximum number of processes running?
The 32-bit Linux kernel supports a maximum of 32768 processes in the process table, and the kernel is allocated 1,073,741,824 (1 GiB) of the virtual address space. If mem...
sofigenr
12
views
sofigenr
asked
1 day
ago
Operating System
tanenbaum
operating-system
memory-management
virtual-memory
+
–
1
votes
1
answer
2
fork() system call
Consider the following pieces of codes for fork( ) system call. Solve and explain how many child processes are created upon execution of this program? Snippet 1: void main( ) { fork( ); fork( ); exit( ); } Snippet 2: int main( ) { int i; for (i = 0; i < 4; i++) fork(); return 0; } Learning Outcomes. Understand the working of fork ( ) system call.
Consider the following pieces of codes for fork( ) system call. Solve and explain how many child processes are created upon execution of this program? Snippet 1:void main...
Sparkboy
91
views
Sparkboy
asked
Apr 4
Operating System
operating-system
fork-system-call
+
–
0
votes
0
answers
3
Operating system concepts 9th edition Abdraham Silberschatz
Write a monitor to solve the consumer-producer problem. The basic program structure is shown as follows. monitor ProducerConsumer { int in, out, count; Item buffer[BUFFER_SIZE]; condition empty, full; // To add anything ... } Process Consumer: while(true) { ProducerConsumer.get(next_consumed); /* consume the item in next_consumed */ }
Write a monitor to solve the consumer-producer problem. Thebasic program structure is shown as follows.monitor ProducerConsumer {int in, out, count;Item buffer[BUFFER_SIZ...
Maxine
51
views
Maxine
asked
Apr 3
Operating System
operating-system
process-synchronization
+
–
0
votes
1
answer
4
Paging
If Page size = Frame size is always true and offset in Logical address = offset in physical address holds Then how/why Logical address size can come different than physical address size?
If Page size = Frame size is always true and offset in Logical address = offset in physical address holdsThen how/why Logical address size can come different than physica...
Mrityudoot
149
views
Mrityudoot
asked
Mar 20
Operating System
paging
operating-system
memory-management
+
–
1
votes
2
answers
5
OS, Process Scheduling
Consider a uniprocessor system with n processes in the ready queue. Round robin scheduling with time quantum x is used for process scheduling. Assume each process requires kx seconds to complete and the context switch takes 0 seconds. At what time the first process will complete the execution? (assume all the variables as integers). A) nkx B) k(nx-1) C) k(nk+n) D) x(nk-n+1)
Consider a uniprocessor system with n processes in the ready queue. Round robin scheduling with time quantum x is used for process scheduling. Assume each process require...
delxbydelt
281
views
delxbydelt
asked
Mar 15
Operating System
process-scheduling
operating-system
round-robin-scheduling
context-switch
process-synchronization
+
–
0
votes
1
answer
6
Three process P1, P2 and P3 arrive at time zero. Their total execution time is 10ms, 20ms, and 30ms respectively. They spent first 20% of their execution time in doing I/O, next 70% in CPU processing and the last 10% again doing I/O. For what percentage of time was the CPU free? Using SRTF algorithm
kamogelommoyane
212
views
kamogelommoyane
asked
Mar 10
Operating System
operating-system
+
–
1
votes
2
answers
7
#OS-FORK Output
Q23. The following C program is executed on a Unix/Linux system: main() { int i=0; while (i<20) if (i%2==0) fork(); i++; return 0; } Calculate how many number of processes will be created after executing the above program. Options: 1.1023 2.Infinite 3.1024 4.2048
Q23. The following C program is executed on a Unix/Linux system: main(){ int i=0; while (i<20) if (i%2==0) fork(); ...
BitMask
393
views
BitMask
asked
Mar 3
Operating System
operating-system
fork-system-call
gate-preparation
programming-in-c
usermod
+
–
0
votes
1
answer
8
Doubt on OS Syllabus (Galvin)
Hi, i'm starting my GATE journey and wanted to verify if these are the topics which should be learnt for GATE. The book is Operating Systems by Avi Silberschatz, Greg Gagne, and Peter Baer Galvin (9th Edition). Also have 10th edition but it seems to have rearranged a lot of topics and chapters.
Hi, i'm starting my GATE journey and wanted to verify if these are the topics which should be learnt for GATE. The book is Operating Systems by Avi Silberschatz, Greg Gag...
Apex7D0
196
views
Apex7D0
asked
Feb 17
Operating System
syllabus
operating-system
+
–
0
votes
1
answer
9
GATE CSE 2024 | Set 2 | Question: 14
Which of the following tasks is/are the responsibility/responsibilities of the memory management unit $\text{(MMU)}$ in a system with paging-based memory management? Allocate a new page table for a newly created process Translate a virtual address ... table Raise a trap when a process tries to write to a page marked with read-only permission in the page table
Which of the following tasks is/are the responsibility/responsibilities of the memory management unit $\text{(MMU)}$ in a system with paging-based memory management?Al...
Arjun
2.6k
views
Arjun
asked
Feb 16
Operating System
gatecse2024-set2
operating-system
multiple-selects
+
–
1
votes
1
answer
10
GATE CSE 2024 | Set 2 | Question: 15
Consider a process $\text{P}$ running on a $\text{CPU}$. Which one or more of the following events will always trigger a context switch by the $\text{OS}$ that results in process $\mathrm{P}$ moving to a non-running ... page fault An interrupt is raised by the disk to deliver data requested by some other process A timer interrupt is raised by the hardware
Consider a process $\text{P}$ running on a $\text{CPU}$. Which one or more of the following events will always trigger a context switch by the $\text{OS}$ tha...
Arjun
2.9k
views
Arjun
asked
Feb 16
Operating System
gatecse2024-set2
operating-system
multiple-selects
+
–
5
votes
3
answers
11
GATE CSE 2024 | Set 2 | Question: 27
Consider a single processor system with four processes $\text{A, B, C,}$ and $\text{D}$, represented as given below, where for each process the first value is its arrival time, and the second value is its $\text{CPU}$ ... $\mathrm{SRTF}=7, \mathrm{NP}-\mathrm{SJF}=7.5$ $\mathrm{SRTF}=7, \mathrm{NP}-\mathrm{SJF}=8.5$
Consider a single processor system with four processes $\text{A, B, C,}$ and $\text{D}$, represented as given below, where for each process the first value is...
Arjun
2.4k
views
Arjun
asked
Feb 16
Operating System
gatecse2024-set2
operating-system
process-scheduling
+
–
2
votes
1
answer
12
GATE CSE 2024 | Set 2 | Question: 36
Consider a multi-threaded program with two threads $\mathrm{T} 1$ and $\mathrm{T} 2$. The threads share two semaphores: $s1$ (initialized to $1$) and $s2$ (initialized to $0$). The threads also share a global variable $\mathrm{x}$ ( ... not print anything (deadlock) $\mathrm{T} 2$ runs first and prints $1, \mathrm{~T} 1$ does not print anything (deadlock)
Consider a multi-threaded program with two threads $\mathrm{T} 1$ and $\mathrm{T} 2$. The threads share two semaphores: $s1$ (initialized to $1$) and $s2$ ...
Arjun
2.2k
views
Arjun
asked
Feb 16
Operating System
gatecse2024-set2
operating-system
multiple-selects
+
–
2
votes
1
answer
13
GATE CSE 2024 | Set 2 | Question: 43
Consider a disk with the following specifications: rotation speed of $6000$ RPM, average seek time of $5$ milliseconds, $500$ sectors/track, $512$-byte sectors. A file has content stored in $3000$ sectors located randomly on the disk. Assuming ... total time (in seconds, rounded off to $2$ decimal places) to read the entire file from the disk is ______________.
Consider a disk with the following specifications: rotation speed of $6000$ RPM, average seek time of $5$ milliseconds, $500$ sectors/track, $512$-byte sectors. A file ha...
Arjun
1.7k
views
Arjun
asked
Feb 16
Operating System
gatecse2024-set2
numerical-answers
operating-system
disk
+
–
6
votes
2
answers
14
GATE CSE 2024 | Set 2 | Question: 54
Consider a $32$-bit system with $4 \mathrm{~KB}$ page size and page table entries of size $4$ bytes each. Assume $1 \mathrm{~KB}=2^{10}$ bytes. The OS uses a $2$-level page table for memory management, with the page table containing ... the maximum number of pages across the two levels of the page table of the process. The value of $\text{X+Y}$ is ___________.
Consider a $32$-bit system with $4 \mathrm{~KB}$ page size and page table entries of size $4$ bytes each. Assume $1 \mathrm{~KB}=2^{10}$ bytes. The OS uses a $2$-level pa...
Arjun
2.7k
views
Arjun
asked
Feb 16
Operating System
gatecse2024-set2
numerical-answers
operating-system
+
–
1
votes
2
answers
15
GATE CSE 2024 | Set 1 | Question: 14
Which of the following statements about threads is/are TRUE? Threads can only be implemented in kernel space Each thread has its own file descriptor table for open files All the threads belonging to a process share a common stack Threads belonging to a process are by default not protected from each other
Which of the following statements about threads is/are TRUE?Threads can only be implemented in kernel spaceEach thread has its own file descriptor table for open filesAll...
Arjun
2.9k
views
Arjun
asked
Feb 16
Operating System
gatecse2024-set1
multiple-selects
operating-system
+
–
2
votes
1
answer
16
GATE CSE 2024 | Set 1 | Question: 15
Which of the following process state transitions is/are NOT possible? Running to Ready Waiting to Running Ready to Waiting Running to Terminated
Which of the following process state transitions is/are NOT possible?Running to ReadyWaiting to RunningReady to WaitingRunning to Terminated
Arjun
2.7k
views
Arjun
asked
Feb 16
Operating System
gatecse2024-set1
operating-system
process-scheduling
multiple-selects
+
–
0
votes
2
answers
17
GATE CSE 2024 | Set 1 | Question: 30
Consider the following two threads $\mathrm{T} 1$ and $\mathrm{T} 2$ that update two shared variables $\mathrm{a}$ and $\mathrm{b}$. Assume that initially $\mathrm{a}=\mathrm{b}=1$ ...
Consider the following two threads $\mathrm{T} 1$ and $\mathrm{T} 2$ that update two shared variables $\mathrm{a}$ and $\mathrm{b}$. Assume that initially $\math...
Arjun
2.1k
views
Arjun
asked
Feb 16
Operating System
gatecse2024-set1
operating-system
+
–
0
votes
2
answers
18
GATE CSE 2024 | Set 1 | Question: 44
Consider a $512$ GB hard disk with $32$ storage surfaces. There are $4096$ sectors per track and each sector holds $1024$ bytes of data. The number of cylinders in the hard disk is _________.
Consider a $512$ GB hard disk with $32$ storage surfaces. There are $4096$ sectors per track and each sector holds $1024$ bytes of data. The number of cylinders in the ha...
Arjun
1.6k
views
Arjun
asked
Feb 16
Operating System
gatecse2024-set1
numerical-answers
operating-system
+
–
1
votes
2
answers
19
GATE CSE 2024 | Set 1 | Question: 47
Consider the following code snippet using the fork () and wait () system calls. Assume that the code compiles and runs correctly, and that the system calls run successfully without any errors. int x=3; while (x>0){ fork (); printf("hello"); wait (NULL) ; X-- ; } The total number of times the printf statement is executed is __________.
Consider the following code snippet using the fork () and wait () system calls. Assume that the code compiles and runs correctly, and that the system calls run successful...
Arjun
2.4k
views
Arjun
asked
Feb 16
Operating System
gatecse2024-set1
numerical-answers
operating-system
+
–
1
votes
3
answers
20
GATE CSE 2024 | Set 1 | Question: 52
Consider a memory management system that uses a page size of $2 \mathrm{~KB}$. Assume that both the physical and virtual addresses start from $0$. Assume that the pages $0,1,2$, and $3$ ... $0$, respectively. The physical address (in decimal format) corresponding to the virtual address $2500$ (in decimal format) is ___________.
Consider a memory management system that uses a page size of $2 \mathrm{~KB}$. Assume that both the physical and virtual addresses start from $0$. Assume that the pages $...
Arjun
2.3k
views
Arjun
asked
Feb 16
Operating System
gatecse2024-set1
numerical-answers
operating-system
+
–
0
votes
0
answers
21
memory management
we have 8 pages (each side 32B) to store in physical memory of 2^32 bits how many bits are required to identify each page , according to me 3 bits are required but that is wrong plz explain why
we have 8 pages (each side 32B) to store in physical memory of 2^32 bits how many bits are required to identify each page , according to me 3 bits are required but that i...
SSR17
208
views
SSR17
asked
Feb 8
Operating System
memory-management
operating-system
paging
virtual-memory
+
–
7
votes
1
answer
22
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 23
Consider the context switch of a CPU from the context of process P1 to that of process P2. Consider the following two events in the chronological order of the events during the context switch: E1: The stack pointer ... atomic hardware instruction. The relative ordering of E1 and E2 can vary from one context switch to the other.
Consider the context switch of a CPU from the context of process P1 to that of process P2.Consider the following two events in the chronological order of the events durin...
GO Classes
521
views
GO Classes
asked
Feb 5
Operating System
goclasses2024-mockgate-14
operating-system
context-switch
process
1-mark
+
–
3
votes
2
answers
23
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 24
Consider a job A arrives at time $T=0$ and job length of $500 \mathrm{~ms}$. Job $B$ arrives at time $\mathrm{T}=100 \mathrm{~ms}$ with a length of $100 \mathrm{~ms}$. Considering the Shortest Remaining Time First Scheduler, what does ... for $100 \mathrm{~ms}$, then $B$ runs for $100 \mathrm{~ms}$, then A runs for $300 \mathrm{~ms}$
Consider a job A arrives at time $T=0$ and job length of $500 \mathrm{~ms}$. Job $B$ arrives at time $\mathrm{T}=100 \mathrm{~ms}$ with a length of $100 \mathrm{~ms}$.Con...
GO Classes
423
views
GO Classes
asked
Feb 5
Operating System
goclasses2024-mockgate-14
operating-system
process-scheduling
1-mark
+
–
9
votes
2
answers
24
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 36
Assume a linear page table, with a 1-byte page-table entry. Assume physical and virtual address spaces of size 128 bytes with 32-byte pages. The page-table base register is set to physical address 16. The contents of ... What are the physical addresses that will get referred in fetch and execute of the above instruction? 10 42 102 70
Assume a linear page table, with a 1-byte page-table entry. Assume physical and virtual address spaces of size 128 bytes with 32-byte pages. The page-table base register ...
GO Classes
618
views
GO Classes
asked
Feb 5
Operating System
goclasses2024-mockgate-14
operating-system
memory-management
paging
multiple-selects
2-marks
+
–
2
votes
1
answer
25
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 37
Suppose that an operating system provides two functions, block() which puts the calling process on the blocked queue, and wakeup(P) which moves process P to the ready queue if it is currently on the blocked queue. ... alternation printing ABABAB . A and B will always run forever with strick alternation printing BABABA . None of these
Suppose that an operating system provides two functions, block() which puts the calling process on the blocked queue, and wakeup(P) which moves process P to the ready que...
GO Classes
496
views
GO Classes
asked
Feb 5
Operating System
goclasses2024-mockgate-14
operating-system
process-synchronization
deadlock-prevention-avoidance-detection
2-marks
+
–
0
votes
0
answers
26
What is the difference between synchronous and asynchronous signals?
A process can receive two kinds of signals classified based on the source and reason. Synchronous are the one that are generated by illegal memory access or division by zero. Asynchronous are the one that ... exceptions? For example we have ZeroDivisionError or FileNotFoundError and all. Ref: Signal Handling from Galvin OS book
A process can receive two kinds of signals classified based on the source and reason.Synchronous are the one that are generated by illegal memory access or division by ze...
tbhaxor
102
views
tbhaxor
asked
Feb 1
Operating System
operating-system
process
+
–
0
votes
1
answer
27
Operating System
How much time is required to load a 64 KB program from a disk with an average seek time of 30 ms, a rotation time of 20 ms per rotation, a track size of 32 KB, and a page size of 2 KB. It is assumed that the pages are spread randomly around the disk. A. 1200 ms B. 1300 ms C. 1320 ms D. 1400 ms
How much time is required to load a 64 KB program from a disk with an average seek time of 30 ms, a rotation time of 20 ms per rotation, a track size of 32 KB, and a page...
jaydip74
284
views
jaydip74
asked
Jan 28
Operating System
operating-system
self-doubt
+
–
5
votes
1
answer
28
GO Classes Test Series 2024 | Mock GATE | Test 13 | Question: 20
Suppose we have a multi-level index file system, and this file system has $512$ Bytes blocks, inodes with $3$ direct, $1$ single-indirect, $2$ double-indirect, and $1$ triple-indirect pointer, and $64$-bit block ... inode requires the first single-indirect block number be used? $1536$ Bytes $1537$ Bytes $512$ Bytes $1500$ Bytes
Suppose we have a multi-level index file system, and this file system has $512$ Bytes blocks, inodes with $3$ direct, $1$ single-indirect, $2$ double-indirect, and $1$ tr...
GO Classes
570
views
GO Classes
asked
Jan 28
Operating System
goclasses2024-mockgate-13
goclasses
operating-system
file-system
1-mark
+
–
5
votes
1
answer
29
GO Classes Test Series 2024 | Mock GATE | Test 13 | Question: 21
Consider a virtual memory system that uses paging. Virtual and physical addresses are both $32$ bits long, and the page size is $4 \textsf{KB}=2^{12}$ bytes. A process $\text{P}_1$ has the following page table. ... $\textsf{0x00003b65}$ $\textsf{0x00875b65}$ $\textsf{0x00875}$ Translation is not possible as per the given page table
Consider a virtual memory system that uses paging. Virtual and physical addresses are both $32$ bits long, and the page size is $4 \textsf{KB}=2^{12}$ bytes. A process $\...
GO Classes
407
views
GO Classes
asked
Jan 28
Operating System
goclasses2024-mockgate-13
goclasses
operating-system
paging
virtual-memory
1-mark
+
–
6
votes
2
answers
30
GO Classes Test Series 2024 | Mock GATE | Test 13 | Question: 45
Imagine a computer with a $32$-bit virtual address space and $\text{1 KB}$ pages. It uses a two-level page table system, with page-sized chunks at the inner level(not at the outer level). Suppose the code is located at address $0,$ and there are ... is $4$ Bytes.) $64 \mathrm{~KB}$ $2 \mathrm{~KB}$ $66 \mathrm{~KB}$ $16 \mathrm{MB}$
Imagine a computer with a $32$-bit virtual address space and $\text{1 KB}$ pages. It uses a two-level page table system, with page-sized chunks at the inner level(not at ...
GO Classes
803
views
GO Classes
asked
Jan 28
Operating System
goclasses2024-mockgate-13
goclasses
operating-system
paging
multilevel-paging
2-marks
+
–
Page:
1
2
3
4
5
6
...
114
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register