1.2.1 Operating systems Flashcards
Operating systems
Define ‘kernel’
The kernel loads and unloads software into main memory
Operating systems
Define ‘driver’
Controls and communicates with hardwaere
Operating systems
Define ‘utilities’
Programs that perform background tasks
Operating systems
Define ‘user interface’
A way to allow users to interact with the computer system
Operating systems
Define ‘operating system’
Software which controls how a computer operates
Operating systems
Define ‘scheduling’
The process of assigning resources to tasks
Memory management
Describe the process of memory management
Ensuring programs cannot access each other’s data
Ensuring the RAM’s free space is being used efficiently
Memory management
What are the two methods of managing the space used in main memory?
Paging
Segmentation
Memory management
What is memory segmentation?
The allocation of segments of memory to a process, to allow it to run
Memory management
What sections are found within each segment during memory segmentation?
Stack segment
Free memory
Data segment
Code segment
Memory management
What is the role of the code segment?
Where the program instructions for the process reside
Memory management
What is the role of the data segment?
Memory space for the variables the program will use
Memory management
What is the role of the stack segment?
Stores the address of the line in the program the processor was on when it got interrupted by a subroutine
Memory management
What is the role of the free memory?
Available memory space put aside for the stack overflow
Memory management
What is virtual memory?
An area on the hard disk that has been marked as additional main memory, to increase the size of RAM temporarily
Memory management
How does the CPU access data held in virtual memory?
The memory manager swaps data between RAM and virtual memory for the CPU to access, as it can only reach data stored in RAM
Memory management
What is meant by ‘disk thrashing’?
When the hard disk is excessively used for virtual memory storage, and data is being transferred repeatedly between RAM and virtual memory
Memory management
What is a ‘page’?
A fixed sized area of memory
Memory management
How does the memory manager keep track of pages?
Each page has an associated number, kept track of in a page table
Memory management
What happens when RAM is getting full, in regards to memory being stored as pages?
The memory manager identifies less used pages and cuts them to virtual memory
Memory management
Describe what pagination is and when it is used
Pagination is the process of separating memory into pages
It is used when managing and using virtual memory
Memory management
What are the similarities between segmentation and pagination?
Both are a way of dividing up memory
Both are assigned and managed by the memory manager
Memory management
What are the differences between segmentation and pagination?
Segmentation is used to load and unload processes, whereas paging is used when swapping data to virtual memory
The size of a segment always varies, whereas a page is a fixed size
Memory management
What is a ‘memory leak’, and what can happen because of one?
A memory leak is when segments contained finished with processes aren’t remarked as free, and therefore prevent more data from being stored in memory
Due to a memory lea, the system can eventually run out of memory
Memory management
What is a ‘stack overflow’?
When the stack section in a segment has run out of free memory to expand into, causing the program to crash with a stack overflow error
Interrupts and scheduling
What is meant by ‘polling’?
The regular checking of devices or software to ensure it doesn’t have problems
Interrupts and scheduling
What is an advantage and disadvantage of polling?
Advantage:
Simple and predictable as it only occurs at specific points
Disadvantage:
Can be inefficient as it uses up CPU processing time
Interrupts and scheduling
What is meant by the term ‘interrupt’?
A signal for the CPU to stop what it is doing and carry out the interrupt task
Afterwards it will go back to what it was originally doing
Interrupts and scheduling
Explain the process for the CPU upon receiving an interrupt
- An interrupt arrives while the CPU is running its current program
- It comes with a priority label telling how important it is
- If it is more important than the current process, the CPU will jump to the task the interrupt is asking the CPU to carry out, an ISR (Interrupt Service Routine)
Interrupts and scheduling
What happens to the values in the registers when a higher priority interrupt comes in
All the values in the registers are copied to the stack segment whilst the CPU executes the ISR
After it is completed the stored values are loaded back into the registers
Interrupts and scheduling
What is context switching?
The moving of instructions from the current CPU operation to the ISR and back
Interrupts and scheduling
What are two problems caused by using interrupts?
Latency
Stack overflow
Interrupts and scheduling
Describe latency, in regards to interrupts
Latency is the delay between an input into the system and the desired output
This can be extended if the CPU keeps receiving interrupts
Interrupts and scheduling
Explain what an ISR is
Interrupt Service Routine
A software routine that hardware invokes in response to an interrupt
ISRs examine an interrupt and determine how to handle it
Interrupts and scheduling
What are 3 examples of interrupts, in priority order highest to lowest
Power fail interrupt
Clock interrupt
An I/O device sending a signal requesting service, or signaling the end of an I/O operation
Interrupts and scheduling
What is meant by the term ‘scheduling’?
The allocation of CPU processor time to all running programs
Interrupts and scheduling
What are 5 scheduler methods?
First Come, First Served
Round Robin
Shortest Job First
Shortest Time Remaining
Multi-Level Feedback Queue
Interrupts and scheduling
How does FCFS work?
First Come, First Served
All processes are put in a queue
Each is allowed to run to completion, before then loading the next one in the order they arrived
Interrupts and scheduling
What are the benefits to FCFS?
Simple to implement
Ensures that once a process starts it runs to completion in minimal time
Interrupts and scheduling
What are the drawbacks to FCFS?
Once one starts it prevents other jobs from being processed
Doesn’t account for priority
Doesn’t consider process lengths
Interrupts and scheduling
How does RR work?
Round Robin
All processes are held in a queue
Each one is given a set amount of time
If not completed the next one is loaded and the process joins the back of the queue
Interrups and scheduling
What are the benefits of RR?
Simple to implement
Good if all processes are a similar priority and size
Interrupts and scheduling
What are the drawbacks of RR?
Doesn’t account for the priority of a process
Doesn’t consider the process length
If the processes are different in priority and length it becomes inefficient
Interrupts and scheduling
How does SJF work?
Shortest Job First
Arranges processes in a queue with the shortest first
Length is considered in number of fetch-execute cycles required
Interrupts and scheduling
What are the benefits of SJF?
Ensures maximum number of jobs are completed
Ensures short jobs aren’t kept waiting
Minimises average time a process takes to complete
Interrupts and scheduling
What are the drawbacks of SJF?
Doesn’t account for priority
A long job will still be interrupted for a shorter job
Longer jobs might never complete if shorter jobs keep joining the queue
Interrupts and scheduling
How does STR work?
Shortest Time Remaining
Arranges processes in a queue with those with the least cycles remaining first
Interrupts and scheduling
What are the benefits of STR?
Allows shorter processes to be handled quickly
Ensures the maximum number of processes are completed in a given time, accounting for what has already happened
Interrupts and scheduling
What are the drawbacks of STR?
Doesn’t account for priority
Particularly long jobs might never be completed if shorter jobs keep joining the queue
Interrupts and scheduling
How does MLFQ work?
Multi-Level Feedback Queue
Contains multiple queues, each with a different priority level
Each individual queue is sorted by the of the other scheduling methods
The higher priority queue is completed first
Interrupts and scheduling
What are the benefits of MLFQ?
Makes use of priority
Ensures the higher priority processes run on time
Interrupts and scheduling
What are the drawbacks of MLFQ?
Complex to implement
Not efficient if all jobs have a similar priority
Low priority jobs may take a really long time to complete
Types of operating systems
What are 5 types of operating systems?
Distributed
Embedded
Multi-tasking
Multi-user
Real time
Types of operating systems
What is a distributed operating system?
The OS controls a number of computers, called a cluster, in order to undertake a single computer-intensive task
Types of operating systems
How does a distributed operating system work?
The OS controls many computers at the same time
Each node contains part of the overall operating system
The user is aware of only using one powerful machine
Types of operating systems
What are some examples of where a distributed operating system is used?
To render animations
Work on scientific / mathematics problems
Types of operating systems
What is an embedded operating system?
An OS contained in a computer which can be found within many types of electrical equipment, to control its operations
Types of operating systems
How does an embedded operating system work?
The hardware is designed to handle a specific task on a specific system, often performing actions in real time
Types of operating systems
What are some examples of where an embedded operating system would be used?
Cars
To control equipment
ATMs
Types of operating systems
How does a multi-tasking operating system work?
The OS appears to be multiple processors running at once
Types of operating systems
How does a multi-tasking operating system work?
The schedular manages the swapping of processes in and out of the CPU so they all run as close to simultaneously as possible
They all appear to be running at the same time to the user, allowing multiple programs to run at the same time
Types of operating systems
What is an example of where a multi-tasking operating system would be used?
On most personal computers
Types of operating systems
How does a multi-user operating system work?
It allows multiple users on different workstations to all access the same central computer, which contains the OS
Types of operating systems
How does a multi-user operating system work?
The OS divides up CPU processor time between each workstation
It therefore performs similarly to a multi-tasking OS, just with different users rather than different processes
Types of operating systems
What is an example of where a multi-user operating system would be used?
In automated checkouts connected to an office mainframe
Types of operating systems
How does a real time operating system work?
The OS is designed to handle input data within a specific time interval
Types of operating systems
How does a real time operating system work?
It is designed to be extremely reliable, precise and consistent
Handles inputted data in priority order, and outputs results within a guaranteed time
Types of operating systems
What are some example of where real time operating systems are used?
Factory production lines
Washing machines
Hospitals
Types of operating systems
What are the key features of a distributed operating system?
Contains many computers
Can process very intensive tasks
Example of parallel processing
Types of operating systems
What are the key features of an embedded operating system?
Is inside an electrical device
Performs a specific set of processes
Generally doesn’t multi-task
Types of operating systems
What are the key features of a multi-tasking system?
Appears to run concurrently
Continuously swapping tasks in and out of the CPU
Types of operating systems
What are the key features of a multi-user system?
One central mainframe with the OS installed
Many workstations connected to the central node, sharing the OS
Types of operating systems
What are the key features of a real time operating system?
Designed to handle things in determined time intervals
Used for functions requiring precision and consistency
Virtual machines
What is a virtual machine?
A software copy of a type of computer
It is created inside another computer
Virtual machines
What are the benefits of using a virtual machine to a non-programmer
Can run older applications no compatible with the current computer model
Can run multiple operating systems on the same computer
Easy to copy and backup
Can be used to inspect possible malware/viruses so the main computer isn’t affected
Virtual machines
What are the disadvantages of virtual machines to non-programmers?
Programs run less efficiently on a VM than on the original hardware
A proper license is still needed to run the OS and associated applications on the VM
The VM can’t use more resources than your computer actually has
Virtual machines
What is an advantage of virtual machines to programmers?
Programs and code are portable, as they can be run on any hardware that has the same type of VM, with always the same source code
Virtual machines
What is a disadvantage of virtual machines to programmers?
Some VMs can have different levels of security, compatibility or run speeds
Additionally, not all will have the latest protection software
BIOS
What is BIOS?
Basic Input / Output System
It is a system as part of the operating system, which handles the input and outputs of the computer
It is stored on the ROM chip and runs as part of the start-up sequence
BIOS
What is EEPROM?
Electrically Erasable and Programmable Read Only Memory
It is another name for the ROM chip
BIOS
What are the start-up sequence steps, up to the POST?
- Power supply fires up
- The first instruction on the BIOS chip is loaded along the control bus
- The RAM will be empty at this point
BIOS
What is the POST, performed during the start-up sequence?
Power On Self-Test, when BIOS checks:
- BIOS isn’t corrupted
- System chips are ok
- Processor is ok
- Memory is ok
- Keyboard is present
- Video display hardware present and ok
BIOS
What are the start-up sequence steps after POST?
- If any problems arose during the POST checks beeps are emitted to signal them
- Internal hardware is booted up, with instructions the hardware requires also getting run
- The MBR (Master Boot Recorder) is found on the hard disk, and tells the CPU where the OS is stored, and how memory is partitioned
- Then BIOS will search for the OS through the storage devices connected by the boot order (list of places to check)
- Finally, a boot file is run with all the user’s personal setup information