1.2 Software Flashcards
What does OS stand for?
Operating System
What is an OS?
A consistent platform for all software to run on, which manages the hardware, software, security and memory resources of a computer
What are examples of personal desktop PC OSs?
Microsoft Windows
Linux
MacOS
What are examples of mobile devices OSs?
Android
iOS
What are examples of server OSs?
Linux
Windows Server
What is layering?
When the user doesn’t need to worry about how application software interacts with the hardware, they just ned to know how to interact with the application software
Is an OS an example of layering?
Yes
What are three categories of OS functionality?
Hardware
User Interface (UI)
Security
What is hardware functionality?
Performs functionality to manage processes that need to be executed by the CPU
Deals with storing and retrieving data and using device drivers to communicate with I/O devices
What are some examples of hardware functionality?
Processor scheduling
Handling interrupts
Peripheral management
Memory management
Secondary storage management
How does the OS manage processes?
Determines order processes are passed to the CPU and amount of time a process will be allowed before switching to another
OS receives processing requests and sends them to the CPU when they need to be executed and tells the CPU when interrupt is received and pause the current process whilst interrupt completed
Why is processor management needed?
CPU needs to execute a large number of processes every second which need to be queued and sent to the processor in the correct order
What is an interrupt?
Signal sent to the processor to request immediate attention
How does the OS handle interrupts?
Determines if the current process should be paused for interrupt to be executed
If it is, OS stores current contents of registers and loads address of first instruction in ISR for interrupt to be dealt with
When interrupt completed, original process loaded and continued
How does the OS manage peripherals?
Manages I/O devices
Communicates with input devices using device drivers and sends data to correct part of computer
Takes data in memory or output from CPU and communicates with output devices using device drivers
How does the OS manage memory?
Records how memory in a computer is divided (paging/segmentation) to ensure data allocated fairly
Data needs to be loaded from HDD into RAM when in use and removed from RAM when no longer needed
Ensure enough space in memory to store data requried
Keeps track of where data stored
How does the OS manage secondary storage?
Ensures enough space to be able to store required data
Keeps track of where data stored so can be retrieved again
Keeps track of free space
What is a UI?
Way of the OS allowing the user to communicate with the device
Can take many forms, type depending on device being used and level of experience of user
What are some examples of an UI?
Graphical User Interface (GUI)
Natural Language Interface
Command Line (CLI)
What is a GUI?
Way of a user interacting with the device using a series of icons and images
Who is a GUI suitable for?
Novice users
What is a Natural Language Interface?
Where user can interact with a computer using their natural language
What is a CLI?
Method of users being able to interact with a computer where they need to know specific commands to perform actions
Quick if the user knows commands
Who is a CLI suitable for?
Skilled users as they need to know the specific commands
What is security functionality of an OS?
OS supports security of device by ensuring that resources are protected from unauthorised access through use of permissions and passwords
What are some examples of security?
Username and password
User access folders
Restricting access to files and folders
Encryption
Read only
What purpose do username and passwords have?
Ensures only users with suitable usernames and passwords can log into a device
What purpose do user access levels have?
Manages actions a user can perform depending on their user access levels
Determines if they can see folders, change settings, install software
How is access restricted to files and folders?
Password allocated to them, which means the contents are only viewable if the user knows the password
What purpose does encryption have?
Data on hard drive encrypted so if someone gained unauthorised access they wouldn’t be able to understand data stolen
What does setting files/folders to ‘read only’ read?
So user can view, but not edit, files
Enforced via password of user access levels
How does the OS manage network protocols?
Manages network transmission of data and protocols used within, including TCP/IP, HTTP(S), FTP
Establishes connection with device data is being sent to and agrees protocols with device
How does the OS load and run programs?
- Locate where program is stored
- Check if enough space in RAM
- Move required data from secondary storage to RAM
- Send interface to monitor
What are paging and segmentation?
2 techniques enabling OS to make optimum use of memory by splitting the memory into small sections and saving data in non-contiguous data locations
What are memory management operations?
Tracking status of memory allocation
Determining storage requirements
Controlling memory usage
How does the OS track the status of memory allocation?
Memory divided into physical address spaces
OS initially marks each space as free but, when required, OS loads data into spaces and marks them as allocated
When data or instructions are no longer needed, OS marks spaces as free again allowing data to be overwritten
How does the OS determine storage requirements?
Rare that data needed for a process can fit in a single memory locations
Determines how much memory to allocate to each process that’s running, based on requirements of its programming
Reserves blocks of addresses for each process to use
How does the OS control memory usage?
Manages swapping between processes and their memory space to provide memory access as required
Main memory is hardware resources with physical addresses used to locate areas in which data and instructions can be stored
When program executed, logical addresses produced and total of these logical addresses makes up logical address space of that process
Maps logical address space to physical address space and memory usage between processes
What is paging?
Data split up physically into equal size pages, not considering data it’s storing
What is segmentation?
Data split up logically into different size segments, considering data it’s storing
What is virtual memory?
Part of the hard drive which is allocated as an extension of RAM
How does the OS manage virtual memory?
Swaps data between virtual memory and RAM as required
What factors affect the division of processing time?
When task was requested
Importance of task
Length of task
What happens as a computer runs more processes?
Longer it takes for a process to be allocated processor time
Unsuitable for processes that must perform tasks almost immediately
What are the reasons a processor can be interrupted?
Hardware device has signalled it has data to process
Hardware device has completed a task it was asked to do
Software processor needs a service to be provided or OS function to be performed
Allotted amount of time expired and an action needs to be performed
Hardware failure occurred and needs to be addressed
What does ISR stand for?
Interrupt Service Routine
What is an ISR?
Mini program that’s been designed to respond to an interrupt’s request
Can be built into an OS or provided via device driver
What are the stages of an interrupt?
- Processor receives the interrupt
- Processor completes the FDE cycle of instruction that was running when it received interrupt
- Current contents to processor registers (including PC) saved to memory
- Origin of interrupt identified so that appropriate ISR called
- All other lower-priority interrupts put on hold to allow ISR to finish running
- PC updated with address of first instruction of ISR
- ISR completes its execution
- Processor registers reloaded with values saved to memory
- Lower-priority interrupts that were put on hold re-established
- PC set to point to address of next instruction that needs to executed in program that the processor was running when it received interrupt
Rank types of interrupt from highest to lowest
- Hardware commands
- Program/software
- Timer
- Input/output devices
What are hardware commands/interrupts?
Shutdown to start triggered by user pressing off button
Memory parity error (data loaded contains different value than when it was stored)
Internal clock triggers suspending proces
Reset button pressed
Power supply failure
Power-down command (screen off, hibernate)
How does hardware interrupts/commands work?
Send a physical signal to the CPU via the interrupt chip
What is a program/software interrupt?
Software detects an error has occurred and issues software interrupt for CPU to run some instructions to try and clear error
Illegal instruction encountered an interpreted code
Arithmetic overflow (result of calculation exceeds available storage)
What is a timer interrupt?
Data-logger has to read an input sensor every one second
Screen-recording application that has to read next screen update
What are I/O device interrupts?
Devices like the keyboard and mouse demand attention or inputs would never get a look in
Hard disk
Optical disk
Printer
Graphics tablet
What are scheduling algorithms?
For computer to switch tasks, OS must control suspension of process currently running and control subsequent continuation of another process
Current process suspended and saved into memory and then when CPU is ready to service it, state reloaded and process continued
Scheduling algorithms determines order OS will execute processes
What does a scheduler do?
Makes sure time allocated fairly to all processes
Maximises use of CPU and all hardware
Makes applications run as quickly as possible
What are examples of scheduling algorithms?
First Come First Served (FCFS)
Shortest Job First (SJF)
Shortest Remaining Time (SRT)
Multi-Level Feedback Queue (MLFQ)
Round Robin (RR)
What is starvation?
When a process cannot complete its execution because its constantly denied processor time
What is First Come, First Served?
First job to enter ready queue is the first in the running queue
Execute each process in its entirety?
Is FCFS pre-emptive?
No
What are the advantages of FCFS?
Simplest method to implement
Once a job starts, will definitely be completed
Should avoid starvation
What system does a FCFS work well in?
One that only has a few concurrent processes
What are the disadvantages of FCFS?
Can be a long wait before a process can run
What is Shortest Job First?
Process with the shortest/smallest running time is run next
When a process starts to be executed, it’s executed in its entirety
Jobs sorted in the ready queue according to estimated processor time needed
Is SJF pre-emptive?
No
What are the advantages of SJF?
Reduces wait times because shorter processes are removed quickly, meaning that the processor can allocate more jobs to longer times
What are the disadvantages of SJF?
Time estimation of a job could be wrong and this is what is used to determine which job first
Susceptible to starvation as if shorter jobs keep being added, scheduler will keep prioritising these jobs so longer processes won’t be serviced
What is Shortest Remaining Time?
Processor continuously reorders queue during run time
If a process added to the queue has a shorter amount of remaining time, interrupt is raised
Current process suspended in favour of the new one
Is SRT pre-emptive?
Yes
What are the advantages of SRT?
Short processes executed immediately which is useful for higher performance systems running many small concurrent processes
What are the disadvantages of SRT?
Starvation of long-running processes
What is the Multi-Level Feedback Queue?
Processor queue split into multiple queues with different priorities
Processor will execute all processes in highest priority queue first then move down the groups
If a process isn’t getting enough CPU time, will be moved to a higher priority queue
If a process is getting an unfair amount of CPU time, will be moved to a lower priority queue
Is MLFQ pre-emptive?
Yes
What are the advantages of MLFQ?
Eliminates starvation
Can manually flag processes as higher priority to guarantee execution
Processes can be executed very efficiently
What are the disadvantages of MLFQ?
More difficult to implement
What is Round Robin?
Each process is given a maximum length of processor time in the running state after which it’s put back into the ready queue
What are the time period allocated to the processes called?
Time slices
Is RR pre-emptive?
No
What are the advantages of RR?
Ensures every task is allocated processor time without a long wait
Eliminates starvation
What are the disadvantages of RR?
Doesn’t scale well as more processes run, the time slices get smaller
Urgent tasks less likely to be completed quickly
What are the different types of OS?
Distributed
Multi-task
Multi user
Embedded
Real time
What is a distributed OS?
Processing appears to be completed on a single computer
However, task split and processed on multiple devices acting as a single computer
Data shared between devices
What is an example of a distributed OS?
Creating weather satellite imagery
What is a multi-user OS?
Enables computer to perform multiple operations at once, or at least, what appears to be
What is an example of a multi-task OS?
Someone working on a home computer
What is a multi user OS?
Allows multiple users that are on different computers to access single system’s OS resources simultaneously
What is an example of a multi user OS?
School system
What is an embedded OS?
Found inside other devices
Has a dedicated function
What is an example of a embedded OS?
Washing machine / Satnav
What is a real time OS?
Ensures tasks are completed within an agreed period of time
What is an example of a real time OS?
Hospital
What does BIOS stand for?
Basic Input/Output System
Where is BIOS stored?
Non-volatile memory
When is BIOS available?
When the computer starts
What are the jobs of the BIOS?
Initialises and tests hardware in a computer system so it’s ready for use by other software on the computer (POST)
Loads bootloader program (bootstrap) from secondary storage
What does POST stand for?
Post-On Self-Test
What does the bootstrap do?
Starts initialisation of OS
What would happen without the BIOS?
Nothing could be loaded as main memory doesn’t contain any instructions that could start boot process
When do modern systems use BIOS?
Only use it during initial stages of booting up a computer because software design’s become so effective that there’s no need for separate programs to be involved, making process more efficient and easier to control
Where is BIOS stored now?
Used to be stored on non-volatile ROM chip
Now stored on flash memory systems because more convenient and easier to update software in-place
What does CMOS stand for?
Complementary Metal-Oxide Semiconductor
What is a CMOS memory circuit?
Has it’s own battery so it can maintain it’s data between restarts
Any configurable settings are stored on CMOS memory circuit
What is CMOS memory circuit used in?
Modern computer systems to keep track of key functions
What are the stages when a computer is booted up?
- Power turned on
- Only data from ROM can be used at this point
- POST is run, checks all parts that it needs to “come to life” are there and available
- Clears anything that may still be in the registers or the CPU
- Loads address of the first instruction in the boot program into the PC
- Control now passed to boot program that carries out its own checks on the hardware
- Checks for any BIOS on the hard disk or on a storage device called CMOS RAM
- Combines this with the basic BIOS stored on the ROM and then sent to RAM
- This file of information called the boot file
- Computer now ready to load OS
- OS normally found on hard disk but it will look at other locations first such as additional bootable device if told to do so by BIOS
- OS now takes control of the computer and the memory and will load jobs into memory for processing as per the scheduler
What are device drivers?
Small programs that are used to control a piece of hardware, providing an interface between OS and hardware
Where would you find device drivers?
When you install a new peripheral have to install drivers
May be on CD ROM, downloaded from internet or preloaded in OS
How do the OS and device drivers work together?
When OS receives a command (to print) passes this to device driver for that piece of hardware as the device driver knows how to communicate with this piece of hardware
What are the specific device driver functions called?
Routines
What is a virtual machine?
A host system running software that allows other software to behave as if it were running on a hardware system
Can be configured to replicate any combination of hardware so that software running on it acts as if it were accessing certain devices even if they don’t exist
What is virtualisation?
Many VMs running on a single host PC
What are some examples of roles of VMs?
Running alternative OSs
Supporting incompatible software
Creating a test system
Running multiple servers
How does a VM run alternative OSs?
Created to allow installation of one OS within another OS
Legacy OS or OS that wouldn’t normally be able to run on hardware host
VM can emulate different hardware setups so software runs as if running on different hardware platform
How does a VM support incompatible software?
Some older software might not run on newer systems
VM could emulate older system on which user can run older software
How does a VM create a test system?
VMs are closed, controlled environments
“Hardware” of VM only exists as self-contained software process that’s isolated from actual host system
Provides opportunity to run software that’s potentially damaging (malware, early versions of software that needs to be analysed)
How does a VM run multiple servers?
Servers on network are required to fulfil multiple roles
More than one server can run on a VM, allowing for separation of services without need for multiple pieces of hardware
What are some examples of VMs?
Emulators - allow for another system to be used on a PC
Windows VM - used to “make” a PC a MAC
Test environment - enables testing of a game on different systems
What is intermediate/byte code?
For all different programming languages, different version needs to compiled for each of the different machines it can be run on
Different languages partially compiled from source code into intermediate/byte code then run on VMs on same PC
What are the three types of software?
Operating System software
Utility software
Application software
What is OS software?
Manages hardware, software and memory resources of the computer
What are some examples of system (OS) software?
OS
Linux
iOS
macOS
What is application software?
Enables the user to perform tasks
What are some examples of application software?
Word processing software
Graphical editing software
Video editing software
Music production software
Spreadsheet software
Presentation software
Web development software
What is utility software?
Maintains, protects and improves performance of the computer
Analyses, diagnoses problems with and tries to fix parts of your system
How does utility software come?
Pre-installed as part of OS
What are some examples of system (utility) software?
Defragmentation
Decryption
Compression
Anti-virus
Anti-spyware
System info and diagnosis
Firewall
Disk formatting
What is compression software?
Used to both compress and decompress files on a computer
Decreases the amount of data inside of files
What are the reasons to compress files?
Increasing amount of available space on a secondary storage device (if each file takes up less space, have more available space, good for files used infrequently)
Sending files on a network (if file size smaller, less processing and less time required)
When sending a file with an email (restriction of file size that can be sent, ensures maximum file size isn’t reached)
What is defragmentation?
Recognises files on a hard drive
Groups together files so that related data is stored together
Why is defragging necessary?
When data is saved on a hard drive, may be split up if first available space doesn’t have enough memory to store all required data
How are files defragged?
Moves files to temporary empty space on the HDD
Groups together empty spaces on the HDD
Groups together related files
Replaces data on the HDD so all related data stored together
What is encryption?
Process of using an algorithm to convert plaintext into ciphertext
What is the utility software of encryption responsible for?
Applying encryption algorithms
Decrypting data using encryption key
When is encryption used?
Transferring data securely across a network to prevent it being read in case of interception
On files on a secondary storage device to prevent access to files in case of hacking or theft
What is malware?
Malicious software that’s been created with intention to cause damage to a computer