Question

give the value of the updated semaphore and the content of the updated semaphore queue. Counting...

give the value of the updated semaphore and the content of the updated semaphore queue.

Counting Semaphores: S1, S2, S3 Binary Semaphores: S4, S5, S6 Semaphores initial values:

S1 = 1,   S2 = 0,   S3 = 2,   S4 = 0,   S5 = 1,   S6 = 1

1) P1: P(S3)

2) P2: P(S5)

3) P3: P(S5)

4) P5: P(S2)

5) P2: V(S2)

6) P10: V(S6)

7) P2: P(S4)

8) P6: P(S5)

9) P4: V(S4)

10)P4: P(S2)

Homework Answers

Answer #1

For binary semaphore;

P(semphore) will decrease the value of semaphore if it's value is greater than zero or it will block the process.

V(semphore) will unblock a process if any or will increase increase the value of semaphore by 1.

If you have any questions comment down and please? upvote thanks...

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
After each step, give the value of the updated semaphore and the content of the updated...
After each step, give the value of the updated semaphore and the content of the updated semaphore queue. Counting Semaphores: S1, S2, S3 Binary Semaphores: S4, S5, S6 Semaphores initial values: S1 = 1,   S2 = 0,   S3 = 2,   S4 = 0,   S5 = 1,   S6 = 1 1) P1: P(S3) 2) P2: P(S5) 3) P3: P(S5) 4) P5: P(S2) 5) P2: V(S2) 6) P10: V(S6) 7) P2: P(S4) 8) P6: P(S5) 9) P4: V(S4) 10)P4: P(S2)
SUPPLIER Sno Sname Status City s1 Smith 20 London s2 Jones 10 Paris s3 Blake 30...
SUPPLIER Sno Sname Status City s1 Smith 20 London s2 Jones 10 Paris s3 Blake 30 Paris s4 Clark 20 London s5 Adams 30 NULL PART Pno Pname Color Weight City p1 Nut Red 12 London p2 Bolt Green 17 Paris p3 Screw NULL 17 Rome p4 Screw Red 14 London p5 Cam Blue 12 Paris p6 Cog Red 19 London SHIPMENT Sno Pno Qty Price s1 p1 300 .005 s1 p2 200 .009 s1 p3 400 .004 s1 p4...
SUPPLIER Sno Sname Status City s1 Smith 20 London s2 Jones 10 Paris s3 Blake 30...
SUPPLIER Sno Sname Status City s1 Smith 20 London s2 Jones 10 Paris s3 Blake 30 Paris s4 Clark 20 London s5 Adams 30 NULL PART Pno Pname Color Weight City p1 Nut Red 12 London p2 Bolt Green 17 Paris p3 Screw NULL 17 Rome p4 Screw Red 14 London p5 Cam Blue 12 Paris p6 Cog Red 19 London SHIPMENT Sno Pno Qty Price s1 p1 300 .005 s1 p2 200 .009 s1 p3 400 .004 s1 p4...
SUPPLIER Sno Sname Status City s1 Smith 20 London s2 Jones 10 Paris s3 Blake 30...
SUPPLIER Sno Sname Status City s1 Smith 20 London s2 Jones 10 Paris s3 Blake 30 Paris s4 Clark 20 London s5 Adams 30 NULL PART Pno Pname Color Weight City p1 Nut Red 12 London p2 Bolt Green 17 Paris p3 Screw NULL 17 Rome p4 Screw Red 14 London p5 Cam Blue 12 Paris p6 Cog Red 19 London SHIPMENT Sno Pno Qty Price s1 p1 300 .005 s1 p2 200 .009 s1 p3 400 .004 s1 p4...
IN C++ - most of this is done it's just missing the bolded part... Write a...
IN C++ - most of this is done it's just missing the bolded part... Write a program that creates a class hierarchy for simple geometry. Start with a Point class to hold x and y values of a point. Overload the << operator to print point values, and the + and – operators to add and subtract point coordinates (Hint: keep x and y separate in the calculation). Create a pure abstract base class Shape, which will form the basis...
For the MIPS assembly instructions below, what is the corresponding C statement? Assume that the variables...
For the MIPS assembly instructions below, what is the corresponding C statement? Assume that the variables f, g, h, and I are assigned to registers $s0 - $s3, respectively. Assume that the base address of arrays X, Y, and Z are in registers $s4 - $s6, respectively. Be conservative and use a single temp register as possible. It is a C arithmetic command with two source operands and a destination. Each part is 3 points. Add $t0, $s0, $s1 addi...
Suppose we have a late night bus and towards the end of the route, there are...
Suppose we have a late night bus and towards the end of the route, there are 3 passengers {P1 , P2 ,, P3} and 5 stops {S1,S2,S3,S4,S5, } remain. Suppose further that each passenger is inebriated, and is thus is equally likely to get off at any one of the stops. (i) We wish to list the set of outcomes in the sample space each of whose outcomes is an ordered triple of all three Sij for I=1,2,3, where Sij...
The following processes are being scheduled using a preemptive, priority-based, round-robin scheduling algorithm. Each process is...
The following processes are being scheduled using a preemptive, priority-based, round-robin scheduling algorithm. Each process is assigned a numerical priority,with a higher number indicating a higher relative priority. The scheduler will execute the highest-priority process. For processes with the same priority, a round-robin scheduler will be used with a time quantum of 10 units. If a process is preempted by a higher-priority process, the preempted process is placed at the end of the queue. Process            Burst Time Arrival Time...
You work for Microsoft in their global smart phone group. You have been made project manager...
You work for Microsoft in their global smart phone group. You have been made project manager for the design of a new smart phone. Your supervisors have already scoped the project so you have a list showing the work breakdown structure and this includes major project activities. You must plan the project schedule and calculate project duration. Your boss wants the schedule on his desk tomorrow morning!      You have been given the information in Exhibit 5.13. It includes all the...
1. Over-applied overhead that is material in amount is allocated between Finished Goods inventory, Work in...
1. Over-applied overhead that is material in amount is allocated between Finished Goods inventory, Work in process Inventory and Cost of Goods sold at year end. Over-applied factory overhead that is immaterial in amount is closed to Cost of Goods Sold at year end. First and second sentence are true First and second sentence are false Only the first statement is true Only the second statement is true 2. Process costing is most appropriate when manufacturing large batches of homogeneous...