Dhelle

Cards (28)

  • Operating System
    A program that acts as an intermediary between a user of a computer and the computer hardware. The software responsible for the management and coordination of activities and the sharing of the resources of the computer. Use the computer hardware in an efficient manner. Its job is to coordinate the execution of all other software, mainly user applications.
  • Operating System
    • OS is a resource allocator
    • Manages all resources
    • Decides between conflicting requests for efficient and fair resource use
    • OS is a control program
    • Controls execution of programs to prevent errors and improper use of the computer
  • 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
    • Hardware provides basic computing resources (CPU, memory, I/O devices)
    • Operating System controls and coordinates use of hardware among various applications and users
    • Application Programs define the ways in which the system resources are used to solve the computing problems of the users
    • Users are people, machines, other computers
  • Von Neumann Architecture
    • Data and instructions are stored in a single read-write memory
    • Contents of memory are addressable by location
    • Execution occurs in a sequential fashion
  • Computer System Operation
    1. I/O devices and the CPU can execute concurrently
    2. Each device controller is in charge of a particular device type
    3. Device controller has a local buffer
    4. CPU moves data from/to main memory to/from local buffers
    5. I/O is from the device to local buffer of controller
    6. Device controller informs CPU that it has finished its operation by causing an interrupt
  • Components of a Modern OS
    • Storage Management
    • Device Management
    • Memory Management
    • File Management
    • Process Management
  • Interrupt
    • A mechanism used in computer systems to handle events that require immediate attention or priority processing
    • Interrupt Service Routine (ISR) / Interrupt Handler is responsible for handling the event associated with the interrupt
  • Common Function of Interrupts
    1. Interrupt transfers control to the interrupt service routine generally, through the interrupt vector, which contains the addresses of all the service routines
    2. Incoming interrupts are disabled while another interrupt is being processed to prevent a lost interrupt
    3. A trap is a software-generated interrupt caused either by an error or a user request
    4. An operating system is interrupt driven
  • Interrupt Handling
    1. The operating system preserves the state of the CPU by storing registers and the program counter
    2. Determines which type of interrupt has occurred: Polling (periodically checks for pending interrupts) or Vectored (each device or interrupt source is assigned a unique interrupt vector or interrupt number)
    3. Separate segments of code (interrupt service routines or interrupt handlers) determine what action should be taken for each type of interrupt
  • I/O Structure
    • After I/O starts, control returns to user program only upon I/O completion (Wait instruction, Wait loop, System call)
    • After I/O starts, control returns to user program without waiting for I/O completion (Device-status table, Operating system indexes into I/O device table)
  • Direct Memory Access Structure
    • Used for high-speed I/O devices able to transmit information at close to memory speeds
    • Device controller transfers blocks of data from buffer storage directly to main memory without CPU intervention
    • Only one interrupt is generated per block, rather than the one interrupt per byte
  • Storage Structure
    • Main memory is the only large storage media that the CPU can access directly
    • Secondary storage is an extension of main memory that provides large nonvolatile storage capacity
    • Magnetic disks have a disk surface that is logically divided into tracks, which are subdivided into sectors
    • The disk controller determines the logical interaction between the device and the computer
  • Caching
    • A technique used in computing to temporarily store frequently accessed or recently used data in high-speed storage location
    • When a system accesses data, it first checks whether the data is already present in the cache
    • If the data is found in the cache (cache hit), it can be quickly retrieved
    • If the data is not found in the cache (cache miss), the system retrieves the data from the primary storage and also stores a copy of it in the cache for future access
    • Subsequent accesses to the same data can then be served directly from the cache, resulting in faster access times
  • Computer System Architecture
    • Asymmetric Multiprocessing is a multiprocessor computer system where not all of the multiple interconnected central processing units (CPUs) are treated equally
    • Symmetric Multiprocessing is the processing of programs by multiple processors that share a common operating system and memory
  • Clustered Systems
    Like multiprocessor systems, but multiple systems working together, usually sharing storage via a storage-area network (SAN)
  • Operating System Structure
    1. Multiprogramming needed for efficiency (Single user cannot keep CPU and I/O devices busy at all times, Multiprogramming organizes jobs so CPU always has one to execute, A subset of total jobs in system is kept in memory, One job selected and run via job scheduling, When it has to wait, OS switches to another job)
    2. Timesharing (multitasking) is logical extension in which CPU switches jobs so frequently that users can interact with each job while it is running, creating interactive computing (Response time should be < 1 second)
    3. Each user has at least one program executing in memory - process, If several jobs ready to run at the same time - CPU scheduling, If processes don't fit in memory, swapping moves them in and out to run
  • Operating System Operation
    Interrupt driven by hardware, Software error or request creates exception or trap (Division by zero, request for operating system service), Other process problems include infinite loop, processes modifying each other or the operating system
  • Interrupt Handling
    Determines which type of interrupt has occurred
  • Polling
    • Periodically checks for pending interrupts by polling interrupt request (IRQ) lines from devices
  • Vectored
    • Each device or interrupt source is assigned a unique interrupt vector or interrupt number
  • I/O Structure
    Device-status table contains entry for each I/O device indicating its type, address, and state
  • Storage Management
    Involves organizing and controlling the computer's storage resources
  • Device Management
    Controls and Coordinates communication between the operating system and peripheral devices connected to the computer
  • Memory Management
    Oversees the allocation, deallocation, and sharing of the computer's memory resources
  • File Management
    Organizes and manipulates files and directories stored on the computer's storage devices
  • Process Management
    Oversees scheduling, the creation, execution, and termination of process on the computer system
  • Components of a Modern OS