Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged process-and-threads
0
votes
0
answers
31
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 48 (Page No. 178)
For the above problem, can another video stream be added and have the system still be schedulable?
For the above problem, can another video stream be added and have the system still be schedulable?
admin
304
views
admin
asked
Oct 25, 2019
Operating System
tanenbaum
operating-system
process-and-threads
process-scheduling
descriptive
+
–
0
votes
1
answer
32
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 47 (Page No. 178)
Consider a real-time system with two voice calls of periodicity $5$ msec each with CPU time per call of $1$ msec, and one video stream of periodicity $33$ ms with CPU time per call of $11$ msec. Is this system schedulable?
Consider a real-time system with two voice calls of periodicity $5$ msec each with CPU time per call of $1$ msec, and one video stream of periodicity $33$ ms with CPU tim...
admin
1.3k
views
admin
asked
Oct 25, 2019
Operating System
tanenbaum
operating-system
process-and-threads
process-scheduling
descriptive
+
–
1
votes
1
answer
33
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 46 (Page No. 178)
A process running on $CTSS$ needs $30$ quanta to complete. How many times must it be swapped in, including the very first time (before it has run at all)?
A process running on $CTSS$ needs $30$ quanta to complete. How many times must it be swapped in, including the very first time (before it has run at all)?
admin
713
views
admin
asked
Oct 25, 2019
Operating System
tanenbaum
operating-system
process-and-threads
process-scheduling
descriptive
+
–
0
votes
0
answers
34
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 45 (Page No. 177 - 178)
Five batch jobs. $A$ through $E$, arrive at a computer center at almost the same time. They have estimated running times of $10, 6, 2, 4,$ and $8$ ... through $(d),$ assume that only one job at a time runs, until it finishes. All jobs are completely CPU bound.
Five batch jobs. $A$ through $E$, arrive at a computer center at almost the same time. They have estimated running times of $10, 6, 2, 4,$ and $8$ minutes. Their (externa...
admin
590
views
admin
asked
Oct 25, 2019
Operating System
tanenbaum
operating-system
process-and-threads
process-scheduling
descriptive
+
–
0
votes
1
answer
35
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 44 (Page No. 177)
Five jobs are waiting to be run. Their expected run times are $9, 6, 3, 5,$ and $X$. In what order should they be run to minimize average response time? $($Your answer will depend on $X.)$
Five jobs are waiting to be run. Their expected run times are $9, 6, 3, 5,$ and $X$. In what order should they be run to minimize average response time? $($Your answer wi...
admin
2.9k
views
admin
asked
Oct 25, 2019
Operating System
tanenbaum
operating-system
process-and-threads
process-scheduling
descriptive
+
–
1
votes
1
answer
36
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 43 (Page No. 177)
Measurements of a certain system have shown that the average process runs for a time $T$ before blocking on $I/O$. A process switch requires a time $S$, which is effectively wasted (overhead). For round-robin scheduling with quantum $Q$, give a formula ... $Q > T$ $S < Q < T $ $Q = S$ $Q\: \text{nearly}\: 0$
Measurements of a certain system have shown that the average process runs for a time $T$ before blocking on $I/O$. A process switch requires a time $S$, which is effectiv...
admin
2.0k
views
admin
asked
Oct 25, 2019
Operating System
tanenbaum
operating-system
process-and-threads
process-scheduling
round-robin-scheduling
descriptive
+
–
0
votes
1
answer
37
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 42 (Page No. 177)
Explain how time quantum value and context switching time affect each other, in a round-robin scheduling algorithm.
Explain how time quantum value and context switching time affect each other, in a round-robin scheduling algorithm.
admin
2.3k
views
admin
asked
Oct 25, 2019
Operating System
tanenbaum
operating-system
process-and-threads
context-switch
process-scheduling
round-robin-scheduling
descriptive
+
–
0
votes
1
answer
38
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 41 (Page No. 177)
Can a measure of whether a process is likely to be CPU bound or I/O bound be determined by analyzing source code? How can this be determined at run time?
Can a measure of whether a process is likely to be CPU bound or I/O bound be determined by analyzing source code? How can this be determined at run time?
admin
998
views
admin
asked
Oct 25, 2019
Operating System
tanenbaum
operating-system
process-and-threads
process
descriptive
+
–
0
votes
3
answers
39
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 40 (Page No. 177)
Round-robin schedulers normally maintain a list of all runnable processes, with each process occurring exactly once in the list. What would happen if a process occurred twice in the list? Can you think of any reason for allowing this?
Round-robin schedulers normally maintain a list of all runnable processes, with each process occurring exactly once in the list. What would happen if a process occurred t...
admin
1.4k
views
admin
asked
Oct 25, 2019
Operating System
tanenbaum
operating-system
process-and-threads
process-scheduling
descriptive
+
–
5
votes
8
answers
40
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 39 (Page No. 177)
Consider the following piece of C code: void main( ) { fork( ); fork( ); exit( ); } How many child processes are created upon execution of this program?
Consider the following piece of C code: void main( ) { fork( ); fork( ); exit( ); }How many child processes are created upon execution of this program?
admin
3.5k
views
admin
asked
Oct 25, 2019
Operating System
tanenbaum
operating-system
process-and-threads
fork-system-call
descriptive
+
–
1
votes
1
answer
41
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 38 (Page No. 177)
The $CDC\: 6600$ computers could handle up to $10\: I/O$ processes simultaneously using an interesting form of round-robin scheduling called processor sharing. A process switch occurred after each instruction, so ... the absence of competition, how much time would it need if processor sharing was used with n processes?
The $CDC\: 6600$ computers could handle up to $10\: I/O$ processes simultaneously using an interesting form of round-robin scheduling called processor sharing. A process ...
admin
824
views
admin
asked
Oct 25, 2019
Operating System
tanenbaum
operating-system
process-and-threads
process-synchronization
descriptive
+
–
0
votes
0
answers
42
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 37 (Page No. 177)
Suppose that we have a message-passing system using mailboxes. When sending to a full mailbox or trying to receive from an empty one, a process does not block. Instead, it gets an error code back. The process ... error code by just trying again, over and over, until it succeeds. Does this scheme lead to race conditions?
Suppose that we have a message-passing system using mailboxes. When sending to a full mailbox or trying to receive from an empty one, a process does not block. Instead, i...
admin
370
views
admin
asked
Oct 25, 2019
Operating System
tanenbaum
operating-system
process-and-threads
race-conditions
descriptive
+
–
0
votes
0
answers
43
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 36 (Page No. 176)
A fast-food restaurant has four kinds of employees: $(1)$ order takers, who take customers' orders; $(2)$ cooks, who prepare the food; $(3)$ packaging specialists, who stuff the food into bags; ... a communicating sequential process. What form of interprocess communication do they use? Relate this model to processes in UNIX.
A fast-food restaurant has four kinds of employees: $(1)$ order takers, who take customers’ orders; $(2)$ cooks, who prepare the food; $(3)$ packaging specialists, who ...
admin
580
views
admin
asked
Oct 25, 2019
Operating System
tanenbaum
operating-system
process-and-threads
descriptive
+
–
0
votes
1
answer
44
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 35 (Page No. 176)
Synchronization within monitors uses condition variables and two special operations, wait and signal. A more general form of synchronization would be to have a single primitive, waituntil, that had an arbitrary Boolean predicate as ... or Brinch Hansen, but it is not used. Why not? (Hint: Think about the implementation.)
Synchronization within monitors uses condition variables and two special operations, wait and signal. A more general form of synchronization would be to have a single pri...
admin
679
views
admin
asked
Oct 25, 2019
Operating System
tanenbaum
operating-system
process-and-threads
process-synchronization
semaphore
descriptive
+
–
0
votes
0
answers
45
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 34 (Page No. 176)
Can two threads in the same process synchronize using a kernel semaphore if the threads are implemented by the kernel? What if they are implemented in user space? Assume that no threads in any other processes have access to the semaphore. Discuss your answers.
Can two threads in the same process synchronize using a kernel semaphore if the threads are implemented by the kernel? What if they are implemented in user space? Assume ...
admin
328
views
admin
asked
Oct 25, 2019
Operating System
tanenbaum
operating-system
process-and-threads
semaphore
descriptive
+
–
0
votes
1
answer
46
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
47
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
357
views
admin
asked
Oct 25, 2019
Operating System
tanenbaum
operating-system
process-and-threads
machine-instruction
descriptive
+
–
0
votes
1
answer
48
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
49
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
361
views
admin
asked
Oct 25, 2019
Operating System
tanenbaum
operating-system
process-and-threads
mutual-exclusion
descriptive
+
–
0
votes
0
answers
50
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
576
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
multiprocessors
descriptive
+
–
0
votes
0
answers
51
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
336
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
multiprocessors
descriptive
+
–
0
votes
1
answer
52
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
591
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
threads
descriptive
+
–
0
votes
0
answers
53
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
54
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
276
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
descriptive
+
–
0
votes
0
answers
55
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
56
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
353
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
descriptive
+
–
0
votes
0
answers
57
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
58
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
59
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
402
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
descriptive
+
–
0
votes
0
answers
60
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
268
views
admin
asked
Oct 24, 2019
Operating System
tanenbaum
operating-system
process-and-threads
descriptive
+
–
Page:
« prev
1
2
3
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register