Find Jobs
Hire Freelancers

classical synchronization problems in order to see how the (semi) critical section problem could be implemented using binary and counting semaphores.

$10-30 USD

Adjudicado
Publicado hace más de 8 años

$10-30 USD

Pagado a la entrega
In this lab you will simulate one of the classical synchronization problems in order to see how the (semi) critical section problem could be implemented using binary and counting semaphores. The lab is due in 2 weeks, 29th October 2015. 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++. 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. Subproject 1: You should implement binary and counting semaphores as studied in the class for this project. Subproject 2: You should implement testandset operation as studied in the class for this project.
ID del proyecto: 8807747

Información sobre el proyecto

2 propuestas
Proyecto remoto
Activo hace 9 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
2 freelancers están ofertando un promedio de $30 USD por este trabajo
Avatar del usuario
Hi there! I can make 3 versions, one with “Panic Messages”, the second one with semaphores and one with a lock based on testandset. I'll write it in C, nice code with comments. Is that what you want? If you confirm this soon enough, I can do it tomorrow and you'll have it ready in the evening. If you want, we can have a short call on skype and discuss details. Regards, Wojtek Dziewięcki
$35 USD en 1 día
0,0 (0 comentarios)
0,0
0,0

Sobre este cliente

Bandera de UNITED STATES
United States
5,0
1
Miembro desde oct 31, 2015

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.