Student name | ID |
---|---|
Daniel Modilevsky | 312493000 |
Saar Pernik | 308491265 |
Lucas Kujawski | 345535330 |
$ make all
$ ./miniOS -p<#processors> -n<#tasks> -c<#clock interval>
i.e. $ ./miniOS -p3 -n4 -c2
Defaults:
Argument | Default |
---|---|
# Tasks * | - |
# Processor | 1 |
# Clock interval | 1 |
- field is mandatory
-
In order to see scheduler actions:
$ tail -f logAction.csv
Method | Location |
---|---|
void taskWake(OS *os, pid_t id) | OS/OS.h |
char taskShouldSuspend(OS *os, Task *task) | OS/OS.h |
void taskSetName(char *) | OS/OS.h |
void taskSetId(Task *task, pid_t _pid) | Task/Task.h |
char *taskGetName(Task *task) | Task/Task.h |
pid_t taskGetId(Task *task) | Task/Task.h |
void taskSuspend(Task *task) | Task/Task.h |
void taskWait(int t) | Task/Task.h |
int taskPrio(Task *task) | Task/Task.h |
-
Scheduler: The scheduler wakes up every t seconds, pops one task from the queue and releases the lock. Each task in the queue is locked by mutex. Only the current task is unlocked and running in the OS. Every task suspends himself on the main task.
-
Queue: The queue was implemented using an array and have FIFO behaviour. The first sorting is by priority, and after an interrupt (signal) is sequencially.
-
Buffer: The buffer modification is considered a critical section. It is protected by the OS Mutex.