Introduction to Operating Systems, CS I – Study Notes
offline

Source: Computer Science I, University of Central Florida

Tags: operating systems, OS, process management, memory management, file systems, device drivers, kernel, multitasking, virtual memory, paging, NTFS, FAT, HFS+

Difficulty: Introductory | Prerequisites: Basic understanding of computer hardware components (CPU, RAM, storage).


Big picture: This topic is typically the first look at what sits between the applications you write and the physical hardware they run on. Operating systems are the reason you can open a browser, a text editor, and a music player at the same time without everything collapsing. If you are coming into this cold, the key thing to grasp is that an OS is a resource manager: it decides who gets the CPU, who gets memory, and who gets to talk to the disk. Nearly every other systems topic in the course (networking, concurrency, security) builds on the concepts introduced here.


TL;DR

An operating system manages hardware and software resources so that applications can run without worrying about the details of the underlying machine. It handles process scheduling, memory allocation, file storage, device communication, and security. Everything else in systems programming assumes you understand what the OS is doing on your behalf.


Key Terms

Operating system (OS)

A layer of software that manages computer hardware and software resources and provides common services (file access, networking, memory allocation) for application programs. Think of it as the middleman between your code and the physical machine.

Process

A program in execution. In simple terms, a process is what your program becomes once it is actually running, complete with its own memory space, program counter, and system resources.

Multitasking

The ability of an OS to run multiple programs concurrently. The OS rapidly switches between processes so each appears to run at the same time, even on a single-core CPU.

Single-user vs. multi-user OS

A single-user OS is designed for one person at a time (e.g. classic Windows). A multi-user OS supports multiple people logged in and working simultaneously (e.g. Unix/Linux servers).

Virtual memory

A memory management technique that gives each process the illusion of having its own large, contiguous address space, even when physical RAM is limited. The OS maps virtual addresses to physical ones behind the scenes.

Paging

A memory management scheme that divides virtual memory into fixed-size blocks called pages and physical memory into frames of the same size. Pages can be loaded into any available frame, eliminating the need for contiguous allocation.

Swapping

Moving an entire process out of main memory to disk (and back) to free up RAM for other processes. Think of it as the OS putting a process "on hold" when memory is tight.

File system

A method for organising and storing files on a disk. It defines how data is named, stored, and retrieved. Common examples include FAT, NTFS, and HFS+.

Device driver

A specialised piece of software that allows the OS to communicate with a specific hardware device. The OS provides a standardised interface; the driver translates that into commands the hardware understands.

Kernel

The core component of an operating system that has direct control over hardware. All process scheduling, memory management, and device communication ultimately pass through the kernel.


Core Content

What an Operating System Does

  • An OS acts as an interface between applications and computer hardware.

  • It abstracts away hardware complexity so programmers can write code without knowing the specifics of every device.

  • Core responsibilities: process management, memory management, file system management, device management, and security enforcement.

Types of Operating Systems

  • Single-user vs. multi-user

    • Single-user: one person at a time (most desktop OSes in everyday use).

    • Multi-user: multiple concurrent users, common on servers and mainframes.

  • Single-tasking vs. multitasking

    • Single-tasking: one program runs at a time (early DOS systems).

    • Multitasking: multiple programs share the CPU, giving the appearance of simultaneous execution.

  • Desktop, server, and mobile

    • Desktop OSes prioritise responsiveness and user interaction.

    • Server OSes prioritise throughput, stability, and handling many simultaneous connections.

    • Mobile OSes prioritise power efficiency, touch input, and constrained resources.

Process Management

  • The OS is responsible for creating, scheduling, and terminating processes.

  • Scheduling determines which process gets CPU time and for how long.

  • The OS also handles memory allocation per process and manages input/output operations on behalf of processes.

Memory Management

  • The OS allocates and deallocates memory as processes start, run, and finish.

  • Paging breaks memory into fixed-size chunks, avoiding the problem of needing a single large contiguous block.

  • Swapping moves idle processes to disk to reclaim RAM.

  • Virtual memory lets processes use more memory than physically available by using disk space as an extension of RAM.

File Systems

  • A file system defines how data is stored on and retrieved from a disk.

  • The OS manages all file operations: creating, reading, writing, and deleting.

  • FAT (File Allocation Table): simple, widely compatible, limited in features (no permissions, file size cap of 4 GB per file).

  • NTFS (New Technology File System): used by Windows, supports large files, permissions, journaling, and encryption.

  • HFS+ (Hierarchical File System Plus): used by older macOS systems (now largely replaced by APFS).

