Computer Science 330
Operating Systems

Fall 2020, Siena College

Programming Project 3: The Roger Bacon Shell
Part 1 Due: 4:00 PM, Friday, October 23, 2020
Part 2 Due: 4:00 PM, Friday, October 30, 2020

In this programming project, you are to write a C program called the Roger Bacon Shell (rbsh), a mini command shell interpreter. rbsh is similar to familiar Unix shells such as the Bourne shell (sh) the Bourne-Again shell (bash), and C shell (csh, tcsh). You will learn about process creation, pipes, input/output redirection, background process management, signals, and interrupt handling, and gain extensive experience with C.

You may work alone in groups of size 2 or 3. Collaboration within a group is, of course, unrestricted. You may discuss the program with members of other groups, but what you turn in must be your own group's work. Groups must be formed no later than 4:00 PM, Friday, October 16, 2020, and be confirmed by all group members having write access to the group's repository on GitHub and all names in the README.md file. All group members will be assigned the same grade for the lab. There are many subtasks that can be carved off and assigned to group members, so everyone is encouraged to join a group.

There is a significant amount of work to be done here. It will be difficult if not impossible to complete the assignment if you wait until the last minute. A slow and steady approach will be much more effective.

To help encourage this approach, there are two parts for your work on this project. The basic functionality to run a single command is part 1, and is due at 4:00 PM, Friday, October 23, 2020. The remainder is due at 4:00 PM, Friday, October 30, 2020. Please refer to the grading guidelines at the end of this document for the specific functionality required for your part 1 submission.

Getting Set Up

You will receive an email with the link to follow to set up your GitHub repository, which will be named shell-proj-yourgitname, for this programming project. Only one member of the group should follow the link to set up the repository on GitHub, then others should request a link to be granted write access.

All GitHub repositories must be created with all group members having write access and all group member names specified in the README.md file by 4:00 PM, Friday, October 16, 2020. This applies to those who choose to work alone as well!

Requirements

Like the Unix shells you use every day, rbsh should issue a prompt (below, it is "shell#"), at which it reads commands from the user and executes them.

Your shell should interpret the following commands and provide the following functionality:

Notes

Submission

Commit and push!

Grading

The functionality required for the first deadline is denoted by a "Part 1".

This assignment will be graded out of 100 points.

Feature

Value Score
Documentation 12
exit and help commands (Part 1) 2
Running a command with no arguments (Part 1) 15
Running a command with arguments (Part 1) 10
Builtin cd command (Part 1) 2
Running a command with input/output redirection 10
Launching a command in the background 10
Launching a sequence of jobs separated by semicolons or ampersands 8
Builtin jobs command 4
Builtin kill command 3
Correct trapping of Ctrl-C keystroke 4
Reporting termination of backgrounded jobs 4
Pipeline of 2 processes 6
Arbitrarily long pipeline of processes 4
Extra functionality 6
Bonus functionality 0
Total 100

Here are some possibilities for the 6 points for extra functionality. Functionality up to 10 additional points beyond the required 6 will be considered for bonus credit.