Operating Systems (COL331/ COL633), II Sem, 2015-16

Lab Assignments

Setup

Please ensure you have latest version of:

In debian/ubuntu, do:

If you are working in GCL, the packages are already pre-installed.

From lab2 onwards, a patched version of qemu would be useful for debugging. Please install the patch version as per the instruction below (on GCL, the package is pre-installed. We just need to refer to appropriate path).

On GCL:



Common Instructions for all labs

Submissions: All submissions are to be done on moodle. The submission link will be enabled before the assignment submission deadline and informed. On submitting, an automatic sanity check will be performed and the student will be given feedback on the compliance to submission guidelines. Students are required to look at the feedback and if required, do appropriate corrections and resubmit.

We will be evaluating the submissions on GCL machines. Hence it is must that you check your code to be working on GCL machine before submitting.

Lab Tools Guide is available at the following link.

Piazza: We will be using Piazza for discussing queries and posting updates related to labs. Please register yourself on Piazza at the following link. Students are encouraged to contribute to discussions on Piazza and would be given credits for the same.

Commands:

Submission Checklist:

  1. Run your code on a GCL machine and check if it works correctly.

  2. Run "git pull" to fetch the latest environment.

  3. Run “make grade” to ensure the automatic checking passes.

  4. Do "make tarball".

  5. Submit the code on the appropriate moodle link for the lab submission.

  6. Check for feedback provided to you on moodle. If submission is not accepted, rectify the mistake and re-submit.



Lab Exercises

Lab-1 (Due date: 21/01/2016, 11.55 am): Boot, bootloader and printf to console.

Homework-1 (Due date: 27/01/2016, 3PM): Shell and system calls.

Lab-2 (Due date: 17/02/2016, 11.50PM): Memory Management

Homework-2 (Due date: 24/02/2016, 6PM): User Threads.

Lab-3 (Due date: 12/03/2016, 3PM): User Environments

Lab-4 (Due date: 05/04/2016, 3PM): Preemptive Multitasking

Lab-5 (Due date: 13/04/2016, 3PM): Lab5/Project.



Reading Materials:

Getting Started with x86 assembly

If you are not already familiar with x86 assembly language, you will quickly become familiar with it during this course! The PC Assembly Language Book is an excellent place to start. Hopefully, the book contains mixture of new and old material for you.

Warning: Unfortunately the examples in the book are written for the NASM assembler, whereas we will be using the GNU assembler. NASM uses the so-called Intel syntax while GNU uses the AT&T syntax. While semantically equivalent, an assembly file will differ quite a lot, at least superficially, depending on which syntax is used. Luckily the conversion between the two is pretty simple, and is covered in Brennan's Guide to Inline Assembly.

Familiarize yourself with the assembly language materials mentioned below. You don't have to read them now, but you'll almost certainly want to refer to some of this material when reading and writing x86 assembly.

We do recommend reading the section "The Syntax" in Brennan's Guide to Inline Assembly. It gives a good (and quite brief) description of the AT&T assembly syntax we'll be using with the GNU assembler in JOS.

Certainly the definitive reference for x86 assembly language programming is Intel's instruction set architecture reference, an HTML edition of the old 80386 Programmer's Reference Manual, which is much shorter and easier to navigate than more recent manuals but describes all of the x86 processor features that we will make use of in the course; and the full, latest and greatest IA-32 Intel Architecture Software Developer's Manuals from Intel, covering all the features of the most recent processors that we won't need in class but you may be interested in learning about. An equivalent (and often friendlier) set of manuals is available from AMD. Save the Intel/AMD architecture manuals for later or use them for reference when you want to look up the definitive explanation of a particular processor feature or instruction.



Acknowledgements: This lab series has been taken from MIT course 6.828 on Operating Systems.