D686 Operating Systems Comprehensive Study Guide

Fundamentals of Operating Systems and Computing Hardware

  • Operating System (General Definition): A software program that serves as an intermediary between a computer user and the physical computer hardware. Its primary roles include managing hardware resources, providing a foundation for application programs, and facilitating user interaction.

  • Hardware: The physical components of a computer system, including the Central Processing Unit (CPU), memory devices, and input/output (I/O) devices.

  • Application Program: Software designed specifically for execution by end-users. Common examples include word processors, spreadsheets, compilers, and web browsers.

  • Ease of Use: A metric describing the level of difficulty and complexity a user experiences when interacting with a specific aspect of computing.

  • Resource Utilization: The measurement of how much of a specific hardware or software resource is currently being consumed.

  • User Interaction Tools:

    • Touch Screen: An input device that is sensitive to touch.

    • Voice Recognition: An interface allowing users to issue spoken commands which the computer parses into executable actions.

    • Siri: The specific voice-recognition system developed by Apple.

    • Gesture: A user interface component where physical motions (such as "pinching" a screen) trigger specific computer actions.

  • Embedded Computer: A specialized computer system integrated within a larger device (such as an automobile) to perform limited, specific functions, typically characterized by having little to no user interface.

  • Resource Allocator: A function of the operating system or specific applications that determines the distribution and use of available resources.

  • Control Program: A component responsible for managing the execution of user programs. Its primary goals are to prevent errors, stop improper computer use, and oversee the operation and control of I/O devices.

System Architecture and Performance Principles

  • Moore's Law: The observation that the number of parts (transistors) on a computer chip approximately doubles every 1818 months.

  • Kernel: The core part of an operating system that remains active and running from the moment the computer is powered on.

  • System Program: Software closely associated with the operating system but intended for smaller, more specific tasks rather than core management.

  • Bus: A communication pathway utilized to transfer data and instructions between different components of the computer, such as between the CPU and various devices.

  • Device Driver: A software component that allows the operating system to communicate with and control specific hardware peripherals like printers or keyboards.

  • Bootstrap Program: The initial program that executes when a computer is turned on, responsible for initializing the system and preparing the environment for the main operating system to run.

  • System Daemon (or Daemon): A service provided outside the kernel by system programs. These are loaded into memory during boot time and run continuously in the background.

  • Run-time Environment (RTE): The complete suite of software required to execute applications for a specific programming language, including libraries, compilers, and loaders.

Interrupt Management and CPU Control

  • Interrupt: A signal sent from a device to the CPU indicating that a specific event requires immediate attention.

  • Interrupt Vector: A dispatch table or list used by the computer to identify the memory location of handler routines for different types of interrupts.

  • Interrupt-Request Line: The physical wire or circuit used by devices to transmit interrupt signals to the CPU.

  • Interrupt-Handler Routine: A specialized program or portion of code that the computer executes specifically to address an interrupt signal.

  • Interrupt-Controller: Physical hardware components tasked with managing the timing and handling of interrupts.

  • Classification of Interrupts:

    • Nonmaskable Interrupt: An urgent, high-priority signal (such as a major hardware error) that the CPU is required to process immediately.

    • Maskable Interrupt: An interrupt signal that the CPU can choose to temporarily ignore or delay when it is performing high-priority tasks.

  • Interrupt Chaining: A methodology where the system iterates through a list of potential programs to find the specific one intended to handle a particular interrupt.

  • Interrupt Priority Level: A ranking system used to determine the urgency of various interrupts, ensuring the CPU processes them in the correct sequence.

  • Software Interrupts:

    • Trap: A software-generated interrupt. This can be triggered by a specific error (e.g., division by zero, invalid memory access) or by an intentional request from a user program for an operating system service.

    • Exception: A software-generated interrupt essentially synonymous with a trap, caused by errors or specific user program requests.

  • System Call: A software-triggered interrupt that allows a running process to request a service from the kernel.

