1.2.1 Systems Software Flashcards
What is the OS?
- A piece of software held in permanent storage that controls the software and hardware of the computer
- Acts as a bridge between the user and computer’s hardware as the user cannot communicate with the hardware directly
Why is the OS needed?
- Provides the interface between the user and the hardware
- Provides a platform in which users can run programs
What are utility programs?
- Some are built into the OS that help maintain the computer
- Encryption, Compression and Defragmentation software
Features of the OS: Multitasking
- When you more than one program opened and running at the same time
- Processor allocates a small amount of time to each process and cycles between them
Features of the OS: File management
- Data is stored in files and the extension of the filename tells the OS which application to load the file into
- Allows user to rename, delete, copy and move files
- Client-server network may impose a fixed/roaming profile and manage login requests to the network
Features of the OS: User management
- Allows users to log onto the same computer
- OS retains settings for each user as each user may have different access rights to files and programs
Features of the OS: User interface
- WIMP
- Visual
- Intuitive
- Optimised for touch and mouse gesture input
What is paging?
- Where memory is split into equal sized sections (pages)
- Physical divisions in which programs are split up to fit in a given number of pages
What is an advantage of paging?
- Allows memory to be allocated in a non-contiguous manner - pages of the same process don’t need to be stored together but can be allocated whenever there’s free space in memory
What is a disadvantage of paging?
- Inefficient: could separate instructions inside a looping condition and are in different pages
What is segmentation?
- Memory is spit into logical sized divisions known as segments, which are complete sections of programs and vary in size
What are the advantages of segmentation?
- Segments do not need to be stored continuously across a fixed address space
- Can be moved in and out of memory as required
What are the similarities between paging and segmentation?
- Both allow programs to run despite insufficient memory
- Stored on disk
- Both pages and segments are transferred into RAM when needed
What are the differences between paging and segmentation?
- Pages are fixed size, Segments vary in size
- Pages are made to fit sections of memory, segments are complete sections of programs
- Pages are physical divisions, segments are logical divisions
What is virtual memory?
- An allocated area of a hardware/secondary storage device which is used when there’s not enough physical RAM to store open programs
What is an advantage of virtual memory?
- Extends memory available: swapping instructions and data out of RAM into secondary storage means a vast quantity of memory is potentially available
What are the disadvantages of virtual memory?
- Accessing a secondary storage medium is slower than accessing RAM, may slow down performance
- Disk thrashing: When the computer ‘freezes’ due to pages/segments being swapped out too frequently between the hard disk and RAM
What is an interrupt?
- A way of signaling the processor when other devices and applications require attention
What is the Interrupt Service Routine (ISR)?
Program with a set of instructions that need to be fetched, decoded and executed in order to carry out the operations of the interrupt
Where can ISRs be found?
Built into the OS or provided via device drivers
Why may the processor be interrupted?
- Hardware device has signaled it has data to be processed
- Hardware failure has occurred and needs to be addressed
- Software process needs a service to be provided/ OS function needs to be performed
Are ISR priorities important?
Yes, interrupts always have a higher priority than normal programs
Examples of interrupts for hardware
- Power supply failure
- Power/reset button pressed
Examples of interrupts for the user
- Keyboard presses
- Tapping an icon to load a new program
Examples of interrupts for software
- Arithmetic overflow
- New log on request
Examples of interrupts for I/O devices
- Printer ink supply notification
- Buffer nearly empty
What is scheduling?
- Part of the OS that is responsible for managing the order of processes and how they will be managed to achieve multitasking
What does a scheduler manage?
- Which process to execute next
- The length of time the next process can execute for
How does the First Come, First Served scheduling algorithm work?
- Like a supermarket queue / first job is the first to enter the running state
- Processes are executed in the order they arrive
- If a process takes a long time, the others behind have to wait
- Not pre-emptive
How does the Shortest Job First scheduling algorithm work?
- Picks the process that takes the shortest amount of time and runs them until they finish
- Scheduler needs to know how long each process will take
- Not pre-emptive
How does the Round Robin scheduling algorithm work?
- Each process is allocated a fixed amount of time (quantum)
- If the process is not complete by the end of its time slice, it returns to the back of the ready queue
- Pre-emptive
How does the Shortest Remaining Time scheduling algorithm work?
- Ready queue is sorted by the estimated time to complete the process
- Processes that arrive with a shorter time to complete the current running process are moved to the running state
- Pre-emptive
How does the Multi-Level Feedback Queues scheduling algorithm work?
- Several ready queues are used, each with a different scheduling algorithm
- Jobs are able to move between queues as their priorities change
- Pre-emptive
What are the different types of operating systems?
- Distributed OS
- Embedded OS
- Multitasking OS
- Multiuser OS
- Real Time OS
What is the purpose of the distributed OS?
- You can combine the processing power of multiple computers across a network for a single task
- In distributed computing, the OS controls and co-ordinates the computers, presenting them to the user as if they were a single system
What is the purpose of the embedded OS?
- Specialised OS with limited resources and functionality, built in to control a single machine
- Tend to run on dedicated hardware so they run with maximum efficiency, using low-powered processors
What is the purpose of the multitasking OS?
- Each active program is scheduled to receive a tiny time slice in quick rotation, giving the impression they are operating at the same time
What is the purpose of the multiuser OS?
- Provides the facilities for multiple users to access the same system
- Controls the consumption of resources so users can access the system at the same time, without affecting other users
What is the purpose of the Real Time OS?
- Processes are guaranteed to executed during a known time frame
- Processes in real time OS rarely run at capacity
What is the BIOS (Basic Input Output System?
- Responsible for loading the OS when the computer first turns on
- Checks all hardware it needs is connected and working using a Power On Self Test
What is the purpose of the boot loader program (bootstrap)?
- Used to load the OS kernel into memory
What would happen without the BIOS?
- Nothing could be loaded as RAM doesn’t contain any instructions that could start the boot program
Where are the BIOS settings stored?
- In flash memory so they can be changed and are retained when power is turned off
What is a device driver?
- Software that tells the OS how to communicate with a device
- Translates the OS instructions into a series of instructions that a specific piece of hardware will understand
What is a virtual machine?
- Program that has the same functionality as a physical computer
What is an emulator?
A hardware or software that enables one computer system (host) to behave like another computer system (guest)
What is intermediate code?
Code partly translated between high level and machine language produced by a compiler
State some uses of virtual machines
- Creating a test system
- Running software compatible with different versions and types of OS
- Running multiple servers
How is intermediate code executed?
- At run time, the og program is translated to IC which is passed to the VM
- Using the VM as an intermediary between the system and source code allows the same code to be used on any program that can run the VM
What is the purpose of the real time OS?
- An OS where data is processed as it comes, with responses generated with a guaranteed timeframe
- Used in safety critical environments, e.g. autopilot, hospitals