CS333N Assignment 6: A project with your own OS or Linux

As a part of the last assignment you will have to do a project. This will involve developing an (embedded) application on top of either your own OS or a stripped down version of Linux.

The projects can be done in groups of four. You will have to get your project selection and the detailed project specifications approved by the course instructor. Here are a few project suggestions. You are free to come up with your own ideas as well.

Suggested projects:

1. Building an MP3 player on your own OS

This will involve building an I/O sub-system in to your own OS which must include support for IDE CDROM drive and a sound card. These device drivers are available in OsKit (please check), you will however have to port the device drivers in to your OS. This will involve writing glue codes for matching the device drivers with your interrupt handling mechanism and threads package.

You will also have to implement the ISO9660 file system (used for CDROM's) in to your OS. Again you can adapt the implementation from OSKit.

Finally, you will need to run MP3 decoding as one of your threads. You can pick up any one of the many open source decoders.

2. Daisy reader, telephone directory, etc.

The core issues of the above project are pretty much similar to the issues involved in the Daisy reader and the telephone directory projects suggested in the Microprocessor course (CS315P). You can choose a variant of these projects (using an ARM processor and your own OS, perhaps?) after discussions with both the insructors.

3. Communicating cars.

Consider the problem of establishing a wireless communication link between two cars in a crowded street or a highway so that the car in front can indicate automatically to the car behind events like braking, turning right/left etc. The braking event can be captured by tapping the wire connecting the brake light on the dashboard. The left/right turn signals can be obtained by attaching limit switches to the steering wheel. Similarly the driver of the car behind may wish to transmit a signal to the car in front indicating intentions of overtaking.

You may use low bandwidth directional radio or infra-red (IrDA) devices connected to the serial port of an embedded processor via a microcontroller. You may use ARM or pentium based SBC's (single board computers). We have some Pentium based SBC's (runs of 5V, 5W power) which you may use. For the course project it will be sufficient to walk around holding the two units above your head in the lab (poor man's simulation of cars). Primarily, you have to concentrate on setting up the communication.

The project will involve:

  1. Writing a packet driver on the microcontroller to send packets over directional radio or infra-red devices. 8051 codes will probably be available in the DHD lab.
  2. Porting OsKit's TCP/IP stack on to your OS (more credits this way; if you are less ambitious you may use Linux where TCP/IP comes for free) and setting up TCP/IP over the radio/infra-red interface.
  3. Alternatively, you may not use TCP/IP and may design your own protocol for communication (error correction, packet losses, collisions,...).
  4. Establishing an ad-hoc point to point communication link by a broadcast mechanism.
  5. Developing application level protocols for communication between cars.
If you wish to do this project you will have to decide early so that the necessary hardware components can be procured in time.

4. Bus station, traffic lights etc.

Some of the issues in above are similar to those in the traffic light and bus-station projects in the Microprocessor course (CS315P). You may also choose one of these after discussions with both the instructors.

5. TV player

Build a TV player on your desktop running your own OS. You may use a BT848/878 based TV-tuner/frame-grabber card which takes input from a TV cable or a camcorder. You'll have to port OsKit's device drivers for BT848 and also the sound card on to your OS by writing suitable glue code.

You will also have to develop suitable code for flicker-less image display on the VGA. Again you can adapt code available in OsKit.

6. Robot control

We have developed a new mobile robot which has two independent motors connected to the two drive wheels and two additional motors for a stereo pan-tilt head. It has on-board 8051/8255 based microcontrollers to control the motor drives which connect to the serial ports of a Pentium based on-board SBC. The SBC also has a radio interface. You'll have to put your own OS on the SBC to calibrate and control the movement of the robot.

7. Porting your OS for Lego Mindstorms

The Lego Mindstorms RCX has an 16MHz Hitachi H8/3297 series processor with 32K RAM. It has a few A/D channels for motor control, a sound interface and an Infra-red (IR) device for communicating with a PC host. Code for the RCX can be cross-compiled using gcc.

It will interesting to port your multi-threaded OS of Assignments 3 and 4 on to the Lego processor. You will of course need to build an I/O subsystem to control the I/O and a packer networking system for IR communication.

You can find complete details and documentation related to the RCX processor (and also a multi-threaded OS) at http://www.noga.de/legOS.

8. Possible Linux projects

Here are some possible Linux project ideas that have come up after discussions with some of the students in the class:
  
1. A hibernation scheme for Linux
You may try to develop a hibernation scheme for Linux wherein the entire run-time state of the system may be saved on a special partition in the hard disk before switching off a machine. You should able to resume linux at power-on by restoring the state from the backup.
2. Keeping a process alive through a reboot
Consider the problem of keeping one or more designated processes alive through a reboot. At the time of shutdown you will need to save the entire runtime state of the process(es) on to a disk so that they can be resumed seemlessly on reboot. Apart from saving the PCB status and the memory, you will also need to worry about open files, buffers, etc.
3. Connecting terminal, keyboard and a parent to a parent-less process
Note that when you press CTRL-Z and bg, the running process gets disassociated from the terminal, keyboard and your shell, allowing you to logout with your process running in the background. Consider the problem of reclaiming the process in to a shell and attaching the terminal and keyboard.

Subhashis Banerjee / Dept. Computer Science and Engineering / IIT Delhi / Hauz Khas/ New Delhi 110016 / suban@cse.iitd.ernet.in