subject

5processes are characterized by 3 readers and 2 writers. up to two reader processes can be inside their critical section without any writer process. for writer process to go into its critical section, it should check whether there is any reader or writer process is in the critical section. critical section in this problem is reading shared data buffer for reader and updating shared data buffer for writer processes. it is up to you to implement any shared data for readers and writers but you have to specify clearly following things in your sample output. when reader or writer enters its critical section, it has to report whether there are any reader(s) or writer(s) other than itself. you may print out the data you read or write when you implement real buffer. (optional) you have to print out "panic messages" when the rules behind this semi critical section problem are not observed. in your main program, you run the random number generator function to choose process to execute. the chosen process starts (resumes) execution and after one instruction, it will be returned. (you should force each process run exactly one instruction then returns and waiting for its turn.) you can implement this using switch statement in c or c++. do not use any multi-threading nor mutex feature from resume at the right place once it will be chosen to run by keepin lobal counter variable subproject 1: you should implement binary and counting semaphores as studied in the class for this project subproiect2: you should implement swap operation as studied in the class for this project.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 15:00
Plz ( which is an example of a good url?
Answers: 1
question
Computers and Technology, 24.06.2019 01:30
Could you find out how im still getting an 83 percent on this in edhesive a = input("enter an animal: ") s = input ("enter a sound: ") e = "e-i-e-i-o" print ("old macdonald had a farm, " + e) print ("and on his farm he had a " + a + "," + e) print ("with a " + s + "-" + s + " here and a " + s + "-" + s + " there") print ("here a " + s+ " there a " + s) print ("everywhere a " + s + "-" + s ) print ("old macdonald had a farm, " + e)
Answers: 2
question
Computers and Technology, 24.06.2019 10:00
Which feature of a blog to restore and retrieve older post
Answers: 3
question
Computers and Technology, 24.06.2019 16:50
Ideally, the backrest is tilted back slightly, so when you turn the wheel your shoulders are the seat.
Answers: 2
You know the right answer?
5processes are characterized by 3 readers and 2 writers. up to two reader processes can be inside th...
Questions
question
Mathematics, 13.02.2021 01:30
Questions on the website: 13722367