diff options
Diffstat (limited to 'proj0.txt')
| -rw-r--r-- | proj0.txt | 12 |
1 files changed, 5 insertions, 7 deletions
| @@ -35,9 +35,8 @@ Stallings, W. - Operating Systems | |||
| 35 | struct thread: | 35 | struct thread: |
| 36 | int64_t wakeup_tick ...absolute tick when to wake up the thread | 36 | int64_t wakeup_tick ...absolute tick when to wake up the thread |
| 37 | 37 | ||
| 38 | |||
| 39 | timer.c: | 38 | timer.c: |
| 40 | static struct list wakeup_list ...list of processes waiting for an | 39 | static struct list wakeup_list ...list of processes waiting for an |
| 41 | wakeup event and currently put to sleep | 40 | wakeup event and currently put to sleep |
| 42 | 41 | ||
| 43 | ---- ALGORITHMS ---- | 42 | ---- ALGORITHMS ---- |
| @@ -62,7 +61,7 @@ Thus we can return as soon as the first thread doesn't need to get unblocked. | |||
| 62 | >> A4: How are race conditions avoided when multiple threads call | 61 | >> A4: How are race conditions avoided when multiple threads call |
| 63 | >> timer_sleep() simultaneously? | 62 | >> timer_sleep() simultaneously? |
| 64 | 63 | ||
| 65 | Each thread has its own variable for saving its sleep period | 64 | Each thread has its own variable for saving its sleep period |
| 66 | therefore no race conditions arise while setting the latter. Furthermore | 65 | therefore no race conditions arise while setting the latter. Furthermore |
| 67 | during the access to the static wakup_list, interrupts are disabled to prevent | 66 | during the access to the static wakup_list, interrupts are disabled to prevent |
| 68 | thread preemption. | 67 | thread preemption. |
| @@ -131,12 +130,11 @@ strtok() uses global data, so it is unsafe in threaded programs such as kernels. | |||
| 131 | execution with user privileges. Otherwise this could lead to a kernel oops | 130 | execution with user privileges. Otherwise this could lead to a kernel oops |
| 132 | or even worse code execution within the kernel. | 131 | or even worse code execution within the kernel. |
| 133 | 132 | ||
| 134 | * Outsourcing command separation from the kernel leads to a leaner | 133 | * Outsourcing command separation from the kernel leads to a leaner |
| 135 | less complex kernel implementation and reduces the kernel workload | 134 | less complex kernel implementation and reduces the kernel workload |
| 136 | because tasks like searching for a command name in file system | 135 | because tasks like searching for a command name in file system |
| 137 | can be delegated to the shell. | 136 | can be delegated to the shell. |
| 138 | 137 | ||
| 139 | |||
| 140 | SURVEY QUESTIONS | 138 | SURVEY QUESTIONS |
| 141 | ================ | 139 | ================ |
| 142 | 140 | ||
| @@ -161,4 +159,4 @@ the quarter. | |||
| 161 | 159 | ||
| 162 | >> Any other comments? | 160 | >> Any other comments? |
| 163 | 161 | ||
| 164 | It took us about 25 hours to complete this assignment. \ No newline at end of file | 162 | It took us about 25 hours to complete this assignment. |
