SLR04 – Operating systems – Systems software (AS & A’Level) Flashcards
What is the function of the operating system (OS)?
Provide interface between the user and the hardware through application software, and provides a platform for them to run and provides its own user interface.
It also handles interrupts such as power failure
What are the important parts of the operating system?
Application software: involves common user interface, so the user can interact with it in a familiar way
Utility programs: Some are built in the OS that help maintain the computer, e.g. encryption software
Memory/resource management: loads various programs into memory, so they can be executed and manage the data these programs acquire
File management: in charge of where files are stored and where they are going to be loaded from again. This could be because the user doesn’t want to lose their work when power is switched off
Device driver: translates the OS instructions into what the hardware understands
What are the features of the OS?
Multitasking: When more than one program is running at the same time. The processor allocates a small amount of time to each process very quickly, so it simultaneously runs
File management: Data is stored in files, and extension to the file name tells the OS which application to load the file into. Overtime, the hard disk becomes fragmented with files, so OS presents logical structure of files in folders and allow the users to rename, copy, delete and move files.
User management: Allows multiple users to log into the same computer. The OS retains setting for each user such as icons, or desktop backgrounds. Each user may also have different access rights to file + programs. Client server network may impose fixed (ensures every user has same desktop + setting) or roaming (allows user to customise their settings) profile for users and manage log in requests to the network.
User interface: the way in which you interact with the computer as a human being. Most common and familiar is graphical user interfaces. WIMP:
windows icons, menus and pointers. Very visual interface, ideal for beginners and optimised for mouse and touch gesture input
What are the 3 types of memory management?
Paging: divides memory into smaller sections. Divided into fixed sizes, all the same, and considered physical divisions. Does not take into account how it splits the program. Could separate the instructions inside looping condition, so they’re in different pages, but this is not efficient, it is better to keep those instructions together in memory.
Segmentation: divides memory into smaller sections. Divides into different sizes. Segments are complete sections of programs. Divided by logical divisions.
Virtual memory (on hard disk): significantly more room available and cheaper, so when main memory is full, instructions not being used are transferred to space in hard disk. When needed again, a different program can be swapped out with it, giving the impression the computer has more memory than it does.
Paging vs Segmentation (similarities and differences)
Similarities:
1. Both allow programs to run despite insufficient memory
2. Both stored on disk
3. Both transferred into memory when needed
Differences:
1. pages are fixed, segments are different sizes
2. pages are made to fit different sections of memory. Segments are complete sections of programs
3. pages are fixed divisions whereas the other is logical divisions
How does a computer handle running out of memory, and why does it slow down?
How can this issue be avoided?
Virtual memory allows data in RAM not being currently used to be transferred to the hard disk temporarily to free up space in RAM for other programs and data. When that data is needed again, any other unused data is transferred to the hard disk before original data is transferred back to RAM. This is known as swapping.
When virtual memory is used on a regular basis, it slows the computer down.
Paging and segmentation, or just simply increasing the size of RAM to reduce the need for virtual memory, can solve this issue.
What is interrupt service routine?
A program with a set of instructions that need to be fetched, decoded and executed to carry out the operations for the interrupt
That means content in the program counter have to be changed and to point address of the first instruction of the interrupt
What is an interrupt, and how is it handled?
Interrupt: When a device/application requires attentions from the processor
(Fetch → decode → execute → check for interrupts)
Values in the registers are copied into a data memory structure known as stack to later retrieve these values back. This is put at the top of a stack frame. The interrupt can then be executed, and once complete the frame is popped from the top of the stack and the values are loaded back into the registers and continues the program where it was left off
What happens when the interrupt is interrupted?
When an interrupt comes along, the previous program is suspended and the data has been stored into the stack frame. The interrupt begins executing.
A new interrupt comes along and suspends the first interrupt and pushes the registers content on to the top of the stack, and the 2nd interrupt is executed.
Once this is completed, we pop the frame at the top of the stack and the value of the 2nd interrupt is retrieved and loaded back into the processor registers and continue executing.
Once completed, we pop the frame from the top of the stack and retrieve previous values from the original program and loaded back into the registers and carry on executing where the original program left off.
What is scheduling?
The task of allocating CPU processor time amongst all running programs
Manage which process to manage next and the amount of time.
What are the different types of scheduling algorithms?
First come, first served: processors executed in order they arrive
Shortest job first: picks process that takes shortest amount of time and runs its first
Round-robin: each process allocated a fixed amount of time and if it’s incomplete it returns to the back of the ready queue
Shortest remaining time: similar to SJF but is pre-emptive algorithm, meaning process can be suspended if a high priority process enters the queue
Multi level feedback queue: if a computer has more than one processor/core, it can handle more than one process queue at a time. This process is very complexed
What are the different types of OS’s?
Multitasking: more than one application open at the same time
Multi-user: allow more than one person to use a computer at the same time
Distributed: OS control and coordinates the computers, presenting them to the user as if they were a single system and online shopping sites often use it
Embedded: tend to run on dedicated hardware, so they run with maximum efficiency, using low powered processors and very little memory e.g. washing machines, car engine managements
Real-time: processes have to be guaranteed to execute within a known time frame, e.g. aircraft autopilot. Rarely run at full capacity
All 5 are not mutually exclusive
What is BIOS and what does it stand for?
The Basic Input Output System:
responsible for loading OS when computer first turns on
What does BIOS do?
First checks all hardware needed is connected and working using a power on self test (POST)
What is the bootloader program/bootstrap?
Used to load the OS kernel into memory and the OS takes over and boots rest of the system