Device Drivers

  • Drivers sit between the OS and hardware, translating generic OS commands into device-specific instructions.

  • The OS provides a standardised interface so that drivers from different manufacturers can plug in without rewriting the OS itself.

  • When you install a new printer or graphics card, the driver is what makes the OS aware of how to talk to it.

Security

  • The OS enforces security policies: who can access what, and under which conditions.

  • User accounts and permissions control access to files and system resources.

  • Firewalls filter network traffic to block unauthorised connections.

  • Antivirus software scans for and removes malicious programs, though this often runs on top of the OS rather than inside it.


Real-World Applications

Every time you open Task Manager (Windows) or Activity Monitor (macOS) and see a list of running processes with their memory usage, you are looking at the OS's process and memory management in action. Understanding these concepts is also the foundation for configuring servers, debugging performance issues, and writing software that behaves well under resource pressure.


Common Misconceptions

  • "Multitasking means the CPU runs multiple programs at the exact same time." On a single-core CPU, the OS switches between processes so quickly it appears simultaneous, but only one process executes at any given instant. True parallelism requires multiple cores.

  • "Virtual memory is the same as swap space." Swap space is one component of virtual memory. Virtual memory is the broader addressing scheme; swap is the disk area used when physical RAM is full.

  • "A file system is just a folder structure." The folder hierarchy is what you see, but the file system also manages how data is physically laid out on disk, how metadata (permissions, timestamps) is stored, and how the OS recovers from crashes (journaling).

  • "Device drivers are part of the hardware." Drivers are software. They ship with the hardware or are downloaded separately, and they can be updated independently of the device itself.


Why It Matters / Exam Flags

⚠️ Be prepared to distinguish between single-user/multi-user and single-tasking/multitasking. These are two separate axes; they are often conflated in exam answers.

⚠️ Know the differences between paging, swapping, and virtual memory. Exams frequently ask you to define each and explain how they relate.

⚠️ Be able to name at least two file systems and compare their features (FAT vs. NTFS is the most common exam pairing).

⚠️ Understand that the OS sits between applications and hardware. If asked to draw a layered diagram, the order is: hardware → OS (kernel) → system libraries → applications.


Quick Self-Test

1. True or False: A process and a program are the same thing.

A: False. A program is a static set of instructions; a process is a program in execution, with its own memory and state.

2. Fill in the blank: The memory management technique that divides memory into fixed-size blocks called pages is known as __________.

A: Paging.

3. True or False: Virtual memory allows a process to use more memory than the system physically has.

A: True. The OS uses disk space to extend available memory beyond physical RAM.

4. Fill in the blank: A __________ is software that allows the OS to communicate with a specific hardware device.

A: Device driver.

5. True or False: NTFS and FAT offer identical features.

A: False. NTFS supports journaling, encryption, large files, and file permissions; FAT does not.


Practice Q&A

Q: What is the primary role of an operating system?

A: To manage hardware and software resources and provide common services so that application programs can run without directly handling hardware details.

Q: Explain the difference between a single-tasking and a multitasking operating system.

A: A single-tasking OS can run only one program at a time. A multitasking OS can run multiple programs concurrently by scheduling CPU time among them.

Q: What is virtual memory, and why is it useful?

A: Virtual memory is a technique that gives each process the illusion of a large, contiguous address space by mapping virtual addresses to physical RAM (and disk). It is useful because it allows processes to use more memory than is physically installed, and it isolates process memory spaces from each other.

Q: Name three responsibilities of an operating system's kernel.

A: Process scheduling, memory management, and device communication (or equivalently: file system management, security enforcement, or I/O handling).

Q: What is the purpose of a device driver?

A: A device driver translates the OS's standardised commands into instructions that a specific hardware device can understand, enabling communication between the OS and the device.

Q: Compare FAT and NTFS as file systems.

A: FAT is simple and widely compatible but lacks features such as file permissions, journaling, and support for files larger than 4 GB. NTFS supports all of these and is the standard file system for modern Windows installations.


Connections to Other Topics

This material connects directly to process scheduling and concurrency topics later in the course, where you will study how the OS decides which process runs next and how processes share resources safely. It also underpins file I/O programming: when you call fopen() or open() in C, the OS and its file system are doing the real work behind that function call. Security concepts introduced here (permissions, access control) expand into full modules on authentication, encryption, and network security.


Related Terms / Search Tags

operating system, OS, kernel, process, program in execution, multitasking, single-tasking, single-user, multi-user, process management, process scheduling, CPU scheduling, memory management, paging, swapping, virtual memory, physical memory, RAM, file system, FAT, FAT32, NTFS, HFS+, APFS, device driver, hardware abstraction, security, user permissions, access control, firewall, antivirus, desktop OS, server OS, mobile OS, Windows, Linux, macOS, Unix