1.2.1 Systems software Flashcards
What is memory management?
● Main memory is often not large enough to store all of the programs being used.
● Paging, segmentation and virtual memory are techniques used by the operating system to ensure memory is shared effectively by programs.
What is paging?
● Memory is split up into equal-sized sections
known as pages.
● Pages are swapped between main memory
and the hard disk as needed
What is segmentation?
● Memory is split up into logical sized divisions,
called segments.
● Segments vary in size
● Segments represent the structure and logical
flow of the program.
What is Virtual Memory?
- A section of the hard drive acts as RAM when the space in main memory is insufficient to store programs being used.
- Sections of programs not currently being used are temporarily moved into virtual memory through paging.
- This frees up memory for other programs in RAM.
- The key issue with using these techniques is disk thrashing, when the computer ‘freezes’ due to pages being swapped too frequently between the hard disk and main memory.
What are Interrupts?
● Signals generated by software or hardware to indicate to the processor that a process needs attention.
● Interrupts have different priorities and this is considered when allocating processor time.
● They are stored within an abstract data structure called a priority queue in an interrupt register.
What are Operating Systems?
- A collection of programs that provide an interface between the user and computer
- Provide the following features: IFUMP SUR
Interupt management
File managment
User interface
Memory management
Peripheral management (input /output)
Security
Utility software
Resource management
What is the Interupt Service Routine (ISR)?
● Processor checks the interrupt register at the end of each Fetch-Decode-Execute
cycle.
● If there is an interrupt exists with a higher priority to 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.
○ A flag is set to signal the ISR has begun.
○ The flag is reset once the ISR has finished.
○ This process is repeated.
● If there are no interrupts with a higher priority to the current process
○ The contents of the stack are popped back into the registers
○ Fetch-Decode-Execute cycle resumes
What is scheduling?
● Operating system ensures all sections of programs being run (known as ‘jobs’) receive a fair amount of processing time using scheduling
What are the types of sceduling algorithms?
- Pre-emptive : Jobs are actively made to start and stop by the operating system.
- Non pre-emptive : Once a job is started, it is left alone until it is completed.
What are all the scheduling algorithms?
- Round robin
- First come first served
- Multilevel feedback queues
- Shortest job first
- Shortest remaining time
How does the round robin algorithm work?
- Each job is given a section of processor time - a time slice - within which it runs.
- Once each job in the queue has used its first time slice, they are given another slice of processor time until a job has been completed
- Completed jobs are removed from the queue.
What are the advantages and disadvantages of round robin?
- Advantages:
All jobs will eventually be attended to - Disadvantages:
Longer jobs will take a much longer time for completion
Round robin does not take into account job priority or urgency
How does the first come first served algorithm work?
- Jobs are processed in chronological order by which they entered the queue.
What are the advatages and disadvatages of the first come first serve algorithm?
- Advantages:
Straightforward to implement - Disadvantages:
Does not take into account job priority or urgency
How does the multilevel feedback queues algorithm work?
This makes use of multiple queues, each which is ordered based on a different priority.