Compare commits
2 Commits
b225bbbad9
...
d85cf11754
Author | SHA1 | Date | |
---|---|---|---|
d85cf11754 | |||
dfc4d63985 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -30,6 +30,7 @@
|
|||||||
*.dylib
|
*.dylib
|
||||||
|
|
||||||
# Executables
|
# Executables
|
||||||
|
out/
|
||||||
*.exe
|
*.exe
|
||||||
*.out
|
*.out
|
||||||
*.app
|
*.app
|
||||||
|
@ -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:**
|
||||||
|
Loading…
Reference in New Issue
Block a user