Skip to content

Fundamentals of OS

Statement

  • Describe how the fundamental principles (at least three) work/help in creating a functional operating system.
  • Install a virtual operating system (UNIX) using a virtual machine (VirtualBox or any other virtual machine or simulation).
    • Read the reading assignments or research to find the steps to install the virtual operating system.
    • Detail each step in your own words.
    • Add relevant screenshots to each step.

Fundamental Principles of Creating a Functional OS

  • According to (Arpaci-Dusseau, 2018), these are the most fundamental principles in creating an OS:
    • Abstraction makes it possible to write a complex program by dividing it into small and understandable pieces, to write such a program in a high-level language like C without thinking about assembly, to write code in assembly without thinking about logic gates, and to build a processor out of gates without overthinking about transistors.
    • Performance. OS must be as performant as possible; by minimizing the overheads. Overheads come in the form of extra work that the OS does to provide a service to the user, which translates to extra time, extra code instructions, extra memory usage …etc.
    • Protection. OS must provide protection between applications and between applications and the OS itself. OS must ensure that one application (possibly malicious) cannot access another application’s memory and that an application cannot access the OS itself. OS provides protection by isolating processes from each other and the OS itself.
    • Reliability. OS must run non-stop with zero downtime and as fewer bugs, failures, and crashes as possible.
    • Energy efficiency. OS must be energy efficient by minimizing the energy consumption of the device.
    • Security. OS must provide security by protecting the device from malicious applications and users.
    • Mobility. OS must be able to run on different devices, such as laptops, tablets, smartphones, and smartwatches.
  • I will discuss each one of these principles in this answer.

Abstraction

  • OS is a very complex program.
  • Layers of such software must be carefully abstracted to make it easier to understand and maintain.
  • Each abstraction layer is built on top of the previous layer, and functionality should be distributed carefully between the layers.

Performance

  • OS must be as performant as possible.
  • Better performance can be achieved by minimizing the responsibilities of the core OS.
  • Extra functionalities (like GUI) can be added to the OS by extending the core OS, where these extensions can be installed separately.
  • One more way to improve performance is by carefully crafting data structures used in the OS.

Protection

  • OS must provide protection between applications and between applications and the OS itself.
  • No process should be able to access another process’s memory.
  • No process should be able to access the OS itself.
  • Processes must be isolated from each other and the OS itself. Processes can only communicate with each other through system calls to the OS.
  • Virtualization is vital in providing protection at the OS level.
  • Protection should not be ignored at the hardware level as well. Processes should not be able to access the hardware directly but through system calls to the OS.
  • Any Decent OS should take protection seriously and learn from past mistakes, where OSes did not provide protection and were vulnerable.

Reliability

  • OS must run non-stop with zero downtime and as fewer bugs, failures, and crashes as possible.
  • OS is the heart of the machine that runs it. Usually, the machine is useless without the OS since the user cannot interact with it.
  • No application should be able to crash the OS. If an application crashes, the OS should be able to recover from it.
  • Recovery from crashes should not be ignored.

Energy Efficiency

  • OS must be energy efficient by minimizing the energy consumption of the device.
  • Machines run for long periods, and the machine’s energy consumption should be minimized to reduce the machine’s cost.
  • Machines sometimes run on batteries, and the battery life is limited. If the OS is not energy efficient, the battery will drain quickly, and the machine will be useless.
  • With the issues of climate change, energy efficiency is a must.
  • The OS will be energy efficient if the previous fundamental principles are followed.

Security

  • OS must provide security by protecting the device from malicious applications and users.
  • The OS always works with external applications, and the intentions behind these applications should always be assumed malicious.
  • An OS should be able to detect malicious applications and prevent them from running.
  • An OS should take the user’s consent before running any application or allowing any application to access the device’s hardware.

Mobility

  • OS must be able to run on different devices, such as laptops, tablets, smartphones, and smartwatches.
  • Successful OSes are loved by users who want to use the same OS on all their devices.

Install a virtual operating system (UNIX) using a virtual machine

  • I run macOS on my laptop, which uses an M1 chip processor. I installed VirtualBox on my laptop and created a virtual machine with Ubuntu 20.04 LTS.
  • According to the official documentation of VirtualBox, the program is still in beta for M1 chip processors, so I tried the following:
    1. I installed VirtualBox V. 7.0.2 for macOS / Arm64 (M1/M2) hosts from here.
    2. Then I installed the extension pack from here.
    3. I installed Ubuntu 20.04 LTS from here.
    4. I created a virtual machine with Ubuntu 20.04 LTS.
    5. The virtual machine was created successfully, but it failed to boot.
  • On the second attempt, I tried a different version of Ubuntu (the latest version) from here, but it also failed to boot.
  • On the third attempt, I tried an older version of VirtualBox (V. 6.1.40) from here, but the program failed to install since it is not compatible with macOS / Arm64 (M1/M2) hosts.
  • I posted some screenshots of my attempts to install and run Ubuntu on VirtualBox on my laptop.
  • In theory, macOS is a UNIX-based operating system, so I can run UNIX commands on my laptop, which I suppose is enough for this assignment and the course.

1 2 3 4 5 6 7


References