The entrance of vehicles in the university car park is now controlled by an application with the knowledge of the Curricular Unit of Operating Systems. The application can be developed in C language.
To solve the problem, use the various IPC mechanisms, and traffic lights are required.
The application must meet the following functional requirements:
1. The park can be used by students, teachers and staff. Vehicles entering the park as they arrive are on a first come first served basis (FIFO).
2. When the park is full, priority is given to students first, teachers second, and staff last.
3. Park capacity is limited to a maximum number of trips, defined by MAX_VIATURAS. Use a small value for testing purposes. example 5.
4. Using semaphores and other IPC mechanisms you deem necessary, program in C as functions that control an input and output of vehicles that use, for example, the following requirements: input_Victure (user_type) and exit_Viature (). Developed an application that allows you to validate these functions and efficiently control how park inputs and savings.
5. All IPC mechanisms should be dropped when the program terminates.