Lesson 2: Operating Systems

Homepage Content Slides Video

Warning

This lesson is under construction. Learn from it at your own risk. If you have any feedback, please fill out our General Feedback Survey.

What an Operating System is

The OS in relation to Hardware, Applications, and Users.

An Operating System is the software which manages physical computing resources, interfaces between the hardware and the applications on a computer, and what exposes a creates a number of APIs for giving developers access to low-level applications / hardware. The OS allows application developers and hardware manufactures to do their jobs and not worry about “How does this spinning disk affect my browser” and “How will this networking card interact with my game engine”.

Anatomy of an OS

How the kernel fits into the OS stack.

The OS is not always one thing or another. Some Operating systems are behemoths while others are minimal. Some are designed for teaching purposes while others are optimized for managing data centers.

The general diagram, from you -> hardware, looks like this:

  • User Interface: What you interact with. Window Managers for instance.
  • Application Layer: What developers use to make software run.
  • Kernel: The Core of the OS. Makes communication between hardware and applications sane.
  • Hardware: What does the actual computations. The thing your keyboard is plugged into.

The two middle parts (The Kernel and the Application Layer) of the diagram are often put together and called an Operating System. However, the scope of each layer is one of Computer Science’s oldest and most contentious philosophical debates. Microkernels such as Mach and MINIX only implement a bare minimum interface to bridge the gap between software and hardware. In a Microkernel, software such as device drivers and file systems are separate from the kernel, and instead run in the Application Layer. On the other hand, Monolithic Kernels such as Linux include drivers, file systems, and other software as a part of the kernel.

Types of Operating Systems

Most of us only interact with one or two OS’s in a day: our phone OS and personal computer OS. There are many other types of OS’s depending on a variety of needs. Scientific computing for instance has different requirements than a pace-maker or a GameBoy. Each of these areas has their own types of applications they run and as a result they have specialized OS’s to make those applications operate optimally.

Note

We list these as seperate types of OS, but rarely will an OS have mutually exclusive types.

Single/Multi-tasking

An OS may only need to run one task at a time while another OS needs to work on many tasks in parallel.

Ex: DOS vs Linux and moderns Windows.

Single/Multi-user
Some OS host many users interacting with one-another. More specialized OS don’t need to handle that.
Embedded
A very simple OS capable of doing one job well. (Arduino, pace-maker, etc).
Real-time
For precise timing applications (e.g., life or death situations, or music production!).

GNU/Linux

Welcome to the Family
GNU+Linux Logo

Linux is the kernel the powers many flavors (or Distros/Distributions) of GNU/Linux. Each flavor was created because of philosophical, technical, or social difference in opinions with the existing flavors of Linux on the market.

The reason some people call it GNU/Linux is because the OS you use is a Linux kernel with GNU utilities on top of it; things like basic command-line tools and other software that turns a kernel into a full-fledged OS. We will flip-flop between calling this OS GNU/Linux and just Linux throughout this course, but we mean the former unless we are talking about Linux Kernel.

GNU/Linux runs everything from smart-phones (Android) to the International Space Station (Debian) and Data Centers in between.

Flavors of Linux

Variants (forks) of Linux Operating Systems are called flavors. These are grouped into families based on their operating system ancestry. More Information.

  • Debian
    • Ubuntu
      • LinuxMint
  • RedHat
    • RHEL
    • Fedora
    • Centos
  • Gentoo
    • ChromeOS
  • Slackware

  • ArchLinux

Exercise: Pop Quiz

  1. What are some different types of Operating Systems?
  2. What constitutes a ‘Distribution’ of Linux?
  3. How is Linux different from Windows? OSX?
  4. How is Debian different from Gentoo?
  1. Single/Multi-user OS, Embedded OS, Real-time OS, Single/Multi-tasking OS.
  2. Distros are a version of Linux which is distributed to others. Your personal installation, with all of it’s tricked out changes, is not a distro, but if you were to package it into an ISO and have other people download it, that would be a distro.
  3. Linux is different from Windows in that it is a Unix-like OS, and Free & Open Source. It is different from OSX in that it is Free & Open Source.
  4. Each distro (including Debian vs Gentoo) differ in ideology. Gentoo wants to be a Linux distro that does one thing well while Debian wants to do something different well. Very few distros have identical philosophies.

Further Reading

OSU Courses:
CS 312: Linux System Administration
OSU Courses:
CS 344: Operating Systems I
  • Required course for all CS Students at OSU.

  • Covers fundamentals of low-level programming concepts.
    • Multi-threaded programming
    • Read / Write operations
    • Socket programming
OSU Courses:
CS 444: Operating Systems II
  • Required course for all CS Students at OSU.

  • Covers kernel hacking and low-level OS design.
    • IO / Process scheduling
    • Building kernel modules
    • Memory management
Free Online Resources:

OSDev.org is a wiki dedicated to helping people develop their own operating systems. It’s a big leap from this lesson, but great if you’re interested in learning the nitty-gritty.

Operating Systems Design and Implementation by Andrew S. Tanenbaum is a classsic in the world of OS Development. It’s also a big leap, but can teach you more about how Operating Systems work than you ever thought there was to know.

Next: Lesson 3: Docs & Communication