Suljettu

c++ reader and writer problem fixing codes need to use switch statement but not using mutex

5 processes 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 programming language. Each process is one big switch statement and will be returned after each instruction. You need to keep track of program counter of each process to resume at the right place once it will be chosen to run by keeping global counter variable per process. You should implement binary and counting semaphores as studied in the class for this project.

Taidot: C++ -ohjelmointi, C-ohjelmointi

Näytä lisää: magnetic card reader writer visual basic program, magnetic card reader writer program, free software msr206 reader writer, std::unique_lock, c++ background thread, reader writer problem, c++ mutex, c++ thread, read/write lock c implementation, c++ join multiple threads, c++ condition variable, reader writer, problem run service unmanaged use dll, css problem fixing, iptc reader writer, reader writer problem program, program implement reader writer problem, must use switch statement sentinel controlled loop, reader writer problem in java using semaphore, reader writer problem java

Tietoa työnantajasta:
( 0 arvostelua ) Russian Federation

Projektin tunnus: #26344683

5 freelanceria on tarjonnut keskimäärin 78$ tähän työhön

idleswell

Hello, I have 30 years experience programming in C++. I will create this system to simulate these readers & writers in critical sections. The program will execute as if these processes were in multiple threads - witho Lisää

$128 USD 4 päivässä
(63 arvostelua)
5.0
kalyanprakash123

Keen to do this, please discuss. Negotiable price and duration...........................................................................................................................................................

$60 USD 3 päivässä
(10 arvostelua)
3.7
belotefreelancer

I am expert in C,C++ programming. I have checked your requirement, yes I can do it, because I already work on similar requirement in past. I can complete your task within deadline with 100 % perfectly. I can assure yo Lisää

$40 USD 2 päivässä
(7 arvostelua)
3.0
Geiler

Hello, a pleasure to apply to your project. I am a c/c ++ expert with more than 4 years of experience, I can help you carry out your project! I guarantee you a 100% clean and commented code. Send me a message with more Lisää

$120 USD 2 päivässä
(4 arvostelua)
2.6
mzdesmag

hi, I have read the details of the project. I have worked as a Windows desktop/embedded *C/C++(MT4, 5)/C# developer for over 6 years, I have completed many simple and complex projects with Visual Studio and C++, some l Lisää

$40 USD 2 päivässä
(3 arvostelua)
3.1