Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged semaphore
1
votes
2
answers
31
Process synchronzation
A particular computation of counting semaphore is 7 Then 20p operation and x. V operation were completed on this semaphore If the final value of X will be 5 then what will be the value of x? Options a) 13 b) 18 C) 22 d) 2
A particular computation of counting semaphore is 7 Then 20p operation and x. V operation were completed on this semaphore If the final value of X will be 5 then what wi...
Vaishnavi Gadhe
692
views
Vaishnavi Gadhe
asked
Jul 2, 2022
Operating System
operating-system
process-synchronization
semaphore
+
–
5
votes
0
answers
32
Semaphores
Using semaphores, design a solution to manage clients access to five banking tellers given the following operation scenario: The bank has a space with 15 chairs and a standing area that can accommodate up to 10 clients. Hence, the maximum number of clients allowed to ... ticket, the client needs to enter his ID. When a teller is available, one. help me to answer this question please.
Using semaphores, design a solution to manage clients access to five banking tellers given the following operation scenario: The bank has a space with 15 chairs and a sta...
merna
1.2k
views
merna
asked
May 13, 2022
Operating System
operating-system
semaphore
+
–
12
votes
3
answers
33
GATE CSE 2022 | Question: 9
Consider the following threads, $\text{T}_{1}, \text{T}_{2},$ and $\text{T}_{3}$ executing on a single processor, synchronized using three binary semaphore variables, $\text{S}_{1}, \text{S}_{2},$ and $\text{S}_{3},$ operated upon using standard $\textsf{wait}()$ ... $\text{S}_{1} = 0; \text{S}_{2} = 1; \text{S}_{3} = 1$
Consider the following threads, $\text{T}_{1}, \text{T}_{2},$ and $\text{T}_{3}$ executing on a single processor, synchronized using three binary semaphore variables, $\t...
Arjun
8.9k
views
Arjun
asked
Feb 15, 2022
Operating System
gatecse-2022
operating-system
process-synchronization
semaphore
1-mark
+
–
0
votes
0
answers
34
self-doubt operating-system semaphore
given solution is wait(P) , wait(Q), wait(p) , wait(Q) for s1,s2,s3,s4 respectively I know this implementation is deadlock free just want to ask if it will follow bounded waiting and progress and how both of them are different?
given solution is wait(P) , wait(Q), wait(p) , wait(Q) for s1,s2,s3,s4 respectivelyI know this implementation is deadlock free just want to ask if it will follow bounded ...
Arbaz__Malik
607
views
Arbaz__Malik
asked
Dec 25, 2021
Operating System
self-doubt
operating-system
semaphore
+
–
1
votes
2
answers
35
Operation system Applied test series 2022
If the P() and V() semaphore operations are not executed atomically, then which of the following are always correct? Mutual exclusion satisfied Progress is not satisfied Bounded waiting is not satisfied None of the above Can anyone help me in this A should not be the ans as there is no restriction on atomicity. What about b and c.
If the P() and V() semaphore operations are not executed atomically, then which of the following are always correct?Mutual exclusion satisfied Progress is not satisfiedBo...
ramakrushna
719
views
ramakrushna
asked
Dec 18, 2021
Operating System
test-series
operating-system
semaphore
mutual-exclusion
+
–
1
votes
1
answer
36
Applied Test Series
It is given that in a system, processes P and C communicate by means of 3 semaphores and one buffer. The buffer size is given as 10. A semaphore M is used to implement mutual exclusion. Initial value of M is 1. The value of M is decremented by any process ... = 1, E = 7, F = 0 Out of the four combinations given above, the total number of combinations which cannot exist is ____
It is given that in a system, processes P and C communicate by means of 3 semaphores and one buffer. The buffer size is given as 10. A semaphore M is used to implement mu...
LRU
638
views
LRU
asked
Oct 17, 2021
Operating System
test-series
operating-system
process-synchronization
semaphore
+
–
21
votes
4
answers
37
GATE CSE 2021 Set 1 | Question: 46
Consider the following pseudocode, where $\textsf{S}$ is a semaphore initialized to $5$ in line $\#2$ and $\textsf{counter}$ is a shared variable initialized to $0$ in line $\#1$. Assume that the increment operation in line $\#7$ ... is $0$ after all the threads successfully complete the execution of $\textsf{parop}$ There is a deadlock involving all the threads
Consider the following pseudocode, where $\textsf{S}$ is a semaphore initialized to $5$ in line $\#2$ and $\textsf{counter}$ is a shared variable initialized to $0$ in li...
Arjun
13.2k
views
Arjun
asked
Feb 18, 2021
Operating System
gatecse-2021-set1
multiple-selects
operating-system
process-synchronization
semaphore
2-marks
+
–
2
votes
5
answers
38
UGC NET CSE | January 2017 | Part 2 | Question: 36
There are three processes $P_{1}, P_{2}$ and $P_{3}$ sharing a semaphore for synchronizing a variable. Initial value of semaphore is one. Assume that negative value of semaphore tells us how many processes are waiting in queue. Processes access ... section $P1$ exits critical section The final value of semaphore will be : $0$ $1$ $-1$ $-2$
There are three processes $P_{1}, P_{2}$ and $P_{3}$ sharing a semaphore for synchronizing a variable. Initial value of semaphore is one. Assume that negative value of se...
go_editor
2.3k
views
go_editor
asked
Mar 24, 2020
Operating System
ugcnetjan2017ii
operating-system
semaphore
+
–
19
votes
3
answers
39
GATE CSE 2020 | Question: 34
Each of a set of $n$ processes executes the following code using two semaphores $a$ and $b$ initialized to $1$ and $0$, respectively. Assume that $\text{count}$ is a shared variable initialized to $0$ ... all processes execute CODE SECTION P mutually exclusively. It ensures that at most $n-1$ processes are in CODE SECTION P at any time.
Each of a set of $n$ processes executes the following code using two semaphores $a$ and $b$ initialized to $1$ and $0$, respectively. Assume that $\text{count}$ is a shar...
Arjun
13.5k
views
Arjun
asked
Feb 12, 2020
Operating System
gatecse-2020
operating-system
semaphore
2-marks
+
–
4
votes
4
answers
40
ISRO2020-57
The hardware implementation which provides mutual exclusion is Semaphores Test and set instructions Both options None of the options
The hardware implementation which provides mutual exclusion isSemaphoresTest and set instructionsBoth optionsNone of the options
Satbir
5.1k
views
Satbir
asked
Jan 13, 2020
Operating System
isro-2020
operating-system
semaphore
mutual-exclusion
normal
+
–
0
votes
0
answers
41
Andrew S. Tanenbaum (OS) Edition 4 Exercise 6 Question 39 (Page No. 469)
A student majoring in anthropology and minoring in computer science has embarked on a research project to see if African baboons can be taught about deadlocks. He locates a deep canyon and fastens a rope across ... . Do not worry about a series of eastward-moving baboons holding up the westward-moving baboons indefinitely.
A student majoring in anthropology and minoring in computer science has embarked on a research project to see if African baboons can be taught about deadlocks. He locates...
admin
565
views
admin
asked
Oct 30, 2019
Operating System
tanenbaum
operating-system
deadlock-prevention-avoidance-detection
semaphore
descriptive
+
–
1
votes
0
answers
42
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 64 (Page No. 179 - 180)
The objective of this exercise is to implement a multithreaded solution to find if a given number is a perfect number. $N$ is a perfect number if the sum of all its factors, excluding itself, is $N;$ examples are ... can make the computation faster by restricting the numbers searched from $1$ to the square root of $N.)$
The objective of this exercise is to implement a multithreaded solution to find if a given number is a perfect number. $N$ is a perfect number if the sum of all its facto...
admin
359
views
admin
asked
Oct 25, 2019
Operating System
tanenbaum
operating-system
process-and-threads
multithreaded
semaphore
descriptive
+
–
0
votes
0
answers
43
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 62 (Page No. 179)
Write a producer-consumer problem that uses threads and shares a common buffer. However, do not use semaphores or any other synchronization primitives to guard the shared data structures. Just let each thread access them when ... Do not print more than one number every minute because the I/O could affect the race conditions.
Write a producer-consumer problem that uses threads and shares a common buffer. However, do not use semaphores or any other synchronization primitives to guard the shared...
admin
701
views
admin
asked
Oct 25, 2019
Operating System
tanenbaum
operating-system
process-and-threads
semaphore
process-synchronization
descriptive
+
–
0
votes
0
answers
44
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 60 (Page No. 179)
Suppose that a university wants to show off how politically correct it is by applying the U.S. Supreme Court's Separate but equal is inherently unequal'' doctrine to gender as well ... : woman_wants_to_enter, man_wants_to_enter, woman_leaves, man_leaves. You may use whatever counters and synchronization techniques you like.
Suppose that a university wants to show off how politically correct it is by applying the U.S. Supreme Court’s ‘‘Separate but equal is inherently unequal’’ doct...
admin
761
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 59 (Page No. 179)
Solve the dining philosophers problem using monitors instead of semaphores.
Solve the dining philosophers problem using monitors instead of semaphores.
admin
328
views
admin
asked
Oct 25, 2019
Operating System
tanenbaum
operating-system
process-and-threads
semaphore
monitors
descriptive
+
–
0
votes
0
answers
46
Andrew S. Tanenbaum (OS) Edition 4 Exercise 2 Question 58 (Page No. 179)
Assume that you have an operating system that provides semaphores. Implement a message system. Write the procedures for sending and receiving messages.
Assume that you have an operating system that provides semaphores. Implement a message system. Write the procedures for sending and receiving messages.
admin
337
views
admin
asked
Oct 25, 2019
Operating System
tanenbaum
operating-system
process-and-threads
semaphore
descriptive
+
–
0
votes
1
answer
47
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
660
views
admin
asked
Oct 25, 2019
Operating System
tanenbaum
operating-system
process-and-threads
process-synchronization
semaphore
descriptive
+
–
0
votes
0
answers
48
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
322
views
admin
asked
Oct 25, 2019
Operating System
tanenbaum
operating-system
process-and-threads
semaphore
descriptive
+
–
0
votes
1
answer
49
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.0k
views
admin
asked
Oct 25, 2019
Operating System
tanenbaum
operating-system
process-and-threads
interrupts
semaphore
descriptive
+
–
1
votes
1
answer
50
Why after improving implementation of semaphores we still have busy waiting time?
Bhaskar Singh
954
views
Bhaskar Singh
asked
May 26, 2019
Operating System
operating-system
semaphore
+
–
1
votes
2
answers
51
Doubt in Reader-Writer Problem's Solution
Why in reader section we are locking(I highlighted the locking) read_count-- and if section? If we don't use locking what problems might arise? I know that we should use locking whenever we access shared variable but in this particular case I don't see any problem if we don't use locking(highlighted). Please explain what I am missing
Why in reader section we are locking(I highlighted the locking) read_count and if section?If we don't use locking what problems might arise?I know that we should use loc...
Bhaskar Singh
1.4k
views
Bhaskar Singh
asked
May 26, 2019
Operating System
process-synchronization
semaphore
operating-system
+
–
0
votes
0
answers
52
Operating System - Galvin - Chapter 3
Galvin, 9th edition on page 146 states that Shared memory can be faster than message passing, since message-passing systems are typically implemented using system calls and thus require the more time-consuming task of kernel intervention. In ... that shared memory is bound to be faster, but aren't the mutex and semaphore calls require Kernel intervention?
Galvin, 9th edition on page 146 states that“Shared memory can be faster than message passing, since message-passing systems are typically implemented using system calls...
vinay chauhan
1.2k
views
vinay chauhan
asked
May 5, 2019
Operating System
operating-system
process-synchronization
semaphore
shared-memory
+
–
1
votes
1
answer
53
MADE EASY FREE TEST
a)Mutual exclusion, progress, bounded wait all are satisfied b)Mutual exclusion, progress satisfied but bounded wait not satisfied c)Mutual exclusion satisfied progress, bounded wait not satisfied
a)Mutual exclusion, progress, bounded wait all are satisfiedb)Mutual exclusion, progress satisfied but bounded wait not satisfiedc)Mutual exclusion satisfied progress, bo...
Hirak
897
views
Hirak
asked
May 4, 2019
Operating System
semaphore
+
–
3
votes
4
answers
54
Ace Test Series: Operating System - Reader Writer Problem
Na462
1.9k
views
Na462
asked
Jan 21, 2019
Operating System
operating-system
process-synchronization
semaphore
binary-semaphore
ace-test-series
+
–
1
votes
1
answer
55
ME & Deadlock - Semaphores
Will there be Mutual Exclusion & Deadlock ?
Will there be Mutual Exclusion & Deadlock ?
SamAddy
751
views
SamAddy
asked
Jan 20, 2019
Operating System
operating-system
semaphore
process-synchronization
deadlock-prevention-avoidance-detection
mutual-exclusion
+
–
6
votes
1
answer
56
MadeEasy Full Length Test 2019: Operating System - Semaphore
Let S be a binary semaphore variable, S=0 What will be the value of S when following operations are performed:- 2P, 4V, 5P, 2P, 8V, 3P, 2V ?
Let S be a binary semaphore variable, S=0What will be the value of S when following operations are performed:-2P, 4V, 5P, 2P, 8V, 3P, 2V ?
Shamim Ahmed
1.4k
views
Shamim Ahmed
asked
Jan 13, 2019
Operating System
operating-system
semaphore
made-easy-test-series
+
–
0
votes
2
answers
57
the processes P1, P2, and P3. The S1, S2 and S3 are counting semaphore variables
Consider the following synchronization construct used by the processes P1, P2, and P3. The S1, S2 and S3 are counting semaphore variables: S1 = 3, S2 = 2, S3 = 1; P(S1); P(S2); P(S3); Critical Section V(S3); V(S2); V(S1); Does it satisfy mutual exclusion, progress and bounded waiting?
Consider the following synchronization construct used by the processes P1, P2, and P3. The S1, S2 and S3 are counting semaphore variables:S1 = 3, S2 = 2, S3 = 1;P(S1);P(S...
syncronizing
4.8k
views
syncronizing
asked
Jan 6, 2019
Operating System
made-easy-test-series
semaphore
operating-system
+
–
Page:
« prev
1
2
3
4
5
6
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register