Memory and Data Storage

  • Data Units:

    • Bit: The smallest unit of data, representing a binary value of 00 (off) or 11 (on).

    • Byte: A unit of data consisting of 88 bits.

    • Word: A larger data unit representing multiple bytes. In a 3232-bit system, a word is 44 bytes; in a 6464-bit system, a word is 88 bytes.

  • Primary Memory:

    • Random-Access Memory (RAM): The computer's main memory used for high-speed data access and program execution.

    • Dynamic Random-Access Memory (DRAM): A common, fast type of RAM widely used in modern computers.

    • Volatile Memory: Memory that loses all stored information when power is removed.

  • Nonvolatile Memory and Storage:

    • Nonvolatile Memory (NVM): Memory that retains its data even without power.

    • Nonvolatile Storage (NVS): Storage media like hard drives and SSDs that keep data permanently without power.

    • Electrically Erasable Programmable Read-Only Memory (EEPROM): A nonvolatile memory type that can be electronically erased and rewritten.

    • Hard Disk Drive (HDD): A storage device using spinning magnetic disks and read/write heads.

    • Solid State Drive (SSD): A data storage device using flash memory with no moving parts.

  • Memory Management Techniques:

    • Virtual Memory: A technique allowing the execution of processes that are not entirely in physical memory. It separates the logical memory address space as viewed by the user from the physical address space.

    • Logical Memory: How the user views memory — typically as a large, uniform array which may not correlate directly to physical RAM in a virtual memory system.

    • Paging: A management technique where data is retrieved and stored in fixed-size blocks called pages.

    • Segmentation: A management method that divides memory into variable-sized segments to allow for flexible allocation.

  • Main Memory Management: The specific OS process of handling RAM to ensure efficient allocation to programs.

CPU Execution and Operating Modes

  • CPU (Central Processing Unit): The hardware responsible for executing instructions.

  • Processor: A physical chip that may contain one or multiple CPUs.

  • Core: The basic computational unit within a CPU that actually executes instructions.

  • Multicore: A system where a single CPU chip contains multiple processing cores.

  • Dual-Mode Operation:

    • User Mode: A restricted CPU mode for executing user processes where certain instructions are prohibited. Represented by a mode bit of 11.

    • Kernel Mode (Supervisor/System/Privileged Mode): A mode where all CPU instructions are enabled, allowing the kernel to perform sensitive tasks. Represented by a mode bit of 00.

    • Mode Bit: A hardware status bit used to distinguish between user and kernel modes.

    • Privileged Instructions: Instructions that can only be successfully executed when the CPU is in kernel mode.

  • Protection Rings: A model of privilege separation involving concentric rings, where inner rings have higher execution privileges than outer rings.

  • Timer: A hardware component used to trigger an interrupt after a specified period, typically to prevent a program from monopolizing the CPU.

  • CPU Scheduling: The method the OS uses to decide which "ready" process is granted CPU time and for what duration.

System Performance and Processing Models

  • Multiprogramming: A technique to increase CPU utilization by organizing jobs so that the CPU always has something to execute; it keeps multiple programs in memory simultaneously.

  • Process: A program that has been loaded into memory and is currently in a state of execution.

  • Multitasking: The concurrent performance of multiple jobs. The CPU switches between processes so rapidly that users can interact with each program while it runs.

  • Response Time: The duration of time between a user action and the system's response.

  • Context Switching: The process of saving the current state of a process or thread and restoring a different one.

  • Operating System Types:

    • Batch Operating System: Executes similar jobs in groups (batches) to optimize CPU use, requiring no user interaction during execution.

    • Time-Sharing System: An OS that allows multiple users to share resources simultaneously through rapid switching.

    • Real-Time System: Systems that must complete tasks within strictly defined time constraints.

      • Hard Real-Time: Critical tasks must meet strict deadlines; these systems often lack virtual memory or time-sharing.

      • Soft Real-Time: Tasks have deadlines, but there is flexibility for some timing variability.

Distributed and Multi-Processor Computing

  • Multiprocessor System: A system featuring more than one CPU working together.

  • Parallel Systems: Systems with multiple CPUs that share memory and communicate directly to execute tasks simultaneously.

  • Symmetric Multiprocessing (SMP): A model where each processor performs all tasks, including OS functions and user processes.

  • Tightly Coupled Systems: Systems where multiple processors share the computer bus, clock, memory, and peripherals.

  • Loosely Coupled Systems: Systems where independent computers communicate over a network (e.g., distributed systems).

  • Clustered Systems: A collection of two or more individual systems (nodes) joined together to work as a unit.

    • Asymmetric Clustering: One machine is in "hot-standby mode" while the others run applications.

    • Symmetric Clustering: Multiple hosts run applications while simultaneously monitoring one another.

  • Hot-Standby Mode: A state where a server does nothing but monitor an active server, ready to take over if the active one fails.

  • High-Availability: A service design that ensures continued operation even if one or more cluster nodes fail.

  • Fault Tolerance: The ability of a system to redistribute tasks and continue operating after a component failure.

  • Graceful Degradation: The ability of a system to continue providing service proportional to the amount of remaining functional hardware after a failure.

  • High-Performance Computing (HPC): Facilities designed with massive resources for software capable of parallel operation.

  • Parallelization: The process of splitting a program into separate components to run simultaneously across multiple cores or cluster nodes.

  • Storage-Area Network (SAN): A local-area storage network that connects multiple computers to storage devices.

  • Distributed Operating System: An OS that manages networked processors collaborating on tasks.

  • Local Area Network (LAN): Networking within a small area, like a single building.

  • Wide Area Network (WAN): Networking over large distances, such as across cities or countries.

