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 15:10
Consider a direct-mapped cache with 216 words in main memory. the cache has 16 blocks of 8 words each. it is a word-addressable computer (rather than a byte-addressable computer which we normally discuss). (a) how many blocks of main memory are there? (b) what is the format of a memory address as seen by the cache, that is, what are the sizes of the tag, cache block, and block offset fields (if they apply)? (c) to which cache block will the memory reference db6316 map?
Answers: 1
question
Computers and Technology, 24.06.2019 03:30
Which explains extrinsic motivation? a)motivation in which there is a reward b)motivation that is personally satisfying c)motivation that is personally meaningful d)motivation in which the subject is interesting
Answers: 1
question
Computers and Technology, 24.06.2019 06:50
What are the things you are considering before uploading photos on social media?
Answers: 1
question
Computers and Technology, 24.06.2019 09:30
Retype the statements, correcting the syntax errors. system.out.println("num: " + songnum); system.out.println(int songnum); system.out.println(songnum " songs"); note: these activities may test code with different test values. this activity will perform two tests: the first with songnum = 5, the second with songnum = 9. see how to use zybooks.
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
question
Computers and Technology, 25.09.2020 20:01
question
English, 25.09.2020 20:01
Questions on the website: 13722367