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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 00:00, lilyforeman5867
Match each vocabulary word to its definition.1. desktoppicture used to represent acomputer application2. domainnetwork protectionsoftware code that can be viewed,3. iconmodified, and redistributed for freethe background screen on acomputer monitor4. url5. blogan online journalthe part of an internet address that6. firewallrefers to a group of computers on anetworkonline database of web pages7. intranetnetwork for use by an individual8. open address of a web page or9. wikiresource
Answers: 2
image
Computers and Technology, 22.06.2019 21:00, raquelle66
So im doing this school challenge and the teachers said whats the average text a student gets a day so i need to get about 20 in a day but dont know how can you guys 2163371293
Answers: 2
image
Computers and Technology, 23.06.2019 11:00, swelch2010
Describe three characteristics of at-risk drivers. a. b. c. describe three characteristics of safe drivers. a. b. c. describe three driver errors that could cause a collision. a. b. c. how will this information affect you as a driver now and in the future? (2-3 sentences)
Answers: 2
image
Computers and Technology, 23.06.2019 17:00, quanharris2k19
The camera still is bad even with the new iphone xr and especially in low light it is even worst because you can see the pixels more if its in low light. if all you apple customers want apple to fix this then lets fill there feedback with complaints about the
Answers: 1
You know the right answer?
5processes are characterized by 3 readers and 2 writers. up to two reader processes can be inside th...

Questions in other subjects:

Konu
Social Studies, 12.01.2021 17:20
Konu
Chemistry, 12.01.2021 17:20