1.2.1

Cards (31)

  • Operating system
    A collection of programs that work together to provide an interface between the user and computer
  • Operating systems
    • Enable the user to communicate with the computer and perform certain low-level tasks involving the management of computer memory and resources
    • Are essential in devices such as laptops, mobile phones and games consoles
  • Desktop operating systems
    • Windows
    • macOS
  • Mobile phone operating systems
    • iOS
    • Android
  • Features provided by operating systems
    • Memory management (paging, segmentation, virtual memory)
    • Resource management (scheduling)
    • File management (moving, editing, deleting files and folders)
    • Input/Output management (device drivers)
    • Interrupt management
    • Utility software (disk defragmenter, backup, formatting etc.)
    • Security (firewall)
    • User interface
  • Memory management
    Determining and allocating the length of processor time each task receives through the use of paging, segmentation and virtual memory
  • Paging
    Memory is split up into equal-sized sections known as pages, with programs being made up of a certain number of equally-sized pages. These can then be swapped between main memory and the hard disk as needed.
  • Segmentation
    The splitting up of memory into logical sized divisions, known as segments, which vary in size. These are representative of the structure and logical flow of the program, with segments being allocated to blocks of code such as conditional statements or loops.
  • Virtual memory
    Uses a section of the hard drive to act as RAM when the space in main memory is insufficient to store programs being used. Sections of programs that are not currently in use are temporarily moved into virtual memory through paging, freeing up memory for other programs in RAM.
  • The key issue with using paging, segmentation and virtual memory is disk thrashing, which occurs as a result of pages being swapped too frequently between the hard disk and main memory
  • Interrupts
    Signals generated by software or hardware to indicate to the processor that a process needs attention. Different types of interrupts have different priorities and how urgent they are must be taken into account by the operating system when allocating processor time.
  • Interrupt Service Routine
    1. The processor checks the contents of the interrupt register at the end of each Fetch-Decode-Execute cycle
    2. If an interrupt exists that is of a higher priority to the process being executed, the current contents of the special purpose registers in the CPU are temporarily transferred into a stack
    3. The processor then responds to the interrupt by loading the appropriate interrupt service routine (ISR) into RAM
    4. A flag is set to signal the ISR has begun
    5. Once the interrupt has been serviced, the flag is reset
    6. The interrupt queue is checked again for further interrupts of a higher priority to the process that was originally being executed
    7. If there are more interrupts to be serviced, the process is repeated until all priority interrupts have been serviced
    8. If there are no more interrupts or interrupts are of a lower priority to the current process, the contents of the stack are transferred back into the registers in memory
  • Scheduling
    Ensuring all sections of programs being run (known as 'jobs') receive a fair amount of processing time through the use of various scheduling algorithms
  • Scheduling algorithms
    • Pre-emptive (Multilevel Feedback Queues, Shortest Remaining Time, Round Robin)
    • Non pre-emptive (First Come First Served, Shortest Job First)
  • Round robin
    Each job is given a section of processor time - known as a time slice - within which it is allowed to execute. Once each job in the queue has used its first time slice, the operating system again grants each job an equal slice of processor time. This continues until a job has been completed, at which point it is removed from the queue.
  • First come first served
    Jobs are processed in chronological order by which they entered the queue.
  • Multilevel feedback queues
    Makes use of multiple queues, each which is ordered based on a different priority.
  • Shortest job first
    The queue storing jobs to be processed is ordered according to the time required for completion, with the longest jobs being serviced at the end.
  • Shortest remaining time
    The queue storing jobs to be processed is ordered according to the time left for completion, with the jobs with the least time to completion being serviced first.
  • Types of operating systems
    • Distributed
    • Embedded
    • Multi-tasking
    • Multi-user
    • Real Time
  • Distributed operating system
    A type of operating system which is run across multiple devices, allowing the load to be spread across multiple computer processors when a task is run.
  • Embedded operating system
    Built to perform a small range of specific tasks, this operating system is catered towards a specific device. They are limited in their functionality and hard to update although they consume significantly less power than other types of OS.
  • Multi-tasking operating system
    Enables the user to carry out tasks seemingly simultaneously through the use of time slicing to switch quickly between programs and applications in memory.
  • Multi-user operating system
    Multiple users make use of one computer, typically a supercomputer, within a multi-user system. Therefore a scheduling algorithm must be used to ensure processor time is shared fairly between jobs.
  • Real time operating system
    Commonly used in time-critical computer systems, a real time OS is designed to perform a task within a guaranteed time frame.
  • BIOS
    The first program that runs when a computer system is switched on, responsible for running various key tests before the operating system is loaded into memory.
  • BIOS checks
    • POST (Power-on self test) which ensures that all hardware (keyboards, disk drives) are correctly connected and functional
    • Checking the CPU clock, memory and processor is operational
    • Testing for external memory devices connected to the computer
  • Device drivers
    Computer programs provided by the operating system that allow the operating system to interact with hardware.
  • Virtual machine
    A theoretical computer that is a software implementation of a computer system, providing an environment with a translator for intermediate code to run.
  • Intermediate code
    Code that is halfway between machine code and object code, independent of the processor architecture so can be used across different machines and operating systems.
  • Uses of virtual machines
    • Creating a development environment for programmers to test programs on different operating systems
    • Protection from malware
    • Running incompatible software