Which one of the following concepts can not be used for synchronization in multithreaded applications? Mutex Semaphone Condition Variables Unix Signals Skip
Added by Gregory Y.
Close
Step 1
Step 1: Identify the concepts listed in the question: Mutex, Semaphore, Condition Variables, Unix Signals, Skip. Show more…
Show all steps
Your feedback will help us improve your experience
Ravindra Yadav and 71 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
All processes share a semaphore variable mutex, initialized to 1. Each process must execute wait(mutex) before entering the critical section and signal(mutex) afterward. Suppose a process executes in the following manner: signal(mutex), critical section wait(mutex), In this situation: a deadlock will occur processes will starve to enter the critical section several processes may be executing in their critical section all of the mentioned
Madhur L.
5. Give an example in pseudo-code of 3 processes that use semaphores such that, according to the order in which they are executed, can either: terminate normally; or deadlock. Remember to indicate how the semaphores are initialized. 6. Insert semaphores to satisfy the properties: P1: print(A); print(B); print(C); P2: print(E); print(F); print(G); * print A before printing F * print F before printing C Don't forget to indicate the initial value of the semaphores. 7. Insert semaphores such that only ACERO or ACREO is printed. P1: print(C); print(E); P2: print(A); print(R); print(O); Don't forget to indicate the initial value of the semaphores. 8. Assuming semaphores SA, SB, and SC are initialized at 0, what strings can be printed? P1: repeat print(A); SC.V; SA.P; forever P2: repeat print(B); SC.V; SB.P; forever P3: repeat SC.P; SC.P; print(C); SA.V; SB.V; forever 9. Explain why interrupts are not appropriate for implementing synchronization primitives in multiprocessor systems. 10. What is the meaning of the term busy waiting? What other kinds of waiting are there in an operating system? Can busy waiting be avoided altogether? Explain your answer. 11. Consider the version of the dining-philosophers problem in which the chopsticks are placed at the center of the table and any two of them can be used by a philosopher. Assume that requests for chopsticks are made one at a time. Describe a simple rule for determining whether a particular request can be satisfied without causing deadlock given the current allocation of chopsticks to philosophers.
Akash M.
Which of the following statement(s) is false? (i) Spinlocks are not appropriate for single-processor systems. (ii) Mailboxes may be used for synchronization. (iii) Message passing and semaphores do not have equivalent functionality. (A) (i) only (B) (iii) only (C) (i), (iii) (D) (i), (ii), (iii)
OPERATING SYSTEM
INTERPROCESS COMMUNICATION, CONCURRENCY AND SYNCHRONIZATION
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD