Operating Systems: Project
Bolzano, Spring '08
Project Description:
Use, combine, and extend the programs you wrote for LAB 1
and LAB 2 to a mini-shell that is able to do the following:
- to read commands from standard input and execute them in a loop until a
built-in command
exit is issued (we call
these processes the foreground processes; there is always
at most one of these at any particular time);
- be able to redirect the standard input and output of
commands by prefixing them with built-in commands
in
file and out file;
- be able to terminate (involuntarily) the foreground process when
user presses
^C and return back to the mini-shell;
- be able to interrupt the foreground process temporarily, when
user presses
^Z, returning to the mini-shell;
- be able to execute any number of processes in background
(i.e., in parallel with the foreground process), including in
particular, the ability to start another process while a process
has been temporarily suspended;
- inform the user when the background process finishes or is
waiting for an input from the terminal;
- be able to inform the user what commands are executing in the
background by issuing the built-in command
jobs,
this should include information about the state of the process
(i.e., suspended, background, waiting for input, etc.) and about
what file(s) is the background process using for standard input
and output);
- be able to terminate involuntarily a background processes
by issuing the built-in command
kill job-number.
- to be able to resume a process or to make a background process
into the foreground process (i.e., the one that currently
interacts with the terminal) by issuing the
fg
job-number command.
Deliverables:
Program source code in C, Makefile
used to build the program, test runs that demonstrate the
functionality of your program (see the tee command), and
2 page description/documentation of our program.
Here are detailed rules:
- each student has to hand-in and give a demonstration of the final
project;
- send your deliverables (see above) by email to either Massimo
Banzi (massimo DOT banzi AT telecomitalia DOT it) or Chris Mair
(chris AT 1006 DOT org) within Tue June 24 24:00:00;
- for the presentation, come to room 130, first floor, cs faculty
in piazza Domenicani 3 on Wed June 25 14:30 - be prepared to answer
1 or 2 short questions about your implementation source code;
- if for whatever reason you cannot show up on June 25 make an
appointment by email with Banzi or Mair to present *before* June 25
- take into account that you have to arrange appointments with at
least 1 week's notice since Banzi and Mair are busy people;
- if you fail to hand-in or present your project, you can still do
the written exam, but we will not be able to register your OS exam
within this exam session - you will need to do the presentation at
a later moment and come back for the second exam call;