1.2.1. Systems Software (Chp 3) Flashcards
Operating Systems
The terms refers to a collections of programs that work together to provide an interface between the user and computer.
- enables the user to communicate with the computer and perform certain low-level tasks involving the management of memory and resources.
- provides user interface between the user and hardware
- provides a platform in which applications can run.
OS features
-memory management (paging, segmentation, VM)
-resource management(scheduling)
-File management
Input/output management (device drivers)
-Interrupt management
-Utility software (disk defragmenter, backup)
-security
-user interface
Memory management
- computer memory must be shared fairly between multiple programs and applications being used. One of the roles of the OS is to determine and allocate the length of processor time each task receives through the use of paging, segmentation and VM
Paging
when memory is split up into equal-sized sections known as pages, with programs being made up of a certain number of equally-sized pages. These can then be swapped between main memory and the HD as needed.
Pages are physical divisions, equal sizes, made to fit memory.
Segmentation
splitting up the memory into logical sized divisions known as segments, which vary in size.
These are representative of the structure and logical flow of the programs.
Segments are logical divisions, different sizes, complete sections of programs
Similarities between paging and segmentation
-both allow programs to run despite insufficient memory
pages and segments are stored on a disk
pages and segments are transferred into memory when needed.
Virtual Memory
VM uses a section of the hard drive to act as RAM when the space in main memory is insufficient to store programs being used.
Sections of programs that aren’t currently in use are temporarily moves into virtual memory through paging freeing up memory for other programs.
Key issue with VM, paging and segmentation
Disk thrashing - when the computer freezes and occurs as a result of pages being swapped too frequently between the HD and main memory. As a result more time is spent transferring the pages than is spent actually running the programs.
The issue becomes progressively worse as VM is filled up. If this continues programs will likely lock up and not run.
Improved by updating OS or getting more RAM
What is an Interrupt?
Interrupts are signals sent through the control bus to indicate to the processor that a process needs attention.
Stored in order of their priority in a priority queue located in a special register called an interrupt register.
Interrupt Service Routine (ISR)
- The processor checks the contents of the interrupt register at the end of each FDE cycle.
- If an interrupt exists of a higher priority than the process being executed, the current contents of the special purpose registers in the CPU are temporarily transferred into a stack.
- A flag is sent to signal that the ISR has begun
- Once interrupt serviced, flag is reset.
- The Interrupt queue is checked again. If there are more interrupts of a higher priority, the ISR is repeated until all interrupts of higher priority have been serviced.
- If there are no more, the contents of the stack are transferred back into the registers in memory.
- The FDE cycle resumes as before.
What is Round Robin (scheduling)
Each job is given an equal section of processor time - known as a time slice - within which it s allowed to execute. Once each job has used its first time slice, the OS again grants each job a time slice. This continues until a job has been completed at which point it is removed from the queue.
Round Robin disadvantages
- longer jobs will take a much longer time for completion due to their execution being inefficiently split.
- This doesn’t take into account of priorities.
What is First Come First Served
Jobs are processed in chronological order by which they entered the queue.
Disadvantages of First Come First Served
Although this is straight forward to implement, it doesn’t take into account priority.
Multi-level Feedback queues
Makes use of multiple queues which is ordered based on priority