1.2.1 - Systems Software Flashcards
What is the primary purpose of an operating system?
To manage the hardware and provide a user interface.
What other tasks are operating systems in charge of?
- File management
- Memory management
- Device drivers
- Multiple users
- Interrupt handling
- Application software.
What is multitasking?
When more than one program is currently running.
This means that the operating system has to allocate time for each program and quickly cycles between each program, so quickly that it appears as the programs are running at the same time.
How does the user interface provided by the OS work?
The user interface is made up of interactable Windows, Icons, Menus and Pointers (WIMP) which allow the user to interact with the operating system and carry out any task.
What are the main differences between paging and segmentation in main memory?
Paging: Pages are all equal size and programs can be made up of multiple of these pages. Pages are PHYSICAL divisions of main memory.
Segmentation: Segments are different sizes and are complete sections of programs. They are LOGICAL divisions in main memory so if a program is too big to fit into one space, it can be divided into parts and placed in the available slots.
How does virtual memory work?
- If main memory is full, program B is loaded into secondary storage and when needed, program A in main memory that is not being used right now is replaced by the program B which was in secondary storage.
- Remember that since it takes time to move the programs from main memory to secondary and back, using virtual memory can significantly decrease performance!
-Needs free secondary storage
How are interrupts handled?
When the CPU fetches decodes and executes, after executing it checks for interrupts as well. When an interrupt is raised by the CPU, the processor must stop what it is doing in order to deal with this problem so the interrupt service routine is run.
What is the interrupt service routine?
It is a set of instructions that need to be followed in order to carry out the interrupt’s instructions. This means that the program counter must be changed to the address of the instructions in the interrupt.
What happens when the interrupt is complete?
When an interrupt is received, the values held in the registers are copied onto a stack for later use and when the interrupt is complete, the values are popped out of the stack to be used and to continue executing the program which was stopped in order to deal with the interrupt.
What are examples of interrupts?
- Input by the user such as keyboard and mouse input
- Errors such as overflow and instruction failure
- Power button is pressed
What is scheduling?
This is a method used by multitasking operating systems in order to carry out multiple tasks “at the same time”.
How does scheduling work?
A scheduler manages what programs to execute next and for how long. This scheduler uses a ready queue where programs and instructions line up to be executed by the CPU.
Scheduling - First Come First Serve
Processed are executed in the order in which they arrive and for as long as they need so the programs further back in the queue will have to wait longer for the ones in front to finish executing.
Scheduling - Shortest Job First
Processes are queued in order of shortest time. Processes that take the shortest time are placed at the front and processes which take the longest are placed at the back.
Scheduling - Round Robin
Every process is given a time slice (or quantum) so each process has the same time in the CPU and if the process needs longer, it is placed to wait at the back of the queue.