Introduction to Operating Systems

3 min read Updated Tue Apr 28 2026 07:56:31 GMT+0000 (Coordinated Universal Time)

Operating system is a program that acts as an intermediary between the user and hardware. Works as a resource allocator. Provides a user interface. Provides an abstraction for application software to work. Manages processes, memory, files, and devices. Ensures efficiency, security, and convenience.

Distributed Systems

Multiple networked systems, possibly heterogeneous, working together.

System Bus

Shared communication backbone that connects the CPU, memory, and I/O devices so they can exchange data.

All devices share main memory. Devices use local buffers to store data temporarily.

Multiprogramming

A subset of total jobs in system is kept in memory. One job selected and run via job scheduling. When job has to wait (for I/O for example), OS switches to another job.

Multitasking

Aka. time sharing. A logical extension of Batch systems. the CPU switches jobs very frequently that users can interact with each job while it is running. Response time should be less than a second. Each user has at least one process running. If several jobs ready to run at the same time, they must be scheduled. If processes don’t fit in memory, they must be swapped to and from memory. Virtual memory allows execution of processes not completely in memory.

Multicore Programming

Multicore CPUs require programmers to split work across cores.

Concurrency

Many tasks make progress, even on 1 core.

Parallelism

Many tasks actually run simultaneously on different cores.

Data Parallelism

Split the data across cores.

Task Parallelism

Split the operations across cores.

Dual Mode

When an OS has 2 modes: user mode and kernel mode. Runs in either one at a time. Mode bit represents the current mode.

Can be switched programmatically. A protection mechanism. Mode bit provided by the hardware is used to store the mode.

User Mode

Applications run in user mode.

Kernel Mode

Core of the OS runs in kernel mode. Can execute privileged instructions.

Transition to kernel mode happens via system calls.

Examples

Minix

Initially properietary. Now free and open source. Uses a microkernel.

Mach

Not to be confused between Macintosh. Uses a microkernel. Syscalls and IPC is message-based. Ports are used for communication.

Windows

Uses a hybrid kernel. Mostly monolithic for performance. Windows keeps drivers, file systems, networking, and the graphics subsystem in kernel mode for performance.

The microkernel idea is reflected in the HAL, the small NT Kernel core, and user-mode subsystems. But the rest (I/O, drivers, GUI) is kept in kernel space, making it a hybrid.

Local message system using ports. Works within the same machine. Client-server model.

Android

Developed by Open Handset Alliance (mostly Google). Open Source.

Based on Linux kernel but modified:

  • Provides process, memory, device-driver management
  • Adds power management

Apps are written in Kotlin (previously Java) and Android API. The class files are compiled to Java bytecode and then translated to .dex bytecode, which stands for Dalvik Executable. Android previously used Dalvik Virtual Machine. Dalvik used JIT compilation. For performance and DX reasons, Android moved to Android Runtime (ART). Android Runtime (ART) is an ahead-of-time (AOT) compiler that compiles .dex files to .oat files.

Native libraries include frameworks for web browser (webkit), database (SQLite), multimedia, smaller libc.