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, 22.06.2019 09:30
Is a string of code written to hurt others by damaging or destroying
Answers: 1
question
Computers and Technology, 22.06.2019 10:30
What can tanya do now to start preparing for the college and scholarship application process? think about her grades, activities in which she can get involved, possible part-time jobs at which she can work, and standardized tests she can take. (10 points) apex
Answers: 2
question
Computers and Technology, 22.06.2019 18:30
Kto rozmawia z clamentain przez krótkofalówke w the walking dead w 4 epizodzie
Answers: 1
question
Computers and Technology, 23.06.2019 17:10
Ac++an of of pi. in , pi is by : pi = 4 – 4/3 + 4/5 – 4/7 + 4/9 - 4/11 + 4/13 - 4/15 + 4/17 . ., to pi (9 ). , if 5 to pi,be as : pi = 4 - 4/3 + 4/5 - 4/7 + 4/9 = 4 – 1. + 0.8 - 0. + 0. = 3.. atoofbe to pi?
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, 03.04.2021 03:00
question
Mathematics, 03.04.2021 03:00
question
Mathematics, 03.04.2021 03:00