Summary Class notes - Operating Systems

- Operating Systems
- n/a
- 2018 - 2019
- CS
196 Flashcards & Notes
1 Students
  • This summary

  • +380.000 other summaries

  • A unique study tool

  • A rehearsal system for this summary

  • Studycoaching with videos

Remember faster, study better. Scientifically proven.

PREMIUM summaries are quality controlled, selected summaries prepared for you to help you achieve your study goals faster!

Summary - Class notes - Operating Systems

  • 1524175200 Chapter 1: Introduction

  • What is an operating system?
    A program that acts as an intermediary between a user of a computer and the computer hardware
  • What are 3 goals of an operating system?
    1. Execute user programs and make solving user problems easier
    2. Make the computer system convenient to use
    3. Use the computer hardware in an efficient manner 
  • Computer systems can be divided into 4 parts - what are these parts?
    1. Hardware - provides basic computing resources (CPU, memory, I/0 devices) 
    2. Operating system - controls and coordinates use of hardware among various applications and users
    3. Application programs - define the ways in which the system resources are used to solve the computer problems of the users (e.g. word processors, compilers, web browsers, database systems, video games)
    4. Users - people, machines, other computers
  • The one program running at all times on the computer is the kernal
  • What does the bootstrap program do?
    It helps the computer startup
    - BP is loaded at power-up or reboot
    - Typically stored in ROM  
    - Initialises all aspects of the system
    - Loads operating system kernal and starts execution
    - The bootstrap allows the sequence of programs to load in order to initiate the OS
  • I/O devices and the CPU can execute concurrently
  • How does a device controller inform the CPU that it is finished its operation?
    The device controller causes an interrupt 

    (each device controller is in charge of a particular device type)
    (there is a device driver for every device controller)

    IMPORTANT POINT: An interrupt will not wait for any other CPU routine to complete. It can be raised even in the middle of CPU execution
  • What is polling?
    The CPU periodically checks each device to see if it needs service
    - takes CPU time even when no requests pending
    - high latency: device must wait for polling interval 
         --> shortening polling interval leads to inefficiency, since system must spend a lot of time checking idle devices
    - polling can be efficient if events arrive frequently

    “Polling is like picking up your phone every few seconds to 
    see if you have a call. ...” 
  • What are interrupts?
    An interrupt is an event external to the currently executing process that causes a change in the normal flow of instruction execution, usually generated by hardware devices external to the CPU sometimes by software   

    How it works:
    -give each device a wire (interrupt line) that it can use to signal the processor
    - when interrupt signalled, the processor executes a routine called an interrupt handler to deal with the interrupt
    - no overhead when no requests pending

    “Polling is like picking up your phone every few seconds to see if you have a call. Interrupts are like waiting for the phone to ring.” 
  • What are common functions of interrupts?

    • Interrupt transfers control to the interrupt service routine (ISR) generally, through the interrupt vector, which contains the addresses of all the service routines
    • Interrupt architecture must save the address of the interrupted instruction
    • A trap or exception is a software-generated interrupt caused either by an error or a user request
    • Interrupts are handled much like calling a function in a programming language
    • Most operating systems are interrupt driven 
  • Flow when there is an interrupt:

    Main Program Flow --> ISR Vector Table --> Interrupt Service Routine (ISR) --> Main Program Flow
  • What is the main memory and what are its characteristics?
    Main memory - storage media that the CPU can access directly
    • Random access 
    • Typically volatile (loses its content when power is turned off)
    • Usually too small to store all needed programs and data permanently 
  • What is secondary storage?
    Extension of main memory that provides large nonvolatile storage capacity
  • What are hard disks?
    Rigid metal or glass platters covered with magnetic recording material

    - disk surface is logically divided into tracks, which are subdivided into sectors   
    - the disk controller determines the logical interaction between the device and the computer
  • What are solid-state disks (SSDs)
    - Faster than hard disks 
    - nonvolatile 

    - there are no moving parts involved
  • What is a cache?
    A place to store something temporally in a computing environment
    - information in use is copied from slower to faster storage temporarily
  • Why is caching used?
    To improve application performance by using a memory with shorter data access time and reduced latency
  • What is the direct memory access used for?
    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 
  • What is a single-processor system?

    • ●  One general-purpose processor and
    • ●  Several special-purpose processors (controllers) 
  • What are 3 advantages of multi-processor systems?

    1. Increased throughput
    2. Decreased cost
    3. Increased reliability – graceful degradation or fault tolerance 
  • What are the 2 types of multiprocessing?

    1. Asymmetric Multiprocessing – each processor is assigned a
      specific task following a boss-worker relationship
    2. Symmetric Multiprocessing – each processor performs all tasks 
  • What is a multicore processor?

    A dual-core design

    Chassis containing multiple separate systems plugged into the same socket 
  • What are clustered systems?

    ■ Like multiprocessor systems, but multiple systems working together
    • Usually sharing storage via a storage-area network (SAN)
    • Provides a high-availability service which survives failures
      Asymmetric clustering has one machine in hot-standby mode - Symmetric clustering has multiple nodes running applications,
      monitoring each other
    • Some clusters are for high-performance computing (HPC)
      - Applications must be written to use parallelization
    • Some have distributed lock manager (DLM) to avoid conflicting operations 
  • What are Beowulf clusters

    • A Beowulf cluster is a computer cluster of what are normally identical, computers networked into a small local area network with libraries and programs installed which allow processing to be shared among them.
    • The result is a high-performance parallel computing cluster from inexpensive personal computer hardware. 
  • What is multiprogramming, what is it also known as, and what is it needed for?

    Multiprogramming (batch system)
    • Single user cannot keep CPU and I/O devices busy at all times
    • Multiprogramming organises jobs (code and data) 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 (for I/O for example), OS switches to another job 

    Multiprogramming is needed for efficiency 
  • What is multitasking and what is it also known as?
    Multitasking (timesharing)
    -> is a logical extension in which the CPU switches jobs so frequently that users can interact with each job while it's running, creating interactive computing 

    - response time should be < 1 second
    - each user has at least one program executing in memory (process)   
    - 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
    - Virtual memory allows executing of processes not completely in memory
  • What is dual-mode? And what are the components?
    Allows OS to protect itself and other system components

    • User mode and kernel mode (supervisor, system, privileged mode)
    • Mode bit provided by hardware
    - proves ability to distinguish when system is running user code or kernel code
    - some instructions designated as privilege only executable in kernel mode
    - system call changes mode to kernel, return from call resets it to users
  • What is a process?
    A program in execution

    Program is passive entity; process is an active entity 
  • Typically a system has many processes, some user, some operating system running concurrently on one or more CPUs
    (concurrently by multiplexing the CPUs among the processes)
  • Which activities is the operating system responsible for in connection with process management?
    • Creating an deleting both user and system processes
    • Suspending and resuming processes
    • Providing mechanisms for process synchronisation 
    • Providing mechanisms for process communication
    • Providing mechanisms for deadlock handling
  • To execute a program all (or part) of the instructions must be in memory
  • Memory management determines...
    ...what is in memory and when optimising CPU utilisation and computer response to users
  • What are 3 memory management activities?
    1. Keeping track of which parts of memory are currently being used and by whom
    2. Deciding which processes and data to move into and out of memory
    3. Allocating and deallocating memory spaces as needed