User Interfaces and Interaction Environments

  • User Interface (UI): The method through which a user interacts with a computer system.

  • Graphical User Interface (GUI): A visual interface using a window system and pointing device to select menus and icons.

  • Desktop: The standard workspace represented by a GUI on the screen.

  • Icons: Images on a GUI representing objects like files or applications.

  • Folder: A file system component used to group files together.

  • Command-Line Interface (CLI): A text-based method for providing commands to the computer via a keyboard.

  • Command Interpreter: The OS component that parses and executes user-provided commands.

  • Shell: One of potentially several command interpreters available on a system.

  • Shell Script: A file containing a series of shell commands executed sequentially.

  • Springboard: The specific name for the iOS touch-screen interface.

  • User Categories:

    • System Administrators: Users responsible for configuring, monitoring, and managing the computer system.

    • Power Users: Users with deep technical knowledge of the system.

System Calls and Interprocess Communication (IPC)

  • Application Programming Interface (API): A set of functions and tools for programmers to develop software.

  • C Library (libc): The standard system API for UNIX/Linux systems for the C programming language.

  • System-Call Interface: The link between a process and the system calls provided by the OS.

  • Categories of System Calls:

    • Process Control: Handling process execution (create, terminate, load, execute, get/set attributes, wait/signal event, allocate/free memory).

    • File Management: managing files (create, delete, open, close, read, write, reposition, get/set attributes).

    • Device Management: Managing physical and virtual devices (request, release, read, write, reposition, attach/detach logically).

    • Information Maintenance: Transferring data between the OS and user programs (get/set time, system data, or attributes).

    • Communications: Enabling data exchange between processes (create/delete connections, send/receive messages, transfer status).

    • Protection: Controlling access to resources.

  • IPC Models:

    • Shared Memory Model: Processes share a section of memory to pass messages.

    • Message-Passing Model: Processes exchange predefined packets of information; can occur between processes on the same computer or between different computers.

  • Data Structures (Stack): A LIFO (Last-In, First-Out) structure where the last item "pushed" (added) is the first item removed.

OS Design and Structure

  • Monolithic Architecture: A kernel design without a formal structure (no layers or modules).

  • Layered Approach: An architecture where the OS is divided into levels; Layer 00 is typically hardware, and Layer NN is the user interface.

  • Microkernel: A structure that moves nonessential components out of the kernel and implements them as system/user-level programs.

  • Mach: A specific microkernel-based operating system developed at Carnegie Mellon University.

  • Loadable Kernel Module (LKM): A design where the kernel has core components but can link additional services as modules during boot or at run-time.

  • iOS/macOS Specific Layers:

    • User Experience Layer: Defines the software interface for user interaction.

    • Application Frameworks Layer: Includes Cocoa and Cocoa Touch for Objective-C and Swift.

    • Core Frameworks Layer: Supports graphics and media (e.g., QuickTime, OpenGL).

    • Kernel Environment (Darwin): Includes the Mach microkernel and the BSD Unix kernel.

  • Virtual Machine Manager (VMM): Also known as a hypervisor, it manages virtual machines.

  • Emulator: Software or hardware that allows one system to mimic another to run incompatible software.

Maintenance, Security, and File Management

  • File: A named collection of data stored on a device and managed by the operating system.

  • Registry: A file or service used to store configuration data (e.g., Windows Registry hives).

  • Big Data: Extremely large datasets that often require distributed systems for processing.

  • MapReduce: A Google-created model for parallel processing of big data across distributed clusters, building on top of the Google File System (GFS).

  • Distributed Lock Manager (DLM): Prevents conflicting operations in a clustered system by providing access control.

  • Diagnostics and Debugging:

    • Debugger: A program used to find and correct software errors.

    • Bug: An error in hardware or software.

    • Single Step: A CPU mode that executes a trap after every instruction to allow for detailed examination of the system state.

    • Lock: A mechanism used to restrict access to shared data to maintain integrity.

  • Security and Protection:

    • Protection: Functions that control and limit access to resources by users or processes.

    • Security: Measures taken to defend the system against internal and external threats/attacks.

    • Malware: Malicious software intended to damage or gain unauthorized access.

    • Ransomware: A specific type of malware that encrypts files and demands payment for the decryption key.

  • Arduino Specifics:

    • Sketch: The name for a program written for the Arduino platform.