Object Systems

Lecture 2

Date Taken: Fall 2025
Status: Completed
Reference: LSU Professor Daniel Donze, ChatGPT

What's Covered?

Background

Operating System Services (2 & 3)

Operating systems also provide services that improve communication, reliability, efficiency, and security within the system:

System Boot

The boot process is how a computer starts up its operating system. It begins the moment power is turned on and continues until the OS is fully running.

Abstract View of Components of Modern Computer Abstract View of Components of Modern Computer 2 Abstract View of Components of Modern Computer 3 Single Processor System

MultiProcessor / Parallel Systems

Multiprocessor systems use more than one CPU to increase performance, reliability, and efficiency. These systems can be designed in different ways depending on how processors communicate and share resources.

Multiprocessor System Symmetric Multiprocessor System and Asymmetric Multiprocessor System Multi-Core Processor System

Caching

Cache is a smaller, faster memory that stores copies of frequently accessed data from main memory. It reduces the time to access data and improves overall system performance. Caches are organized in levels (L1, L2, L3) based on their proximity to the CPU. Caches use various strategies for data management, including write-through and write-back policies.

Cache Memory Hierarchy Cache Memory Structure Storage System Hierarchy

Command Line Interpreter

The command-line interpreter (CLI), or shell, is a program that reads and executes commands from the user. It provides an interface for users to interact with the operating system by typing commands. Examples include Bash (Linux), Command Prompt (Windows), and PowerShell (Windows). The shell can execute built-in commands and launch other programs.

Bourne Shell

Graphical User Interface

A graphical user interface (GUI) allows users to interact with the operating system through graphical elements like windows, icons, and menus. GUIs are more user-friendly than command-line interfaces, especially for non-technical users. Examples include Windows Explorer (Windows), Finder (macOS), and GNOME/KDE (Linux). GUIs often include features like drag-and-drop, context menus, and visual feedback.

Many operating systems support both CLI and GUI, allowing users to choose their preferred method of interaction.

Touchscreen Interfaces

Touchscreen interfaces are designed for devices with touch-sensitive screens, such as smartphones and tablets. They allow users to interact with the operating system using gestures like tapping, swiping, and pinching. Examples include iOS (Apple devices) and Android (various manufacturers). Touchscreen interfaces often feature large icons and buttons for ease of use.

I/O Devices

Input/output (I/O) devices are hardware components that allow a computer to communicate with the external world. Common input devices include keyboards, mice, and touchscreens, while common output devices include monitors, printers, and speakers. The operating system manages I/O devices through device drivers, which are specialized programs that translate OS commands into device-specific operations. Examples of I/O devices include:

Direct Memory Access (DMA)

Direct Memory Access (DMA) is a feature that allows certain hardware subsystems to access main memory independently of the CPU. This improves performance by offloading data transfer tasks from the CPU, allowing it to focus on other processing tasks. DMA is commonly used for high-speed data transfers, such as disk I/O and network communication. The DMA controller manages the data transfer process, coordinating between the device and memory.

Interrupts

An interrupt is a signal sent to the CPU by hardware or software indicating an event that needs immediate attention. When an interrupt occurs, the CPU temporarily halts its current operations, saves its state, and executes an interrupt handler to address the event. After handling the interrupt, the CPU resumes its previous tasks. Interrupts are essential for efficient I/O operations and real-time processing. Types of interrupts include:

Interrupt Handling Process Interrupt Structure Interrupt Structure

Security and Protection in Modern Computers

Modern computers implement various security and protection mechanisms to safeguard data and resources. These include:

Dual-Mode: Supervisor vs. User

Modern CPUs support at least two privilege modes: user mode and supervisor (kernel) mode.

The CPU switches between these modes using special instructions (such as system calls or interrupts). This separation ensures that user applications cannot compromise the integrity of the operating system or other programs.

System Calls

Processes are generally split into two groups

When a user process needs to perform actions requiring kernel level access, like file operations, it uses system calls. These calls act as a controlled interface, allowing user processes to request services from the operating system securely.

Simplified System Call Process

User Process code run until it needs privileges then makes a system call, this will work like a regular function from a code standpoint. Code will switch the process to temporarily run. Process performs privleged actions in kernel mode. Revert to User Mode

System Call Pipeline

System Call Specifics (Linux)

In Linux, system calls follow a specific sequence to transition from user mode to kernel mode. The process involves the use of C library wrappers, registers, and system call identifiers.

System Call Specifics (Linux - Continued)

Once the system call enters the kernel, the kernel handles the request, validates it, and eventually returns control back to the user program through the C library wrapper.

Detailed System Call Diagram

I/O Protection

Make all I/O operations privileged. Process has no direct access to devices but rather must ask OS for I/O. What happens if a process doesn't have the proper privilege? If a process without the proper privilege attempts direct I/O, the OS blocks it, often raising an error or exception, to protect the system from crashes or malicious activity.

Transitions Between User and Kernel Modes

Many happen as result of some hardware-initiated condition (Hardware Interrupt). Triggered by hardware events (e.g., Page faults, I/O completion). Or via a system call Software Interrupt/Trap. System call from user mode notifies OS. OS evaluates the request then performs actions in kernel mode on behalf of user-mode code.

Transitions 1 Transitions 2 Transitions 3

Memory Protection

Protect area of memory allocated to the OS Protect interrupt vector and interrupt service routines Restrict access to memory-mapped I/O devices Protect memory address spaces of individual processes from other processes

Virtual Memory

Virtualization

Virtualization is the process of creating a “virtual” layer of hardware, allowing one computer to run another computer inside it. Essentially, it is like running a “computer inside a computer.”

Virtualization Terminology

Types of Hypervisors

Virtualization Capabilities

Popular Software Virtualization Tools

Containerization Software