This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: CS3214 Fall 2011 Project 3 - “Extensible Shell” Due Date: Friday, Oct 14, 11:59pm (Late days may be used.) To give everybody a chance to test others’ plug-ins, plugins are due: Thursday, Oct 13, 11:59pm with no extensions. This project can be done in groups of 2 students. 1 Introduction This assignment introduces you to the principles of process management and job control in a Unix-like operating system. In addition, the assignment will give you insights into the design and use of extensible systems. This is an open-ended assignment. In addition to implementing the required functional- ity, we encourage you to define the scope of this project yourself. 2 Base Functionality A shell receives line-by-line input from a terminal. If the user inputs a built-in command, the shell will execute this command. Otherwise, the shell will interpret the input as the name of a program to be executed, along with arguments to be passed to it. In this case, the shell will fork a new child process and execute the program in the context of the child. Normally, the shell will wait for a command to complete before reading the next com- mand from the user. If the user appends an ampersand ‘&’ to a command, the command is started in the background and the shell will return to the prompt immediately. The shell provides job control . A user may interrupt foreground jobs, send foreground jobs into the background, and vice versa. At a given point in time, a shell may run zero or more background jobs and zero or one foreground jobs. If there is a foreground job, the shell waits for it to complete before printing another prompt and reading the next command. In addition, the shell informs the user about status changes of the jobs it manages. For instance, jobs may exit, or terminate due to a signal, or be stopped for several reasons. At a minimum, we expect that your shell has the ability to start foreground and back- ground jobs and implements the built-in commands ‘jobs,’ ‘fg,’ ‘bg,’ ‘kill,’ and ‘stop.’ The semantics of these commands should match the semantics of the same-named commands in bash or tcsh. The ability to correctly respond to ˆC (SIGINT) and ˆZ (SIGTSTP) is ex- pected, as are informative messages about the status of the children managed. Like bash or tcsh, you should use consecutively numbered small integers to enumerate your jobs. For the minimum functionality, the shell need not support pipes ( | ), I/O redirection ( < > >> ), nor the ability to run programs that require exclusive access to the terminal (e.g., vim). Created by G. Back ([email protected]) 1 Revision : 1 . 8 September 22, 2011 CS3214 Fall 2011 Project 3 - “Extensible Shell” We expect most students to implement pipes, I/O redirection, and managing the control- ling terminal to ensure that jobs that require exclusive access to the terminal obtain such access. Beyond that, esh’s extensibility, described in Section 6 should allow for plenty of creative freedom....
View Full Document
- Fall '11
- Shell, G. Back, Extensible Shell, [email protected])