1.2.1 Systems Software
No description yet. This curated deck is ready for daily study.
Card preview (24)
Operating system
• a collection of programs that provide an interface between the user and computer
Functions of the OS
• provides a user interface [1] • manages/controls hardware [1] • provides a platform for software to run [1] • handles interrupts [1] • provides security [1] • provides utilities for system maintenance [1] • input/output management (device drivers) • file management (moving editing deleting files and folders) • resource management (scheduling) • memory management (paging segmentation and virtual memory)
Utilities
• software program with a specific function linked to the maintenance of the OS [1] • file encryption : encodes files before transfer allowing users to send files over networks securely • file compression : reduces file size to take up less storage space or for faster transfer over a network [1] • disk defragmentation : physically reorganises files on a hard disk so they can be found and accessed faster [1] • backup software : creates system snapshots and will restore them on demand /makes regular copies of files In case of loss [1] • disk clean up: scans the Hard disk for duplicate or corrupted files and removes them freeing up hard disk space
Memory management
• is a fundamental role of the OS • deals with the allocation and deallocation of RAM to ensure RAM is used efficiently and not wasted [1] • benefit : enables multitasking allowing multiple programs to run at once [1]
Memory management techniques
• paging • segmentation • virtual memory
Paging
• main memory is split into fixed sizes sections called pages [1] • uses physical divisions • pages are swapped between main memory and hard disk as needed
Paging benefits + drawbacks
• benefits : facilitates efficient memory management and enable use of virtual memory • programs/data can be held in non contiguous memory locations [1] • to avoid having to move content around to fit in new programs • drawbacks : can lead to internal fragmentation (pockets of wasted space within pages) • unused space in pages is wasteful as other unrelated data cannot be stored on this page
Segmentation
• divides main memory into logical sized divisions called segments which can vary in size [1] • are complete sections of programs • segments represent the structure and logical flow of the program • eg. In a video editing application different segments may be created for video data, audio data, effects and UI elements
Segmentation advantages + disadvantages
• benefits : is space efficient due to only allocating space depending on the amount an application needs • drawbacks : can result in external fragmentation [1]
PAGING VS SEGMENTATION similarities
• both allow programs to run despite insuffienct memory [1] • both are ways of splitting up memory [1] • both allow programs to be stored non continuously in memory [1] • both pages and segments use virtual memory (are stored on a disk) [1] • both pages and segments are transferred into memory when needed [1]
PAGING VS SEGMENTATION differences
• paging uses fixed sized memory blocks , segmentation uses variable length memory block [1] • paging uses physical divisions, segmentation use logical divisions [1] • pages are made to fit sections of memory , segments are complete sections of programs
Virtual memory
• virtual memory is a section of hardrive/secondary storage device [1] • when memory intensive applications exceed available RAM • the OS moves less frequently accessed pages to virtual memory [1] • this frees up space for other programs in RAM [1] • pages are transferred back into RAM from virtual memory as needed [1]
Virtual memory advantages
• allows more extensive programs to be run • facilitates effective multitasking
Virtual memory disadvantages
• slower to access than physical memory which degrades performance if overused • can lead to disk thrashing, when the computer freezes due to pages being swapped too frequently between the hard disk and main memory [1]
What is an interrupt?
a signal to the processor indicating that a device/process needs attention [1]
Interrupt service routine
• The processor checks the interrupt register at the end of each FDE cycle [1] • If 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 [1] - the relevant ISR is loaded into RAM by loading the relevant value into the PC [1] - when the ISR is complete and if there are no interrupts with a higher priority to the current process [1] - the contents of the stack are popped/loaded back into the register [1] - the FDE cycle resumes [1]
Scheduling + why is it necessary ?
• the method used by the OS to ensure all jobs get sufficient/fair processor time ensuring efficient use of resources /processor time [1] • as many jobs as possible are processed in the least possible it time [1] • scheduling algorithms can be pre- emptive or non-pre-emptive
Pre-emptive
• assigns the CPU to a process for a limited amount of time • allows interruption of processes currently being handled • it can result in low priority processes being neglected if high priority processes arrive frequently • e.g round robin , STRF, multi level feedback queues
Non pre-emptive
• Allocates the CPU for unlimited time slots • so once the CPU is given to a process that process keeps using it until it’s completed • a process can’t be interrupted unless it completes or it’s burst time is reached
Round robin
• is pre-emptive • each process is given a fixed/equal amount of time [1] • if the process hasn’t been completed by the end of its time quantum, it returns to the back of the ready queue [1]
Round robin advantages
• all processes/jobs will eventually be attended to • all process get an equal/fair share of the CPU
Round robin disadvantages
• choosing the right time quantum can be difficult • doesn’t take into account job priority/urgency
First come first served
• is non-pre-emptive • jobs are processed on a FIFO basis [1] • whichever process is received first , is executed first • each job is equal priority [1] • e.g for printer queue : all documents have equal priority [1] • whichever document is received first is printed first [1]
First come first serve advantages+ disadvantages
• benefits: is easy to implement • drawbacks: does not take into account job priority/urgency • short process can starve if a long process arrives before a short process