2.10. Operating Systems (OS)

2.10. Operating Systems (OS)

The operating system is a collection of services needed to safely interface the hardware with applications. Core topics focus on the mechanisms and policies needed to virtualize computation, memory, and Input/Output (I/O). Overarching themes that are reused at many levels in computer systems are well illustrated in operating systems (e.g., polling vs interrupts, caching, flexibility vs costs, scheduling approaches to processes, page replacement, etc.). The Operating Systems knowledge area contains the key underlying concepts for other knowledge areas - trust boundaries, concurrency, persistence, and safe extensibility.

Table 2.10: List of KUs in the Operating Systems area.

2.10.1. OS/Role and Purpose of Operating Systems  (CS Core: 2 hrs) ↑ Back to top

Topics:
Core

  • Operating systems mediate between general purpose hardware and application-specific software.
  • Universal operating system functions (e.g., process, user and device interfaces, persistence of data)
  • Extended and/or specialized operating system functions (e.g., embedded systems, server types such as file, web, multimedia, boot loaders and boot security)
  • Design issues (e.g., efficiency, robustness, flexibility, portability, security, compatibility, power, safety, tradeoffs between error checking and performance, flexibility and performance, and security and performance). See also: Security Design and Controls Engineering , Threat Analysis and Security Engineering , Trusted Computing and Privacy Engineering
  • Influences of security, networking, multimedia, parallel and distributed computing
  • Overarching concern of security/protection: Neglecting to consider security at every layer creates an opportunity to inappropriately access resources.
    1. Unauthorized access to files on an unencrypted drive can be achieved by moving the media to another computer.
    2. Operating systems enforced security can be defeated by infiltrating the boot layer before the operating system is loaded.
    3. Process isolation can be subverted by inadequate authorization checking at API boundaries.
    4. Vulnerabilities in system firmware can provide attack vectors that bypass the operating system entirely.
    5. Improper isolation of virtual machine memory, computing, and hardware can expose the host system to attacks from guest systems.
    6. The operating system may need to mitigate exploitation of hardware and firmware vulnerabilities, leading to potential performance reductions (e.g., Spectre and Meltdown mitigations). enumerate
    7. Exposure of operating systems functions in shells and systems programming. See also: Shell Scripting

    Learning Outcomes:
    Core:

    1. Understand the objectives and functions of modern operating systems [Explain]
    2. Evaluate the design issues in different usage scenarios (e.g., real time OS, mobile, server) [Evaluate]
    3. Understand the functions of a contemporary operating system with respect to convenience, efficiency, and the ability to evolve [Explain]
    4. Understand how evolution and stability are desirable and mutually antagonistic in operating systems function [Explain]

    2.10.2. OS/Principles of Operating System  (CS Core: 2 hrs) ↑ Back to top

    Topics:
    Core

    • Operating system software design and approaches (e.g., monolithic, layered, modular, micro-kernel, unikernel)
    • Abstractions, processes, and resources
    • Concept of system calls and links to application program interfaces (e.g., Win32, Java, Posix). See also: Assembly Level Machine Organization
    • The evolution of the link between hardware architecture and the operating system functions
    • Protection of resources means protecting some machine instructions/functions. See also: Assembly Level Machine Organization
      1. Applications cannot arbitrarily access memory locations or file storage device addresses.
      2. Protection of coprocessors and network devices enumerate
      3. Leveraging interrupts from hardware level: service routines and implementations. See also: Assembly Level Machine Organization
        1. Timer interrupts for implementing time slices
        2. I/O interrupts for putting blocking threads to sleep without polling enumerate
        3. Concept of user/system state and protection, transition to kernel mode using system calls. See also: Assembly Level Machine Organization
        4. Mechanism for invoking system calls, the corresponding mode and context switch and return from interrupt. See also: Assembly Level Machine Organization
        5. Performance costs of context switches and associated cache flushes when performing process switches in Spectre-mitigated environments.

        Learning Outcomes:
        Core:

        1. Understand how the application of software design approaches to operating systems design/implementation (e.g., layered, modular, etc.) affects the robustness and maintainability of an operating system [Explain]
        2. Categorize system calls by purpose [Categorize]
        3. Understand dynamics of invoking a system call (e.g., passing parameters, mode change) [Explain]
        4. Evaluate whether a function can be implemented in the application layer or can only be accomplished by system calls [Evaluate]
        5. Apply OS techniques for isolation, protection, and throughput across OS functions (e.g., starvation similarities in process scheduling, disk request scheduling, semaphores, etc.) and beyond [Apply]
        6. Understand how the separation into kernel and user mode affects safety and performance [Explain]
        7. Understand the advantages and disadvantages of using interrupt processing in enabling multiprogramming [Explain]
        8. Analyze potential vectors of attack via the operating systems and the security features designed to guard against them [Analyze]

        2.10.3. OS/Concurrency  (CS Core: 2 hrs, KA Core: 1 hr) ↑ Back to top

        Topics:
        Core

        Non Core

        • Managing atomic access to OS objects (e.g., big kernel lock vs many small locks vs lockless data structures like lists)

        Learning Outcomes:
        Core:

        1. Understand the advantages and disadvantages of concurrency as inseparable functions within the operating system framework [Explain]
        2. Understand how architecture level implementation results in concurrency problems including race conditions [Explain]
        3. Understand concurrency issues in multiprocessor systems [Explain]
        4. Understand the range of mechanisms that can be employed at the operating system level to realize concurrent systems and describe the benefits of each [Explain]
        5. Understand techniques for achieving synchronization in an operating system (e.g., describe how a semaphore can be implemented using OS primitives) including intra-concurrency control and use of hardware atomics [Explain]
        6. Accurately analyze code to identify race conditions and appropriate solutions for addressing race conditions [Analyze]

        2.10.4. OS/Protection and Safety  (CS Core: 2 hrs, KA Core: 1 hr) ↑ Back to top

        Topics:
        Core

        Learning Outcomes:
        Core:

        1. Understand the requirement for protection and security mechanisms in operating systems [Explain]
        2. List and describe the attack vectors that leverage OS vulnerabilities [List]
        3. Understand the mechanisms available in an OS to control access to resources [Explain]
        4. Summarize the features and limitations of an operating system that impact protection and security [Summarize]

        2.10.5. OS/Scheduling  (KA Core: 2 hrs) ↑ Back to top

        Topics:
        Core

        • Preemptive and non-preemptive scheduling
        • Schedulers and policies (e.g., first come, first serve, shortest job first, priority, round robin, multilevel). See also: Resource Management
        • Concepts of Symmetric Multi-Processor (SMP) scheduling and cache coherence. See also: Memory Hierarchy
        • Timers (e.g., building many timers out of finite hardware timers). See also: Assembly Level Machine Organization
        • Fairness and starvation

        Non Core

        Learning Outcomes:
        Core:

        1. Compare and contrast the common algorithms used for both preemptive and non-preemptive scheduling of tasks in operating systems, such as priority, performance comparison, and fair-share schemes [Compare]
        2. Explain the relationships between scheduling algorithms and application domains [Explain]
        3. Explain the distinctions among types of processor scheduler such as short-term, medium-term, long-term, and I/O [Explain]
        4. Evaluate a problem or solution to determine appropriateness for asymmetric and/or symmetric multiprocessing [Evaluate]
        5. Evaluate a problem or solution to determine appropriateness as a process vs threads [Evaluate]
        6. List some contexts benefitting from preemption and deadline scheduling [List]

        NonCore:

        1. Explain the ways that the logic embodied in scheduling algorithms are applicable to other operating systems mechanisms, such as first come first serve or priority to disk I/O, network scheduling, project scheduling, and problems beyond computing [Explain]

        2.10.6. OS/Process Model  (KA Core: 2 hrs) ↑ Back to top

        Topics:
        Core

        Learning Outcomes:
        Core:

        1. Understand how processes and threads use concurrency features to virtualize control [Explain]
        2. Understand reasons for using interrupts, dispatching, and context switching to support concurrency and virtualization in an operating system [Explain]
        3. Understand the different states that a task may pass through, and the data structures needed to support the management of many tasks [Explain]
        4. Understand the different ways of allocating memory to tasks, citing the relative merits of each [Explain]
        5. Apply the appropriate interprocess communication mechanism for a specific purpose in a programmed software artifact [Apply]

        2.10.7. OS/Memory Management  (KA Core: 1 hr) ↑ Back to top

        Topics:
        Core

        Non Core

        • Virtual memory: leveraging virtual memory hardware for OS services and efficiency

        Learning Outcomes:
        Core:

        1. Explain memory hierarchy and cost-performance tradeoffs [Explain]
        2. Summarize the principles of virtual memory as applied to caching and paging [Summarize]
        3. Evaluate the tradeoffs in terms of memory size (main memory, cache memory, auxiliary memory) and processor speed [Evaluate]
        4. Describe the reason for and use of cache memory (performance and proximity, how caches complicate isolation and virtual machine abstraction) [Describe]
        5. Code/Develop efficient programs that consider the effects of page replacement and frame allocation on the performance of a process and the system in which it executes [Create]

        NonCore:

        1. Explain how hardware is utilized for efficient virtualization [Explain]

        2.10.8. OS/Device management  (KA Core: 1 hr) ↑ Back to top

        Topics:
        Core

        Non Core

        • Device interface abstractions, hardware abstraction layer
        • Device driver purpose, abstraction, implementation, and testing challenges
        • High-level fault tolerance in device communication

        Learning Outcomes:
        Core:

        1. Explain architecture level device control implementation and link relevant operating system mechanisms and policy (e.g., buffering strategies, direct memory access) [Explain]
        2. Explain OS device management layers and the architecture (e.g., device controller, device driver, device abstraction) [Explain]
        3. Explain the relationship between the physical hardware and the virtual devices maintained by the operating system [Explain]
        4. Explain I/O data buffering and describe strategies for implementing it [Explain]
        5. Describe the advantages and disadvantages of direct memory access and discuss the circumstances in which its use is warranted [Describe]

        NonCore:

        1. Describe the complexity and best practices for the creation of device drivers [Describe]

        2.10.9. OS/File Systems API and Implementation  (KA Core: 2 hrs) ↑ Back to top

        Topics:
        Core

        • Concept of a file including data, metadata, operations, and access-mode
        • File system mounting
        • File access control
        • File sharing
        • Basic file allocation methods, including linked allocation table
        • File system structures comprising file allocation including various directory structures and methods for uniquely identifying files (e.g., name, identified or metadata storage location)
        • Allocation/deallocation/storage techniques (algorithms and data structure) impact on performance and flexibility (i.e., internal and external fragmentation and compaction)
        • Free space management such as using bit tables vs linking
        • Implementation of directories to segment and track file location

        Learning Outcomes:
        Core:

        1. Explain the choices to be made in designing file systems [Explain]
        2. Evaluate different approaches to file organization, recognizing the strengths and weaknesses of each [Evaluate]
        3. Apply software constructs appropriately given knowledge of the file system implementation [Apply]

        2.10.10. OS/Advanced File systems  (KA Core: 1 hr) ↑ Back to top

        Topics:
        Core

        • File systems: partitioning, mount/unmount, virtual file systems
        • In-depth implementation techniques
        • Memory-mapped files. See also: Interfacing and Communication
        • Special-purpose file systems
        • Naming, searching, access, backups
        • Journaling and log-structured file systems. See also: System Reliability

        Non Core

        • Distributed file systems
        • Encrypted file systems
        • Fault tolerance

        Learning Outcomes:
        Core:

        1. Explain how hardware developments have led to changes in the priorities for the design and the management of file systems [Explain]
        2. Map file abstractions to a list of relevant devices and interfaces [Map]
        3. Identify and categorize different mount types [Analyze]
        4. Explain specific file systems requirements and the specialized file systems features that meet those requirements [Explain]
        5. Explain the use of journaling and how log-structured file systems enhance fault tolerance [Explain]

        NonCore:

        1. Explain purpose and complexity of distributed file systems [Explain]
        2. List examples of distributed file systems protocols [List]
        3. Explain mechanisms in file systems to improve fault tolerance [Explain]

        2.10.11. OS/Virtualization  (KA Core: 1 hr) ↑ Back to top

        Topics:
        Core

        Non Core

        Learning Outcomes:
        Core:

        1. Explain how hardware architecture provides support and efficiencies for virtualization [Explain]
        2. Explain the difference between emulation and isolation [Explain]
        3. Evaluate virtualization tradeoffs [Evaluate]

        NonCore:

        1. Explain hypervisors and the need for them in conjunction with different types of hypervisors [Explain]

        2.10.12. OS/Real-time and Embedded Systems  (KA Core: 1 hr) ↑ Back to top

        Topics:
        Core

        Non Core

        • Memory/disk management requirements in a real-time environment.
        • Failures, risks, and recovery.
        • Special concerns in real-time systems (safety).

        Learning Outcomes:
        Core:

        1. Explain what makes a system a real-time system [Explain]
        2. Explain latency and its sources in software systems and its characteristics [Explain]
        3. Explain special concerns that real-time systems present, including risk, and how these concerns are addressed [Explain]

        NonCore:

        1. Explain specific real time operating systems features and mechanisms [Explain]

        2.10.13. OS/Fault tolerance  (KA Core: 1 hr) ↑ Back to top

        Topics:
        Core

        Non Core

        • Spatial and temporal redundancy. See also: System Reliability
        • Methods used to implement fault tolerance. See also: System Reliability
        • Error identification and correction mechanisms, checksums of volatile memory in RAM. See also: Memory Hierarchy
        • File system consistency check and recovery.
        • Journaling and log-structured file systems. See also: System Reliability
        • Use-cases for fault-tolerance (databases, safety-critical). See also: System Reliability
        • Examples of OS mechanisms for detection, recovery, restart to implement fault tolerance, use of these techniques for the OS's own services. See also: System Reliability

        Learning Outcomes:
        Core:

        1. Explain how operating systems can facilitate fault tolerance, reliability, and availability [Explain]
        2. Explain the range of methods for implementing fault tolerance in an operating system [Explain]
        3. Explain how an operating system can continue functioning after a fault occurs [Explain]
        4. Explain the performance and flexibility tradeoffs that impact using fault tolerance [Explain]

        NonCore:

        1. Describe operating systems fault tolerance issues and mechanisms in detail [Describe]

        2.10.14. OS/Society, Ethics, and the Profession ↑ Back to top

        Topics:
        Core

        Learning Outcomes:
        Core:

        1. Explain advantages and disadvantages of finding and addressing bugs in open-source kernels [Explain]
        2. Contextualize history and positive and negative impact of Linux as an open-source product [Contextualize]
        3. List complications with reliance on operating systems past end-of-life [List]
        4. Understand differences in finding and addressing bugs for various operating systems payment models [Explain]

        Spotted a typo, an outdated course, a broken link, or have a suggestion? Let us know.

        Scan to open on your phone