CECS Home | ANU Home | Search ANU
The Australian National University
ANU College of Engineering and Computer Science
School of Computer Science
Printer Friendly Version of this Document

UniSAFE

Introduction to Computer Systems

Assignment 1 Specification - Shell Program

The aim of this assignment is to give you some more experience in developing c programs. The basic part of this assignment aims to be simple enough for most students to be able to complete in less then 5 hours. The assignment also aims to provided a more open ended and challenging programming task for the student who wish to gain extra experience (and a higher mark).

The assignment will be marked out of 100. And is worth 10% of the final mark. A late penalty of 10% per day applies (these are working days and apply from after the assignment is collected. The assignment will be collected some time after noon on the Friday. Also note this penalty is caped so it does not take your final mark for this assignment below 40 out of 100. Assignment work will not be accepted after the last day of semester. Extensions are possible in documented exceptional cases (e.g. medical certificate).

Part 1 - Basic shell program - 40 marks

A shell program takes input from a terminal and this text is used to launch programs for a user. So for example if the program for printing "Hello World" is in the current directory (called "hello") and the user types "hello" then the "hello" program is executed. This will output "Hello World" to the terminal. Once the "hello" program has completed control goes back to the shell program and the user can launch another program.

Develop your own basic shell program. This program will enable a user to launch programs that are either in the current directory or in the "/bin" or "/usr/bin" directories.

Part 2 - README file - 20 marks

Write a 1 to 2 page README document that contains the following:
  • Name of your shell program.
  • Your name and uni id.
  • Copyright and license associated with your software. (the license is optional)
  • A summary of your programs working.
  • How to compile and run your program.
  • The testing you did.
  • Optional extensions you did and what makes them deserving of a high mark.
  • Limitations or your shell and what you would do next to improve the shell.

Part 3 - Optional Extension - 40 marks

In this part of the assignment you are free to explore a number of possible extensions to your shell program. These include:
  • line editing abilities,
  • the ability to execute programs in the background,
  • the use of environment variables,
  • file redirection and piping of IO,
  • automatic command and filename completion (i.e. you press tab after partly typing a command or file name and the shell searches the possible options and completes when able), and
  • scripting constructs (such as conditionals, loops, methods).

You are also free to dream up some other extensions. Highest marks will be gained a doing one or two extensions very well, rather, than doing a lot of them poorly.

Marking

Each part of the assignment will be separately marked. Marks will be given for:
  • Correctness - Does it work?
  • Robustness - Does it fall over if any unusually input is given to it?
  • Clarity - Is the code (or README) simple to understand?
  • Style - Is the coding style consistent? Are variable names well chosen?
  • Formatting - Is the code formatted consistently and using a standard formatting approach?

Individual Assignment

This is an individual assignment. You may help each other, however, the final submission must be original and your own work. Take care not to give parts of your solution to other students.

Assignment Submission

The assignment must be submitted via a computer in the CSIT labs (or remotely via ssh to partch or one of our servers). Submit the assignment using the following command:
submit comp2300 ass1 README shell.c otherProgramFiles.c 

A few hits for submission:

  • Don't have spaces in your file names. (the submit program does not like them!)
  • Copy the files to your home directory, rather, than having them mounted on a USB drive.
  • You may submit as many times as you like, I will mark the most recent one that is not late.
  • If you are in comp6300 then use comp6300 rather than comp2300 in the command.