Function and Purpose of OS Flashcards
What is an operating system?
The core software that controls how computer operates e.g. Windows, Linux, iOS, Android etc.
What must OS’s do?
- Control the hardware
- Manages software through loading and unloading applications from memory
- Provide security
- Provide a UI
What are are the main parts of the OS?
Kernel, Device Drivers, UI, System Utilities
What does the kernel do?
- Load and unload applications fro memory
- Schedule tasks to run efficiently on the CPU
- File and Memory management
- File storage to and from secondary storage devices
- Data security
What do device drivers do?
Every piece of hardware that communicates with the OS requires a device driver that enables internal or external device to communicate with the OS
What does the user interface do?
Allows a user to interface and interact with the computer e.g. GUI, Command Line Interface, Natural Language Interface
What do system utilities do?
Part of the OS that provides all the basic facilities that run in the background without user interaction e.g. print spool services, cryptographic password management or file management services
What is the purpose of memory management?
Without any form of memory management, recently opened programs could overwrite data and programs that were already in use, causing it to be corrupted, preventing programs and data from being overwritten
What is memory segmentation?
The allocation of segments of memory to allow a process to run and segments are not fixed sizes so will be as large as necessary to hold a process
What are the different parts of memory segments?
- Code segment stores program instructions
- Data segment stores program variables
- Stack segment stores functions + subroutines and can grow into the free memory segment
What is paging?
A page is a fixed sized division of memory, with each page being given and number and is recorded in the page table. Processes can be put into many different pages. Paging is used for virtual memory
What is virtual memory?
When the memory is full, the OS will take the least used pages and move them to the secondary storage device as virtual memory. This is extremely slow.
What is polling
Polling is the CPU or program regularly checking to see if an event or peripheral needs attention.
What are the advantages and disadvantages to polling?
Advantages:
- Very simple and predictable as only occurs at specific points while software runs
Disadvantages:
- May be inefficient in CPU processing time
What are interrupts?
A signal for the CPU to stop what it is doing and instead carry out the interrupt task
Each interrupt has a priority and if it has a higher priority than the current process, the CPU will suspend the task and performs the Interrupt Service Routine (ISR)