CHAPTER : SYSTEM SOFTWARE Flashcards
Purpose of an Operating System
- OS provides an environment on which application software can be executed
- allows software to communicate with the hardware
- required to manage the computer system
- manages memory usage
- provides filing system
Key Manageemnt Tasks of the OS
- provides means of communication (UI) between the user and the computer
- manages the physical resources like processors, HDD,input/output etc.
- provides a platform where the applications can run
- controls access, allows to making passwords to restrict and control access rights
- provides utility software like diskformatter, automatic updates etc. that carry out tasks that are necessary for the computer to run
- file management: allows user files to be managed using folders
What is a benefit of the User Interface
- it hides the complexities of the computer’s OS from the user
- complex commands involving memory locations are avoided
eg: clicking on icons directly as oppose to writing the code to open a software
Process Control Block
complex data structure containing all relevant data to execute process
Process State: READY
- new process has arrived at the memory, PCB created capable of using processor but has to wait
Process State: RUNNING
- process currently usin the Processor (has CPU access)
Process State: Blocked/Suspended
cannot progress to use the processor as:
- doesn’t have enough resources to execute the instruction
- waiting from some signal from another process
Running state –> Ready state
- when time slice of the current running process expires and another process of higher priority os on the ready queue, running process is pre-empted
Multitasking
- managing the execution of many programs that appear to be running simultaneously
Why does the OS needs to schedule
- it allows for multitasking
- ensures there is fair usage of the processors, peripherals and memory
- ensure the higher priority tasks are executed sooner
- ensure all processors have a chance to finish the process they are on
Low - Level Scheduling : Pre-Emptive
- will stop the process that would have otherwise continued to execute
Low - Level Scheduling : First Come First Served
- non preemptive
- FIFO
Low - Level Scheduling : Round Robin
- allocates time slice to each process
- preemptive and can be FIFO
- doesn’t prioritse
Low - Level Scheduling : Priority Based
- most complex
- priority reevaluated on queue change
- priority calculation requires computation
Low - Level Scheduling : Shortest Job First
Low - Level Scheduling : Shortest Remaining Time
- process with the shortest run time
- shortest estimate run time
What is a Kernel
- acts as a low level interrupt handler
Tasks of Kernel
- load/unload applicaiton from memory
- schedule tasks for efficient run on CPU
- memory management
- file storage to and from secondary storage
- file management
- data security
Interrupt
- signal seeking CPU attention and causes OS Kernel to invoke ISR
Interrupt Handling
- transferring control to another routine when service is required
Memory Allocation: Segmentation
- application divided into fixed size elements when program compiled
- loader calculates the number of segments the program requires
- programmers code a code to minimise the segments required
Memory Allocation: Paging
How paging is used to manage virtual memory
- the memory is split into frames
- the virtual memory is divided into blocks of the same size that are fixed
- and the page table is set up to translate between the logical and physical addresses
- swap pages into memory with new pages from disk when required
- keep track of all free frames
Page:
virtual memory divided into blocks of fixed sizeP
Page Frame
main memory divided into page frames (same size as pages)
Page Table
shows mapping of page to page frames
translates the logical addresses to physical addresses