https://github.com/chamale-rac/synching
Experimenting with software synchronization concepts using C and C++
https://github.com/chamale-rac/synching
Last synced: about 2 months ago
JSON representation
Experimenting with software synchronization concepts using C and C++
- Host: GitHub
- URL: https://github.com/chamale-rac/synching
- Owner: chamale-rac
- License: gpl-3.0
- Created: 2024-05-26T03:56:09.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-05-28T03:16:19.000Z (11 months ago)
- Last Synced: 2025-01-26T04:42:13.948Z (3 months ago)
- Language: C
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# synching 🧵🔧
Experimenting with software synchronization concepts using C and C++| 🧪 Laboratorio 5 - SISTEMAS OPERATIVOS - SECCIÓN - 20 - 2024 - 1
## Program 1: Using Semaphores 🚦
### Description
This program manages the consumption of resources by multiple threads using semaphores. It logs detailed information about the operations performed by each thread.### Compilation
To compile the program, use the following command:
```sh
gcc -o _semaphores _semaphores.c -lpthread
```### Execution
To run the compiled program, use the following command:
```sh
./_semaphores
```### Example
```sh
./_semaphores 5 10 5 semaphore_log.txt
```### Log File
The program will create a log file named `semaphore_log.txt` in the same directory, recording the detailed operations performed by each thread.---
## Program 2: Using Monitors 📏
### Description
This program allows threads to consume a given number of resources and uses a monitor for synchronization. It logs detailed information about the operations performed by each thread.### Compilation
To compile the program, use the following command:
```sh
gcc -o _monitors _monitors.c -lpthread
```### Execution
To run the compiled program, use the following command:
```sh
./_monitors
```### Example
```sh
./_monitors 5 10 5 1 3 monitor_log.txt
```### Log File
The program will create a log file named `monitor_log.txt` in the same directory, recording the detailed operations performed by each thread.---
## Team 🤓
Samuel Chamalé