Course “Operating Systems” (OS)

Project

 

 

 

General Information

The goal of  this project is to teach you basics of multitask programming. More precisely, you will learn how to program a MPEG-based video encoding system with a mono-process / thread approach, and with a multi-process / thread approach. I provide you with encoding algorithms, you just need to care about writing process / thread architecture and data structures. To help you starting your project, I suggest that you attend course session #5 and lab session #1. You may also come to my office to ask me questions, go to the library and consult or borrow  appropriate books and documents.

You can get more information on MPEG1 through the following links. Also note that our encoder has Group Of Pictures composed of 8 images, one Intra Image and seven Predicted Images. We won't use Bidirectional Images, it will be useless for this project to get more information on these.

MPEG stream overview
Berkeley Encoder : MPEG overview...
And much more information!

Before starting the project, you'd better know what I-Frames and P-Frames are and how they are encoded. You may also know what are RGB and YUV image format, and be aware of the MPEG file structure (Group Of Pictures -GoP-, different kinds of headers...)

Here is an overview of what appli1 should be like in the end:

Schedule


Information on Project Directory
Your project directory should contain the following subdirectories:
In the root directory, place your makefile. An example Makefile is provided in section "Work to do". Also, do provide a README file.
Once uncompressed, I should be able to compile your two applications by typing:
make appli1
make appli2

make clean should perform a clean on all files that may be generated from the Makefile (.o, and executable files).

Send me a clean project, i.e. without the encoded video, and without .o and executable files.

The parameters given to these applications are:

Grading 

Work on your own! Each project must be personnaly achieved. Similar source files or reports is prohibited, and therefore results in bad grades.

Report

Your report should contain information related to:

Work to do

  1. Complete the code of a mono-process mono-thread application that can encode MPEG stream from provided images.
  2. Program the same application with a multi-process or / and multi-thread approach.
  3. Evaluate the performance of both applications.
  4. Provide a report.


I do provide a first project directory to start from:


Source images are located into
/homes/teaching/courses/OS/img/
DO NOT copy these source images into your account, simply use them from that directory.

Download this compressed project file, uncompress it (gunzip OSproject.tar.gz) and un-archive it (tar -xof OSproject.tar.gz).
The src directory contains a file named appli1.c in which you should complete the first application's code.

At first, you should complete the mono-process application. Two sections must be added, a few comments indicate you what to do.

Once written, you may compile your application by typing, from the project's root directory:
make appli1

Test your first application.
To start your application, type, from your project's root directory:
./bin/appli1 /homes/teaching/courses/OS/img/pingpong-i0 ./video/maVideo.mpeg


Then, check that your video is correctly encoded with mplayer (mplayer filename).

To erase files generated by the Makefile, you may type:
make clean

Then, do the second application. First think about a possible multi process / thread architecture and of data strutures (it's the most important part of your personal work), and program them. You will also have to modify the makefile so that 'make appli1' and 'make appli2' both compile.
Test your application, and evaluate the performance of the second one with regard to the first one.

No extra material is provided for application 2. It is up to you to modify the Makefile (change what files must be erased when running make clean, etc.), to create new C files, etc.