Operating Systems - Introduction

  • Operating system definition: program operation, resource management, service users
  • Computer system architecture: hardware, operating system, applications, users
  • Computer system organization: startup, interrupt, IO structure, storage structure
    • Startup: After confirming that the device is normal, start the boot program (initialize the device, load the operating system into the memory, run the first process init(), wait for the event to occur) generally located in ROM or EEROM
    • Interrupt: soft interrupt (software trigger cannot be masked), hard interrupt (CPU signal trigger can be masked)
      • After the interrupt occurs, the CPU runs the interrupt service routine ISR, and the system manages the interrupt request through the interrupt vector table
      • For example: I/O equipment occurrence event, abnormal event (power failure, component failure), illegal instruction (divisor is 0, instruction does not exist)
      • Interrupt occurs: save the program counter of the current process, jump to the interrupt service routine, and return to the interrupted program after completion
      • Modern operating systems are considered interrupt-driven or event-driven systems
    • I/O structure: each device has its own device controller, local buffers and registers
      • The CPU is responsible for data transfer between memory and local buffers
      • The device controller is responsible for data transfer between external devices and local buffer storage
      • The device controller notifies the CPU through an interrupt to indicate the end of I/O
      • DMA: in units of blocks, the main memory of the external device directly exchanges data, and an interrupt is triggered after each block is completed. The original unit is bytes, and the speed is increased.

      • Operation method: synchronous (the user program has control after the IO is over), asynchronous (the user program can run during the IO)
    • Storage structure: instruction register, data register
      • Primary storage device (memory), secondary storage device (non-volatile, such as disk)
      • Storage Devices: Disk, Flash, SSD
  • Computer system architecture: single processor system, multiprocessor system, cluster system (composed of multiple autonomous systems,)
    • Symmetrical structure, asymmetrical structure (there is a master-slave relationship, the structure is not quite)
    • In a multi-processor environment, each processor must have its own registers and high-speed memory to perform different tasks and improve efficiency
  • operating system structure
    • Architecture: Batch processing system (no user interaction), multiprogramming system, time-sharing system (multitasking system)
      • Multiprogramming: Increased CPU usage
      • Multitasking System: Fair Use
    • Operation: Dual mode operation (user, kernel), mode bit distinguishes

  • Operating system management content: process, memory, storage

    • buffering: transfer data
    • Cache: improve performance
    • Spooling: Low-speed character devices exchange information with the host, shared through virtual devices
  • Other computer systems: distributed, real-time. .

Guess you like

Origin blog.csdn.net/qq_56061892/article/details/126139183