Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Filter
Profile
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
Questions by akash.dinkar12
0
votes
0
answers
421
Galvin Edition 9 Exercise 5 Question 25 (Page No. 247)
Demonstrate that monitors and semaphores are equivalent in so far as they can be used to implement solutions to the same types of synchronization problems.
Demonstrate that monitors and semaphores are equivalent in so far as they can be used to implement solutions to the same types of synchronization problems.
392
views
asked
Mar 20, 2019
Operating System
galvin
operating-system
process-synchronization
descriptive
+
–
0
votes
0
answers
422
Galvin Edition 9 Exercise 5 Question 23 (Page No. 247)
Show how to implement the $wait()$ and $signal()$ semaphore operations in multiprocessor environments using the $test and set() $instruction. The solution should exhibit minimal busy waiting.
Show how to implement the $wait()$ and $signal()$ semaphore operations in multiprocessor environments using the $test and set() $instruction. The solution should exhibit ...
199
views
asked
Mar 20, 2019
Operating System
galvin
operating-system
process-synchronization
descriptive
+
–
0
votes
0
answers
423
Galvin Edition 9 Exercise 5 Question 22 (Page No. 247)
Windows Vista provides a lightweight synchronization tool called slim reader-writer locks. Whereas most implementations of reader-writer locks favor either readers or writers, or perhaps order waiting threads using a $FIFO$ policy, ... waiting threads ordered in a $FIFO$ queue. Explain the benefits of providing such a synchronization tool.
Windows Vista provides a lightweight synchronization tool called slim reader–writer locks. Whereas most implementations of reader–writer locks favor either readers or...
538
views
asked
Mar 20, 2019
Operating System
galvin
operating-system
process-synchronization
descriptive
+
–
0
votes
0
answers
424
Galvin Edition 9 Exercise 5 Question 21 (Page No. 247)
Servers can be designed to limit the number of open connections. For example, a server may wish to have only N socket connections at any point in time. As soon as N connections are made, the server will not accept ... existing connection is released. Explain how semaphores can be used by a server to limit the number of concurrent connections.
Servers can be designed to limit the number of open connections. For example, a server may wish to have only N socket connections at any point in time. As soon as N conne...
2.0k
views
asked
Mar 20, 2019
Operating System
galvin
operating-system
process-synchronization
descriptive
+
–
0
votes
0
answers
425
Galvin Edition 9 Exercise 5 Question 20 (Page No. 246-247)
Consider the code example for allocating and releasing processes shown below: ... of processes = 0 with the atomic integer atomic t number of processes = 0 to prevent the race condition(s)?
Consider the code example for allocating and releasing processes shown below:$#define MAX PROCESSES 255int number of processes = 0;/* the implementation of fork() calls t...
2.1k
views
asked
Mar 20, 2019
Operating System
galvin
operating-system
process-synchronization
descriptive
+
–
1
votes
0
answers
426
Galvin Edition 9 Exercise 5 Question 19 (Page No. 246)
A multithreaded web server wishes to keep track of the number of requests it services (known as hits). Consider the two following strategies to prevent a race condition on the variable hits. The first strategy is to use a basic ... Explain which of these two strategies is more efficient.
A multithreaded web server wishes to keep track of the number of requests it services (known as hits). Consider the two followingstrategies to prevent a race condition on...
650
views
asked
Mar 20, 2019
Operating System
galvin
operating-system
process-synchronization
descriptive
+
–
0
votes
0
answers
427
Galvin Edition 9 Exercise 5 Question 18 (Page No. 246)
Assume that a context switch takes T time. Suggest an upper bound (in terms of T) for holding a spinlock. If the spinlock is held for any longer, a mutex lock (where waiting threads are put to sleep) is a better alternative.
Assume that a context switch takes T time. Suggest an upper bound (in terms of T) for holding a spinlock. If the spinlock is held for any longer, a mutex lock (where wait...
445
views
asked
Mar 20, 2019
Operating System
galvin
operating-system
process-synchronization
descriptive
+
–
1
votes
0
answers
428
Galvin Edition 9 Exercise 5 Question 17 (Page No. 245)
Assume that a system has multiple processing cores. For each of the following scenarios, describe which is a better locking mechanism-a spinlock or a mutex lock where waiting processes sleep while waiting for the lock to become available: The ... lock is to be held for a long duration. A thread may be put to sleep while holding the lock.
Assume that a system has multiple processing cores. For each of the following scenarios, describe which is a better locking mechanism—a spinlock or a mutex lock where w...
783
views
asked
Mar 20, 2019
Operating System
galvin
operating-system
process-synchronization
descriptive
+
–
0
votes
0
answers
429
Galvin Edition 9 Exercise 5 Question 15 (Page No. 244)
Consider how to implement a mutex lock using an atomic hardware instruction. Assume that the following structure defining the mutex lock is available: typedef struct { int available; } lock; (available == 0) indicates that the lock is ... $ void release(lock *mutex)$ Be sure to include any initialization that may be necessary.
Consider how to implement a mutex lock using an atomic hardware instruction. Assume that the following structure defining the mutexlock is available:typedef struct {int a...
561
views
asked
Mar 20, 2019
Operating System
galvin
operating-system
process-synchronization
descriptive
+
–
0
votes
0
answers
430
Galvin Edition 9 Exercise 5 Question 14 (Page No. 244)
Describe how the compare_and_swap() instruction can be used to provide mutual exclusion that satisfies the bounded-waiting requirement.
Describe how the compare_and_swap() instruction can be used to provide mutual exclusion that satisfies the bounded-waiting requirement.
289
views
asked
Mar 20, 2019
Operating System
galvin
operating-system
process-synchronization
descriptive
+
–
0
votes
0
answers
431
Galvin Edition 9 Exercise 5 Question 13 (Page No. 244)
Describe two kernel data structures in which race conditions are possible.Be sure to include a description of how a race condition can occur.
Describe two kernel data structures in which race conditions are possible.Be sure to include a description of how a race condition can occur.
606
views
asked
Mar 20, 2019
Operating System
galvin
operating-system
process-synchronization
descriptive
+
–
0
votes
0
answers
432
Galvin Edition 9 Exercise 5 Question 12 (Page No. 244)
The Linux kernel has a policy that a process cannot hold a spin lock while attempting to acquire a semaphore. Explain why this policy is in place.
The Linux kernel has a policy that a process cannot hold a spin lock while attempting to acquire a semaphore. Explain why this policy is in place.
360
views
asked
Mar 20, 2019
Operating System
galvin
operating-system
process-synchronization
descriptive
+
–
0
votes
0
answers
433
Galvin Edition 9 Exercise 5 Question 11 (Page No. 244)
Explain why interrupts are not appropriate for implementing synchronization primitives in multiprocessor systems.
Explain why interrupts are not appropriate for implementing synchronization primitives in multiprocessor systems.
246
views
asked
Mar 20, 2019
Operating System
galvin
operating-system
process-synchronization
descriptive
+
–
0
votes
0
answers
434
Galvin Edition 9 Exercise 5 Question 10 (Page No. 243)
Explain why implementing synchronization primitives by disabling interrupts is not appropriate in a single-processor system if the synchronization primitives are to be used in user-level programs.
Explain why implementing synchronization primitives by disabling interrupts is not appropriate in a single-processor system if the synchronization primitives are to be us...
540
views
asked
Mar 20, 2019
Operating System
galvin
operating-system
process-synchronization
descriptive
+
–
1
votes
1
answer
435
Galvin Edition 9 Exercise 5 Question 9 (Page No. 243-245)
The first known correct software solution to the critical-section problem for n processes with a lower bound on waiting of n − 1 turns was presented by Eisenberg and McGuire. The processes share the following variables: enum pstate ${idle, want in, in cs}$; ...
The first known correct software solution to the critical-section problem for n processes with a lower bound on waiting of n − 1 turns was presented by Eisenberg and Mc...
2.1k
views
asked
Mar 20, 2019
Operating System
galvin
operating-system
process-synchronization
descriptive
+
–
0
votes
0
answers
436
Galvin Edition 9 Exercise 5 Question 8 (Page No. 243-244)
The first known correct software solution to the critical-section problem for two processes was developed by Dekker. The two processes, P0 and P1, share the following variables: boolean $flag[2]$; /* initially false */ int turn; The structure of ... * critical section */ turn = j; $flag[i]$ = false; /* remainder section */ } while (true);
The first known correct software solution to the critical-section problem for two processes was developed by Dekker. The two processes, P0 and P1, share the following var...
415
views
asked
Mar 20, 2019
Operating System
galvin
operating-system
process-synchronization
descriptive
+
–
0
votes
0
answers
437
Galvin Edition 9 Exercise 5 Question 7 (Page No. 243)
Race conditions are possible in many computer systems. Consider a banking system that maintains an account balance with two functions: $deposit(amount)$ and $withdraw(amount)$. These two functions are passed the amount that is to ... . Describe how a race condition is possible and what might be done to prevent the race condition from occurring.
Race conditions are possible in many computer systems. Consider a banking system that maintains an account balance with two functions: $deposit(amount)$ and $withdraw(amo...
748
views
asked
Mar 20, 2019
Operating System
galvin
operating-system
process-synchronization
descriptive
+
–
0
votes
1
answer
438
Galvin Edition 9 Exercise 5 Question 6 (Page No. 243)
Illustrate how a binary semaphore can be used to implement mutual exclusion among n processes.
Illustrate how a binary semaphore can be used to implement mutual exclusion among n processes.
3.3k
views
asked
Mar 20, 2019
Operating System
galvin
operating-system
process-synchronization
descriptive
+
–
0
votes
0
answers
439
Galvin Edition 9 Exercise 5 Question 5 (Page No. 243)
Show that, if the $wait()$ and $signal()$ semaphore operations are not executed atomically, then mutual exclusion may be violated.
Show that, if the $wait()$ and $signal()$ semaphore operations are not executed atomically, then mutual exclusion may be violated.
149
views
asked
Mar 20, 2019
Operating System
galvin
operating-system
process-synchronization
descriptive
+
–
0
votes
0
answers
440
Galvin Edition 9 Exercise 5 Question 4 (Page No. 243)
Explain why spin locks are not appropriate for single-processor systems yet are often used in multiprocessor systems.
Explain why spin locks are not appropriate for single-processor systems yet are often used in multiprocessor systems.
150
views
asked
Mar 20, 2019
Operating System
galvin
operating-system
process-synchronization
descriptive
+
–
Page:
« prev
1
...
17
18
19
20
21
22
23
24
25
26
27
28
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register