Compare commits

..

2 Commits

Author SHA1 Message Date
ae
d85cf11754
docs: ftok clarification & updated gitignore 2024-10-13 23:10:42 +03:00
ae
dfc4d63985
docs: typos 2024-10-13 21:03:31 +03:00
2 changed files with 6 additions and 5 deletions

1
.gitignore vendored
View File

@ -30,6 +30,7 @@
*.dylib *.dylib
# Executables # Executables
out/
*.exe *.exe
*.out *.out
*.app *.app

View File

@ -15,18 +15,18 @@
**Criteria 1:** **Criteria 1:**
- Init is a parent process, which forks child processes P1-P4 (`fork` syscall) - Init is a parent process, which forks child processes P1-P4 (`fork` syscall)
- P1-P4: Process should generate a random integer number between 0-19 (random number generation or simply hardcoded) - P1-P4: Process should generate a random integer between 0-19 (random number generation or simply hardcoded)
- P1-P4 should send the random number to init through message passing (`pipe` syscall) - P1-P4 should send the random integer to init through message passing (`pipe` syscall)
- Init should read data sent by P1-P4 - Init should read data sent by P1-P4
**Criteria 2:** **Criteria 2:**
- Scheduler is an independent process: it should create a shared memory segmnet (`shmget` and related syscalls) - Scheduler is an independent process: it should create a shared memory segment (`shmget` and related syscalls)
- Scheduler should read dadta (a list of random numbers) written by init, sort the list in ascending order, and print the list (sorting algorithm of choice) - Scheduler should read data (a list of random numbers) written by init, sort the list in ascending order, and print the list (sorting algorithm of choice)
**Criteria 3:** **Criteria 3:**
- Init should attach to the shared memory created by the scheduler process (`shmat` and related syscalls, hardcoded to any unique key of choice -> `ftok` syscall is a clean way to accomplish this) - Init should attach to the shared memory created by the scheduler process (`shmat` and related syscalls, any unique key of choice -> `ftok` syscall is a clean way to accomplish this)
- Init should write random numbers from P1-P4 into the shared memory - Init should write random numbers from P1-P4 into the shared memory
**Termination:** **Termination:**