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
1
answer
901
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 33 (Page No. 176)
If a system has only two processes, does it make sense to use a barrier to synchronize them? Why or why not?
If a system has only two processes, does it make sense to use a barrier to synchronize them? Why or why not?
admin
1.1k
views
admin
asked
Oct 25, 2019
Operating System
tanenbaum
operating-system
process-and-threads
process-synchronization
descriptive
+
–
0
votes
0
answers
902
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 32 (Page No. 176)
Show how counting semaphores (i.e., semaphores that can hold an arbitrary value) can be implemented using only binary semaphores and ordinary machine instructions.
Show how counting semaphores (i.e., semaphores that can hold an arbitrary value) can be implemented using only binary semaphores and ordinary machine instructions.
admin
360
views
admin
asked
Oct 25, 2019
Operating System
tanenbaum
operating-system
process-and-threads
machine-instruction
descriptive
+
–
0
votes
1
answer
903
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 31 (Page No. 176)
How could an operating system that can disable interrupts implement semaphores?
How could an operating system that can disable interrupts implement semaphores?
admin
1.1k
views
admin
asked
Oct 25, 2019
Operating System
tanenbaum
operating-system
process-and-threads
interrupts
semaphore
descriptive
+
–
0
votes
0
answers
904
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 30 (Page No. 176)
Consider the following solution to the mutual-exclusion problem involving two processes $P0$ and $P1$. Assume that the variable turn is initialized to $0$. Process $P0's$ code is presented below. /* Other ... in above code. Determine if the solution meets all the required conditions for a correct mutual-exclusion solution.
Consider the following solution to the mutual-exclusion problem involving two processes $P0$ and $P1$. Assume that the variable turn is initialized to $0$. Process $P0’...
admin
368
views
admin
asked
Oct 25, 2019
Operating System
tanenbaum
operating-system
process-and-threads
mutual-exclusion
descriptive
+
–
0
votes
0
answers
905
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 29 (Page No. 176)
The producer-consumer problem can be extended to a system with multiple producers and consumers that write (or read) to (from) one shared buffer. Assume that each producer and consumer runs in its own thread. Will the solution presented in Fig. $2-28$, using semaphores, work for this system?
The producer-consumer problem can be extended to a system with multiple producers and consumers that write (or read) to (from) one shared buffer. Assume that each produce...
admin
579
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
multiprocessors
descriptive
+
–
0
votes
0
answers
906
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 28 (Page No. 176)
When a computer is being developed, it is usually first simulated by a program that runs one instruction at a time. Even multiprocessors are simulated strictly sequentially like this. Is it possible for a race condition to occur when there are no simultaneous events like this?
When a computer is being developed, it is usually first simulated by a program that runs one instruction at a time. Even multiprocessors are simulated strictly sequential...
admin
341
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
multiprocessors
descriptive
+
–
0
votes
1
answer
907
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 27 (Page No. 175)
In a system with threads, is there one stack per thread or one stack per process when user-level threads are used? What about when kernel-level threads are used? Explain.
In a system with threads, is there one stack per thread or one stack per process when user-level threads are used? What about when kernel-level threads are used? Explain....
admin
596
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
threads
descriptive
+
–
0
votes
0
answers
908
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 26 (Page No. 175)
In Sec. $2.3.4$, a situation with a high-priority process, H, and a low-priority process, $L$, was described, which led to $H$ looping forever. Does the same problem occur if round-robin scheduling is used instead of priority scheduling? Discuss.
In Sec. $2.3.4$, a situation with a high-priority process, H, and a low-priority process, $L$, was described, which led to $H$ looping forever. Does the same problem occu...
admin
345
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
process-scheduling
descriptive
+
–
0
votes
0
answers
909
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 25 (Page No. 175)
Can the priority inversion problem discussed in Sec. $2.3.4$ happen with user-level threads? Why or why not?
Can the priority inversion problem discussed in Sec. $2.3.4$ happen with user-level threads? Why or why not?
admin
278
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
descriptive
+
–
0
votes
0
answers
910
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 24 (Page No. 175)
Does Peterson’s solution to the mutual-exclusion problem shown in Fig. $2-24$ work when process scheduling is preemptive? How about when it is nonpreemptive?
Does Peterson’s solution to the mutual-exclusion problem shown in Fig. $2-24$ work when process scheduling is preemptive? How about when it is nonpreemptive?
admin
1.7k
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
process-scheduling
descriptive
+
–
0
votes
0
answers
911
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 23 (Page No. 175)
Does the busy waiting solution using the turn variable (Fig. $2-23$) work when the two processes are running on a shared-memory multiprocessor, that is, two CPUs sharing a common memory?
Does the busy waiting solution using the turn variable (Fig. $2-23$) work when the two processes are running on a shared-memory multiprocessor, that is, two CPUs sharing ...
admin
355
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
descriptive
+
–
0
votes
0
answers
912
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 22 (Page No. 175)
Suppose that an operating system does not have anything like the select system call to see in advance if it is safe to read from a file, pipe, or device, but it does allow alarm clocks to be set that interrupt blocked system calls. Is it possible to implement a threads package in user space under these conditions? Discuss.
Suppose that an operating system does not have anything like the select system call to see in advance if it is safe to read from a file, pipe, or device, but it does allo...
admin
412
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
interrupts
descriptive
+
–
0
votes
1
answer
913
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 21 (Page No. 175)
Consider a system in which threads are implemented entirely in user space, with the run-time system getting a clock interrupt once a second. Suppose that a clock interrupt occurs while some thread is executing in the run-time system. What problem might occur? Can you suggest a way to solve it?
Consider a system in which threads are implemented entirely in user space, with the run-time system getting a clock interrupt once a second. Suppose that a clock interrup...
admin
1.3k
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
interrupts
descriptive
+
–
0
votes
0
answers
914
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 20 (Page No. 175)
In the discussion on global variables in threads, we used a procedure create global to allocate storage for a pointer to the variable, rather than the variable itself. Is this essential, or could the procedures work with the values themselves just as well?
In the discussion on global variables in threads, we used a procedure create global to allocate storage for a pointer to the variable, rather than the variable itself. Is...
admin
403
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
descriptive
+
–
0
votes
0
answers
915
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 19 (Page No. 175)
In Fig. $2-15$ the thread creations and messages printed by the threads are interleaved at random. Is there a way to force the order to be strictly thread $1$ created, thread $1$ prints message, thread $1$ exits, thread $2$ created, thread $2$ prints message, thread $2$ exists, and so on? If so, how? If not, why not?
In Fig. $2-15$ the thread creations and messages printed by the threads are interleaved at random. Is there a way to force the order to be strictly thread $1$ created, th...
admin
273
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
descriptive
+
–
0
votes
1
answer
916
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 18 (Page No. 175)
What is the biggest advantage of implementing threads in user space? What is the biggest disadvantage?
What is the biggest advantage of implementing threads in user space? What is the biggest disadvantage?
admin
292
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
descriptive
+
–
0
votes
1
answer
917
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 17 (Page No. 175)
In this problem, you are to compare reading a file using a single-threaded file server and a multithreaded server. It takes $12$ msec to get a request for work, dispatch it, and do the rest of the necessary ... the thread sleeps. How many requests/sec can the server handle if it is single threaded? If it is multithreaded?
In this problem, you are to compare reading a file using a single-threaded file server and a multithreaded server. It takes $12$ msec to get a request for work, dispatch ...
admin
2.6k
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
descriptive
+
–
0
votes
1
answer
918
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 16 (Page No. 175)
Can a thread ever be preempted by a clock interrupt? If so, under what circumstances? If not, why not?
Can a thread ever be preempted by a clock interrupt? If so, under what circumstances? If not, why not?
admin
1.7k
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
interrupts
descriptive
+
–
0
votes
1
answer
919
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 15 (Page No. 175)
Why would a thread ever voluntarily give up the CPU by calling thread yield? After all, since there is no periodic clock interrupt, it may never get the CPU back.
Why would a thread ever voluntarily give up the CPU by calling thread yield? After all, since there is no periodic clock interrupt, it may never get the CPU back.
admin
1.7k
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
interrupts
descriptive
+
–
0
votes
2
answers
920
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 14 (Page No. 175)
In Fig. $2-12$ the register set is listed as a per-thread rather than a per-process item. Why? After all, the machine has only one set of registers.
In Fig. $2-12$ the register set is listed as a per-thread rather than a per-process item. Why? After all, the machine has only one set of registers.
admin
1.2k
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
descriptive
+
–
0
votes
1
answer
921
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 13 (Page No. 174)
In the text, we described a multithreaded Web server, showing why it is better than a single-threaded server and a finite-state machine server. Are there any circumstances in which a single-threaded server might be better? Give an example.
In the text, we described a multithreaded Web server, showing why it is better than a single-threaded server and a finite-state machine server. Are there any circumstance...
admin
740
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
descriptive
+
–
0
votes
0
answers
922
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 12 (Page No. 174)
In Fig. $2-8$, a multithreaded Web server is shown. If the only way to read from a file is the normal blocking read system call, do you think user-level threads or kernel-level threads are being used for the Web server? Why?
In Fig. $2-8$, a multithreaded Web server is shown. If the only way to read from a file is the normal blocking read system call, do you think user-level threads or kernel...
admin
503
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
multithreaded
descriptive
+
–
0
votes
1
answer
923
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 11 (Page No. 174)
If a multithreaded process forks, a problem occurs if the child gets copies of all the parent’s threads. Suppose that one of the original threads was waiting for keyboard input. Now two threads are waiting for keyboard input, one in each process. Does this problem ever occur in single-threaded processes?
If a multithreaded process forks, a problem occurs if the child gets copies of all the parent’s threads. Suppose that one of the original threads was waiting for keyboa...
admin
1.3k
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
threads
descriptive
+
–
1
votes
0
answers
924
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 10 (Page No. 174)
In the text it was stated that the model of Fig. $2-11(a)$ was not suited to a file server using a cache in memory. Why not? Could each process have its own cache?
In the text it was stated that the model of Fig. $2-11(a)$ was not suited to a file server using a cache in memory. Why not? Could each process have its own cache?
admin
366
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
cache-memory
descriptive
+
–
0
votes
1
answer
925
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 9 (Page No. 174)
Assume that you are trying to download a large $2$-GB file from the Internet. The file is available from a set of mirror servers, each of which can deliver a subset of the file's bytes; assume that a ... request specifies the starting and ending bytes of the file. Explain how you might use threads to improve the download time.
Assume that you are trying to download a large $2$-GB file from the Internet. The file is available from a set of mirror servers, each of which can deliver a subset of th...
admin
862
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
threads
descriptive
+
–
1
votes
2
answers
926
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 8 (Page No. 174)
Consider a multiprogrammed system with degree of $6$ (i.e., six programs in memory at the same time). Assume that each process spends $40\%$ of its time waiting for I/O. What will be the CPU utilization?
Consider a multiprogrammed system with degree of $6$ (i.e., six programs in memory at the same time). Assume that each process spends $40\%$ of its time waiting for I/O. ...
admin
2.7k
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
descriptive
+
–
0
votes
1
answer
927
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 7 (Page No. 174)
Multiple jobs can run in parallel and finish faster than if they had run sequentially. Suppose that two jobs, each needing $20$ minutes of CPU time, start simultaneously. How long will the last one take to complete if they run sequentially? How long if they run in parallel? Assume $50\%$ I/O wait.
Multiple jobs can run in parallel and finish faster than if they had run sequentially. Suppose that two jobs, each needing $20$ minutes of CPU time, start simultaneously....
admin
1.9k
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
descriptive
+
–
0
votes
1
answer
928
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 6 (Page No. 174)
A computer has $4$ GB of RAM of which the operating system occupies $512$ MB. The processes are all $256$ MB (for simplicity) and have the same characteristics. If the goal is $99\%$ CPU utilization, what is the maximum I/O wait that can be tolerated?
A computer has $4$ GB of RAM of which the operating system occupies $512$ MB. The processes are all $256$ MB (for simplicity) and have the same characteristics. If the go...
admin
4.4k
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
descriptive
+
–
0
votes
1
answer
929
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 5 (Page No. 174)
A computer system has enough room to hold five programs in its main memory. These programs are idle waiting for I/O half the time. What fraction of the CPU time is wasted?
A computer system has enough room to hold five programs in its main memory. These programs are idle waiting for I/O half the time. What fraction of the CPU time is wasted...
admin
3.9k
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
descriptive
+
–
2
votes
1
answer
930
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 4 (Page No. 174)
When an interrupt or a system call transfers control to the operating system, a kernel stack area separate from the stack of the interrupted process is generally used. Why?
When an interrupt or a system call transfers control to the operating system, a kernel stack area separate from the stack of the interrupted process is generally used. Wh...
admin
2.0k
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
system-call
threads
descriptive
+
–
Page:
« prev
1
...
26
27
28
29
30
31
32
33
34
35
36
...
114
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register