Operating systems assignments

Operating systems programming assignments for the OS (1DT044), OSPP (1DT096) and DSP (1DT003) courses at the Department of information technology, Uppsala university.

  • Our studies will be based on principles of the Unix and Linux operating systems.
  • For all assignments, you will use Git to clone provided source code from repositories on GitHub.
  • Mips assembly will be used to study the fundamental principles of how the operating system interacts with the hardware. To edit and execute Mips assembly programs we will use Mars (Mips Assembler and Runtime Simulator).
  • C programming in an Linux or macOS environment will be used to further study a few important concepts.
  • Make will be used to compile all C programming assignments.

Unix

Unix is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, developed in the 1970s at the Bell Labs research center by Ken Thompson, Dennis Ritchie, and others1.

Linux

Linux is a name which broadly denotes a family of free and open-source software operating system distributions built around the Linux kernel. The defining component of a Linux distribution is the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds2.

Linux is a Unix-like and mostly POSIX-compliant computer operating system2. As of May 2015 it is estimated that 96.55% of all web servers runs Linux 3.

The basic principles of Unix and Linux

Unix has a very long history both in industry and academia. Compared to proprietary operating systems such as Microsoft Windows and macOSX detailed information about the design and implementation of Unix and Linux is much easier to find. As a consequence, Unix/Linux is well suited when studying and learning the core principles of operating systems.

In the the operating systems courses at Uppsala University both Unix and Linux will be used to introduce the basic principles of operating systems.

Toolbar

At the top of each page you find the toolbar with the following buttons.

This button will only appear if the main menu to the left is hidden. Press this button to show the main menu.
View the table of contents menu for the page.
Show printer friendly version of the current page and all its subpages.
Suggest edits of the page by making a pull request on GitHub.
Navigate to the next page in the hierarchy.
Navigate to the previous page in the hierarchy.

To the left of each page you find the main menu. If the main menu is hidden, press the icon in the toolbar at the top of the page. The following symbols are used in the main menu.

Instructions on how to download source code from GitHub.
Mandatory assignment.
Optional assignment for higher grade.

At the bottom of the main menu you find these two buttons.

Switch between viewing the website in dark mode or light mode.
Clear the markings of the pages you have visited.

Shell commands and code snippets

Shell commands to be entered in the terminal are shown in boxes like this.

make # Run make to compile

If you hover over a shell command box, a copy button will appear in the upper right corner. Press this button to copy the shell command in the box. Now you can paste the copied command at the shell prompt in your terminal and press enter to execute the command.

Code snippets are also shown in boxes. For example like this.

int a = 127;    // A global variable. 

int main(void) {
  int b = 42;   // A local variable.
}

If you hover over a code snippet box, a copy button will appear in the upper right corner of the box. Press this button to copy the context of the box. Now you can paste the code snippet in your code editor.

Author

This webpage and all assignments have been created by Karl Marklund at the Department of information technology, Uppsala university. The original version of the Mutual exclusion assignment was contributed by Nikos Nikoleris when he worked as TA on the courses during his time as a PhD student.