System Software Flashcards
What is an Operating System
A collection of programs that work together to provide an interface between the user and computer
What are the Functions of the Operating System
- Memory management - paging, segmentation, virtual memory
- Resource management - scheduling
- Utility software - disk defragmenter, backup, formatting
- Security - firewall, passwords
- User interface - allows a person to interact with the computer
What are the Types of Memory Management
- Segmentation
- Pagination (paging)
Explain the benefit of memory management to the user
- Security - each process can only access it’s own memeory
- Multitasking - allows more than once program to run at a time
What is Paging
- Paging is when memory is split up into equal-sized sections known as pages
- Each program is then made up of a certain number of equally-sized pages
- If the computer runs out of main memory then the memory manager swaps the least used pages of main memory to virtual memory to free up space
- However different parts of a program may be on different pages meaning when a program runs to be run all the pages holding a part of that program must be moved back to main memory
What is Segmentation
- Segmentation is the splitting up of memory into logical sized divisions, known as segments, which vary in size
- These segments contain blocks of code such as conditional statements or loops
- If the computer runs out of main memory then the memory manager swaps less used segments of main memory to virtual memory to free up space
- If the less used segment is then required, then the memory manager needs to swap back its segments from virtual memory
Describe the Similarities and Differences between Pagination and Segmentation
Similarities -
- Both are a way of dividing memory
- Neither physically divide memory they are just a way of managing memory efficiently
- Both are managed by the memory manager
Differences -
- Paging is only used if virtual memory is needed but segmentation is always used
- A page is a fixed size but segmentation varies
- Pages are contiguous blocks of memory addresses whilst segments are not
What are the Possible Problems of Memory Management
- Disk thrashing - when pages/segments are being swapped too frequently between virtual memory and main memory so the computer ‘freezes’
- Stack overflow - when a computer program tries to use more memory space than the call stack has available
What is an interrupt
A signal generated by software or hardware to indicate to the processor that a process needs attention
In what order and where are interrupts stored
Interrupts are stored in order of their priority within an interrupt register
Where can an Interrupt Signal come from
- Software program - when an application program terminates or needs to requests certain services from the operating system
- Hardware interrupt - when a signal is sent due to the device drive or external drive
- Internal Clock Interrupt - when interrupts are triggered regularly by a timer, to indicate that it is the turn of the next process to have processor time (example of multitasking)
Explain the stages of the Interrupt Service Routine
- Interrupt register is checked at the end of each Fetch-Execute cycle
- If there is an interrupt that exists with higher priority than the current process, the current contents of the registers in the CPU are transferred into a stack
- The relevant interrupt service routine (ISR) is loaded into RAM and deals with the interrupt
- Interrupt register checked again. If interrupts are higher priority, the process is repeated,
- If there are no interrupts with a higher priority, the contents of the stack are popped and placed back into their registers
- The Fetch-Execute cycle renews as before
Describe the Different Types of Scheduling Alogrithms
- FCFS (First Come First Served) - jobs are processed in the order they arrive
- Round Robin - each job is given a limited time slice/quantum (time with the CPU) so if a job is not completed by the end of its time slice, it returns to the back of the queue
- Shortest Job First - the jobs are ordered according to the time required for completion, with the longest jobs being serviced at the end, the job with the smallest estimated time to finish is run next
- Shortest Time Remaining - the jobs are ordered according to completion time, jobs that arrive with a shorter completion time then the current job are dealt with first
- Multilevel Feedback Queue - different queues are created that uses different schedulling algorithms, each of which is ordered based on different priority and jobs can move between queues depending on their priority
Describe the Advantages and Disadvantages of each Scheduling Algorithm
FCFS (First Come First Served) -
- Advantages - straightforward to implement and will definitly complete
- Disadvantages - does not allocate processor time based on priority
Round Robin
- Advantages - ensures that every task is allocated processor time without a long wait
- Disadvantages - does not allocate processor time based on priority and does not scale well
Shortest Job First
- Advantages - suited to batch systems (shorter jobs are given preference)
- Disadvantages - requires the processor to know or calculate how long each job will take and this is not always possible and a risk of processor starvation if short jobs keep getting added
Shortest Time Remaining
- Advantages - suited to batch systems (shorter jobs are given preference)
- Disadvantages - requires the processor to know or calculate how long each job will take and this is not always possible and a risk of processor starvation if short jobs keep getting added
Multilevel Feedback Queue
- Advantages - allocate processor time based on priority
- Disadvantages - very hard to implement
What is processor starvation
When a particular process does not recieve enough processor time in order to be execute and be complete
What are the different types of operating systems
- Distributed
- Embedded
- Multi-Tasking
- Multi-User
- Real-time
Describe a distributed operating systems
An operating sysytem run across multiple devices , which means the load of a task is spread across multiple computer processors
Describe an embedded operating system
- An operating system built to perform a small range of specific tasks
- Created for a specific device
- Limited functionality and hard to update but consume less power than other types of OS
Describe a muti-tasking operating system
An operating system that enables user to carry out tasks simultaneously, time slicing is used to switch quickly between programs and applications in memory
Describe a multi-user operating system
An operating system where multiple users make use of one computer, a scheduling algorithm is used to allocate processor time fairly between jobs and prevent processor starvation.
Describe a real-time operating system
An operating system used in time-critical computer systems and designed to perform a task
What is BIOS
- The Basic Input Output System is the first program that runs when a computer system is switched on
- The Program Counter register points to the location of the BIOS upon each start-up of the computer
- The BIOS is responsible for running various key tests before the operating system is loaded into memory
What are the three functions of the BIOS
- Runs POST (Power-on self test) which ensures that all hardware (keyboards, disk drives) are correctly connected and functional
- Checks the CPU clock, memory and processor is operational
- Tests for external memory devices connected to the computer
What is a device driver and give examples
- Software that provides the instruction on how the hardware or operating system will communicate
- Examples include printer driver, web cam, graphics card