
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Class: Operating Systems; Subject: Computer Engr & Computer Sci; University: California State University - Long Beach; Term: Fall 2005;
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

When there are concurrent processes trying to send output to the same monitor, their outputs are likely to be mixed up in an unpredictable manner, rendering the output to be unreadable. In this lab exercise we will learn to use semaphore, a mechanism available on Linux, to provide control of the access to shared resources (such as the monitor) by concurrent processes. To help you learn about this mechanism, two sample program named semaphore.cpp and semdemo1.cpp are provided for your reference. To understand this mechanism please reference manual pages for semget, semctl, and semop. Do the following for this assignment: