CS2106: Introduction to Operating Systems

  • Introduction

As programmers, command-line interpreters, also known as shells, are an important and ubiquitous part of our lives. A command line interpreter (or command prompt, or shell) allows the execution of multiple user commands with a various number of arguments. The user inputs the commands one after another, and the commands are executed by the command line interpreter.

A shell is actually just another program implemented using the process-related system calls discussed in the lectures. In this lab, you are going to implement a simple shell with the following functionalities:

  1. Running commands in the foreground and background
  2. Chaining commands
  3. Redirecting input, output, and error streams
  4. Terminating commands
  5. Managing the processes launched by this shell

The main purpose of this lab is to familiarize you with:

  1. advanced aspects of C programming,
  2. system calls,
  3. process operations in Unix-based operating systems.