Read the full summary
This summary. +380.000 other summaries. A unique study tool. A rehearsal system for this summary. Studycoaching with videos.

Latest added flashcards

What does the short-term scheduler (CPU scheduler) do?
It selects from among the processes in ready queue and allocates the CPU to one of them
How do named pipes work?

  • Named Pipes are more powerful than ordinary pipes
  • Communication is bidirectional
  • No parent-child relationship is necessary between the communicating processes
  • Several processes can use the named pipe for communication 
How do ordinary pipes work?

  • Producer writes to one end (the write-end of the pipe)
  • Consumer reads from the other end (the read-end of the pipe)
  • Ordinary pipes are therefore unidirectional
  • Require parent-child relationship between communicating processes 
What are the 2 types of pipes?
  1. Ordinary pipes - cannot be accessed from outside the process that created it. Typically, a parent process creates a pipe and uses it to communicate with a child process that it created
  2. Named pipes - can be accessed without a parent child relationship
What are pipes?
A channel that processes can use to communicate
What are stubs?
Part of RPCs

- The client-side stub locates the server and marshalls the parameters
- The server-side stub receives this message, unpacks the marshalled parameters, and informs the procedure on the server
What are remote procedure calls (RPC)?
A protocol/method that abstracts procedure calls between process on networked systems
- again uses ports for service differentiation

Uses stubs
What does the special IP address refer to?
This refers to the local host - i.e. the system on which the process is running
What is a socket?
One end point of a two-way communication link between two programs running on the network

Each socket is defined by the IP address of the machine (host) and a port number – a number included at start of message packet to differentiate network services on a host 

For example: 

  • The socket refers to port 1625 on host 

Communication consists between a pair of sockets 
What are 3 strategies in for communication in client-server systems?
  1. Sockets
  2. Remote Procedure Calls
  3. Pipes