Next: What to Turn
Up: The Assignment
Previous: The Assignment
- Implement the system calls Exec() and Join(). The former
provides a facility by which a new process in created; the latter provides a
way by which a process waits for its children to finish.
- The synchConsole class you implemented in the last lab should now be
able to handle multiple processes reading and writing from/to the console. You
will use semaphores to provide synchronized access to the console (keyboard
and display). Therefore, a user that wants to write, say, 10 bytes of data to
the monitor will acquire the display semaphore and other processes will not be
allowed to write to the display until the first process is finished.
Analogous operations occur for reading from the keyboard.
- Make whatever changes are necessary to your system call implementations.
Note that now virtual addresses may be different than physical addresses.
- Implement a time-slice option for Nachos called time which
specifies the time slice each process gets. Thus, we should be
able to run Nachos as nachos -time 30 -x printa. Here each process in
the system will get a time slice of 30 units.
- Implement a memory management scheme. You can either provide contiguous
allocation or paging. If you implement the former, you must also implement
compaction.
- Provide test programs and instructions on how to run them. Your test
programs should demonstrate all functionality that you have implemented.
- In your test programs have an explicit Join() for each
Exec() call. When a process has joined with all its children,
it should call Halt(). This call ensures that Nachos quits when
there are no more processes in the ready list. It is necessary
because the console object places schedules some interrupts for the
future which prevent Nachos from quitting even when there are no more
processes on the ready list. Thus, a user process must explicitly
halt the system when it is done joining with its children.
Next: What to Turn
Up: The Assignment
Previous: The Assignment