CSC207 - Topic 1: Introduction

Topic 1: Introduction

Basic Role of an Operating System

  • An Operating System (OS) is a program that manages all computer hardware and software.
  • It provides a basis for application programs.
  • It acts as an intermediary between the computer user and the computer hardware.

Operating System Goals

  • Execute user programs and make solving user problems easier.
  • Make the computer system convenient to use.
  • Use the computer hardware in an efficient manner.

Computer System Structure

  • Consists of users, system and application programs, an OS, and computer hardware.
  • Computer hardware provides basic computing resources: CPU, memory, I/O devices, storage, and bus.
  • The OS controls and coordinates the use of the hardware among various application programs for various users.

What Operating Systems Do

  • Controls the hardware and coordinates its use among the various application programs for the various users.
  • Consisting of hardware, software, and data.
  • Ensures proper use of resources in the operation of the computer system.
  • Similar to a government, providing an environment within which other programs can do useful work.
  • Roles of the Operating System:
    • The user
    • The system
User View
  • Single-user computers (e.g., PCs, workstations):
    • Monopolize resources.
    • Goal: ease of use and good performance.
    • Interface: User-friendly and responsive.
  • Multi-user computers (e.g., mainframes, computing servers):
    • Users share resources and may exchange information.
    • Goal: maximize resource utilization to ensure that all available CPU time, memory, and I/O are used.
User View (Cont.)
  • Handheld computers (e.g., smartphones and tablets):
    • User interface: touch screen.
    • Resources optimized for usability and battery life.
  • Embedded computers (e.g., computers in home devices and automobiles):
    • User interface: numeric keypads and indicator lights.
    • Operating systems are designed primarily to run without user intervention.
System View
  • The operating system is the program involved with the hardware.
  • Two different views:
    • OS as a resource allocator:
      • Manages all resources (hardware & software).
      • Decides between conflicting requests for efficient and fair resource use.
      • Ensures multiple users get all computing resources “simultaneously” (CPU, memory, I/O).
    • OS as a control program:
      • Controls the execution of programs to prevent errors and improper use of the computer.
      • Controls files, devices, memory, processes, etc. (all systems).
Defining Operating System
  • An Operating System is a program that controls the execution of application programs and acts as an interface between the user of a computer and the computer hardware.
  • Kernel: one program running at all times on the computer.
  • Two other types of programs:
    • System programs: associated with the operating system but are not necessarily part of the kernel.
    • Application programs: all programs not associated with the operation of the system.

Computer-System Organization

Computer Startup
  • Bootstrap program is loaded at power-up or reboot.
  • Typically stored in ROM or EPROM, generally known as firmware.
  • Initializes all aspects of the system.
  • Loads operating system kernel and starts execution.
Computer-System Operation
  • Kernel loaded and executing - start providing services to the system and its users.
  • UNIX - the first system process - init - the system is fully booted - waits for some event to occur.
  • Interrupt - The occurrence of an event

Computer-System Architecture

  • Single general-purpose processor.
  • Special-purpose processors.
  • Multiprocessors:
    • Known as parallel systems or tightly-coupled systems.
    • Advantages:
      • Increased throughput
      • Economy of scale
      • Increased reliability – fault-tolerance
    • Two types:
      • Symmetric Multiprocessing – each processor performs all tasks
      • Asymmetric Multiprocessing – each processor is assigned a specific task.
Symmetric Multiprocessing Architecture (SMP)
  • Each processor has its own L1 and L2 cache.
  • Processors share main memory and I/O subsystem.
Multicore Systems
  • Multiple computing cores on a single chip.
  • Term - multicore.
  • More efficient than multiple chips with single cores because:
    • On-chip communication is faster than between-chip communication.
    • One chip with multiple cores uses significantly less power than multiple single-core chips, important for laptops and mobile devices.
  • Multicore systems are multiprocessor systems, but not all multiprocessor systems are multicore.
  • Example: A dual-core with two cores placed on the same chip.
Clustered Systems
  • Multiple systems working together.
  • Usually sharing storage via a storage-area network (SAN).
  • Provides a high-availability service.
  • Asymmetric clustering has one machine in hot-standby mode.
  • Symmetric clustering has multiple nodes running applications, monitoring each other.
  • Some clusters:
    • High-Performance Computing (HPC): Applications must be written to use parallelization.
    • Distributed Lock Manager (DLM): Avoid conflicting operations.
Clustered Systems - Architecture
  • Multiple computers interconnected.
  • Share storage via a storage area network.

Operating-System Structure

Multiprogramming
  • Organizes jobs (code and data) so the CPU always has one to execute.
  • A subset of total jobs in the system is kept in memory.
  • Batch systems:
    • One job is selected and run via job scheduling.
    • When it has to wait (I/O), the OS switches to another job.
Timesharing Systems
  • Logical extension of batch systems.
  • CPU switches jobs so users can interact, enabling interactive computing.
Timesharing Systems (Cont.)
  • Referred to as multitasking.
  • Response time should be less than 1 second.
  • Program executing in memory is called a process.
  • Several processes are ready to run at the same time, managed by CPU scheduling.
  • If processes do not fit in memory, swapping is used.
  • Virtual memory allows the execution of processes not completely in memory.