16.1 Purposes of a Operating System Flashcards
How does an OS maximize the use of resources?
- the OS uses scheduling to allow better utilisation of CPU time and resources.
- the direct memory access (DMA) controller frees up the CPU and allows it to carry out other tasks while the slower I/O operations are taking place.
How does the OS hide the complexity of the hardware from the user?
- using GUI interfaces rather than CLI
- using device drivers
- carrying out background utilities, such as automatic virus scanning.
Multi-tasking
- Managing the execution of many programs that appear to run at the same time.
- Allows computer to carry out more than one process at the same time.
Why is process scheduling needed?
- Allow multiprogramming
- give each process a fair share of CPU time.
- Highest priority jobs can be executed first.
- Keep CPU busy all the time.
Running to Ready
- TIme slice completed, interrupt occurs and process is moved to the READY queue.
Ready to Running
- process turn to use processor, scheduler allocates CPU time to process.
Running to Blocked
- the process carries out a I/O operation. Scheduler places it into the blocked queue.
Blocked to Ready.
An I/O operation is ready to be completerd by the process.
Paging
Reading/writing same size blocks of data to/from secondary storage when required.
Interrupt handling
Transfering control to another routine when a service is required.
Scheduling
Managing the processes running on the CPU.
Virtual Memory
Using secondary storage to simulate additional main memory so CPU can access more memory space than available RAM.
Difference between paging and segmentation
- Paging uses fixed size block of memory, segmentation uses variable.
- Paging as more risk of internal fragmentation.
- Process of paging is essentially invisible to user.
How is paging used to manage virtual memory?
- Divide virtual memory into blocks of same size called pages.
- Divide RAM into frames
- both fixed size
- When a process is executed, a page table is used to translate logical to physical addresses.
How is segmentation used to manage virtual memory?
- logical address space broken up into variable size blocks called segments.
- Each segment has a name and size
- Segments from logical memory are loaded into physcial memory using a segment map table.