1.2 Software

Cards (94)

  • What is an interrupt
    An external event that causes a change in the flow of instruction execution
  • How are interrupts found and checked

    The CPU checks the interrupt line after every instruction is executed
  • What happens if an interrupt is raised
    CPU suspends execution of current instruction
    Moves all contents of the PC to the system stack
    Calls ISR (interrupt service routine) to deal with the interrupt
  • Facets of the operating system
    User Interface
    Security
    Memory management
    Network management
    Device management
    Utilities
    Interrupts
    Scheduling
    File management
  • What is memory management used for
    To share the RAM between different processes to complete at the same time
    To reallocate memory where needed
    To handle virtual memory
    To optimise use of memory (paging and segmentation)
  • What is paging
    Dividing RAM into fixed size blocks (frames)
    Programs are divided into fixed size pages
    Any page can fit into any frame
    A page table allocates pages to frames
  • Benefits/detriments of paging
    Easy to swap pages between frames
    If page size is not same as frame size, waste of storage known as internal fragmentation
  • What is segmentation
    Programs broken into varying sized blocks called segments, which is a logical division of the program
    A segment table maps segments to memory locations
  • Benefits/detriments of segmentation
    No internal fragmentation
    Slower than paging due to logical placements
    Segments are not suited well for swapping
    Need to know beginning and end of segment
  • What is virtual memory
    A section of secondary storage the OS uses as RAM
    Pages/Segments that have not been used recently are swapped to virtual memory
  • What is disk thrashing
    A problem that can occur with virtual memory
    If pages and segments are being constantly swapped back and forth it is known as thrashing
    Makes computer feel very slow as secondary storage is slower than RAM
  • What is a device driver
    Software that provides a bridge between the OS and the hardware so they can communicate
    Drivers are OS and hardware specific
  • What is utility software
    Programs designed to help, analyse, configure, optimise or maintain a computer
  • List of utilities
    Anti-virus
    Anti-malware
    Disk defragmenter
    Disk clean-up
    Compression
    Firewalls
    Backups
  • Types of scheduling
    Round robin
    First come First Served
    Multi-level feedback queues
    Shortest job first
    Shortest remaining time
  • What are the benefits of scheduling
    Improves efficiency (many jobs done quicker)
    Maximise processor utilisation
    Allocate time fairly
    Minimise process starvation
    Eliminates deadlock
  • Pros and cons of first come first served (scheduling)
    Pros:
    Easy to implement
    No swapping so no overhead
    Cons:
    A more important process may have to wait for a less important one (could crash)
    Quick jobs may have to wait for long jobs
    Average waiting time may be long and is quite volatile
  • Pros and cons of round robin(scheduling)

    Pros:
    Avoids process starvation
    Cons:
    Can be inefficient if the process is waiting for an input or output
    Overhead from swapping
    Performance is heavily based on time-slice selected
  • How does round robin work (scheduling)
    Each task is designated a certain time-slice
    If not completed in that time it is paused and sent to the back of the queue
  • Pros and cons of shortest job first (scheduling)
    Pros:
    Optimal as gives the shortest average waiting time of all scheduling types
    Cons:
    Uses guesstimates to decide job length
    Longer jobs never get executed if shorter jobs keep coming in
  • How does shortest remaining time work (scheduling)
    Process with shortest remaining time takes priority
    Time left is evaluated at the end of every time-slice which causes pauses
  • How do multi-level feedback queues work (scheduling)
    Number of queues each with different level of priority
    All processes start in top priority queue
    If a process uses its time allotment it is reduced a priority
    (to prevent processor starvation, after a certain amount of time all processes are increased a priority)
  • Pros and cons of multi-level feedback queues (scheduling)
    Pros:
    A process that waits too long will be moved up a priority
    No prior knowledge of processes is needed
    Makes progress for long-running processes
    Cons:
    Moving processes between queues creates overheads
    Lots of variation in variables (How many queues, how large a time-slice)
  • What is a Multi-tasking OS
    An OS where multiple processes can run on a single computer seemingly simultaneously
    Processor allots certain number of cycles to a process then switches
    Scheduling CPU time is necessary
  • What is a multi-user OS
    Multiple users to utilise a computers resources at the same time
    Specially designed for sharing resources such as files and hardware
    Economical but have to share resources
  • What is a real-time OS
    Designed to carry out action in a guaranteed amount of time
    The right answer too late is wrong
    Time critical safety systems run on this OS
    Low multitasking capabilities
  • What is an embedded OS
    Operating systems built into different devices (washing machine)
    Limited functionality and reside in ROM
    Used to run efficiently on low powered CPUs
    Small size and cheap to code
    Not easy to update
  • What is a distributed OS
    A collection of independent networked nodes that acct as if they were a single system
    Pros:
    Reduces the load on a single computer
    If a single node fails the others remain operational
    Cons:
    Security issues
    Overloading
    More difficult to administer many machines
  • What is a virtual machine
    A self-contained operating environment that acts as if it is a separate computer
    Can run intermediate code or simulate a different OS
  • Pros of a virtual machine
    Provides access to programs no longer supported
    Can use a different OS without having to use a separate computer
    App testing for different platforms
    Can use one large server for many different buisnesses
  • Cons of a virtual machine
    Requires substantial processing power and memory
    Sharing resource can degrade performance of virtual and real machine
    Need antivirus for virtual machine
  • What is bytecode
    Bytecode is platform independent
    If you write bytecode once you can run it anywhere
    Different languages can be compiled into java bytecode
    Can crash a virtual machine with faulty bytecode and the host computer will be fine
  • What is bespoke software
    Software specially developed to suit the needs of the particular organisation
  • What is closed source software
    Software that legally remains the property of the organisation or person who created it
  • What is open source software
    The program's source code is freely available to edit by anyone
  • What is system software
    Programs created to run the hardware or applications programs of the computer
  • What is application software
    Programs designed for users rather than computers
  • What is general purpose software
    Programs not made for a specific job and tend to do more than one task (word-processor, spreadsheet)
  • What is special purpose software
    Software that has a specific purpose and usually completes a single task (CAD, calculator)
  • Pros of open source
    Source code can be compiled to work on different platforms
    Potentially a community of developers to keep improving code
    Potentially a community to learn from
    Potentially less vulnerabilities as lots of people can view source code