1.2.1 Systems Software Flashcards
What is an operating system?
System software that manages computer hardware and provides common services for computer programs, acting as an interface between users and the machine.
Why is an OS needed?
Most software isnt written to interact with computer hardware.
What does are the main functions of an operating system?
- Resource management
- File management
- Interrupt handling
- Security
- Runs software
- User interface
- Provides utilities
What resources does an OS manage?
the CPU, memory, disk drives and printers
What does the OS do to manage tasks/resources?
Allocate resources to specific tasks and ensure that they are used effectively. They handle:
* how much memory to allocate each application
* when they get to use the CPU
* how to handle data being read from/written to memory
How does the OS help to manage RAM?
moves instructions from non volatile memory (such as secondary storage devices) into RAM to make them easier to access.
In memory management what are the OS’s main roles?
- Identifying status-Marking the empty/occupied status of memory
- Allocating memory-Identifies, reserves and allocates the correct amount of memory for data being stored
- Prioritising processes-Prioritises commonly used processes
What is logical address space vs. physical address space?
Logical address space is used within a program to declare the memory needed to run the program, physical address space is the actual memory space in the hardware.
What is memory management?
The OS takes the logical address space defined in the program and maps it to physical address space.
What are the different methods of memory management?
- Paging
- Segmentation
- Virtual Memory
What are the benefits of memory management? (3)
- Enables multitasking as multiple programs can run
- Maintains security as it restricts a program from accessing other programs memory
MAKES COMPUTER RUN SMOOTHLY
What is paging?
Physical address space is divided into pages of equal size and there are allocated/deallocated to programs based on what the user is using.
What is Segmentation?
The physical address space is sorted into blocks of various sizes depending on the amount of space an application needs.
Advantages of paging
- Efficient memory utilisation
- Supports visual memory
Disadvantages of Paging
Can lead to internal fragmentation, can waste space if each page is not full
Advantages of Segmentation
- More space efficient than paging
- Enables sharing data between applications
Disadvantages of Segmentation
- Can lead to external fragmentation
- Potential security issues
What is Internal fragmentation?
When a process is allocated more memory space than it needs, leading to wasted space within the allocated block
What is external fragmentation?
When memory is scattered in small, non contiguous blocks, leaving gaps.
What is Virtual memory?
When parts of a process not currently being used are swapped from RAM to the hard disk and vice versa.
When is Virtual memory used?
When physical space in RAM is limited.
Advantages of memory management
- Allows for more extensive programs to be run
- Facilitates effective multitasking
Disadvantages of Virtual memory
Can slow down system performance as secondary storage is slow to access.
What are the different types of scheduling?
Round robin, First come first served, shortest job first, shortest time remaining, multi level feedback queue
What is round robin scheduling?
Each task is alocated an equal time slice, once this is over it is finished and the next task is started.
Advantages and disadvantages of round robin scheduling
- Advantages- each task is definitely reached
- Disadvantages- urgent tasks are less likely to be completed quickly when many are being run.
What is first come, first served scheduling?
Processes are completed in the order they request to run
Advantages and disadvantages of FCFS scheduling
- Advantages- Simple to implement, prevents starvation
- Disadvantages- Can cause tasks to have a long wait time
What is shortest job first scheduling?
Processes with the shortest total time to complete go first.
Advantages and disadvantages of Shortest job first scheduling
- Advantages- Reduces wait times
- Disadvantages- Prone to starvation
What is Shortest time remaining scheduling?
The tasks are processed depending on the time remaining, if a task with less remaining time is added then the task will be paused and that will be completed first.
Advantages and disadvantages of Shortest time remaining scheduling
- Advantages- Adaptable, minimizes average waiting time
- Disadvantages- Prone to starvation.
What is a multi-level feedback queue?
Tasks are assigned a priority level, tasks are chosen based on the priority level and the processing time already had.
What factors affect a tasks priority in MLFQ?
If a process uses too much time it’s priority is lowered.
If it has been idle for a while its priority is increased, avoiding starvation.
If a process involves input and outfput devices require large amounts of processing time so they are high priority
quick processes are completed first.
Advantages and disadvantages of MLFQ
- Advantages- improves fairness, prevents starvation
- Disadvantages- complex, need to be tuned carefully
How does the OS manage the User Interface?
It provides the user interface allowing the user to interact with the computer.
Why are interrupts needed?
Scheduling processes are used to manage large tasks though smaller urgent tasks do not fit into this system. In order to prioritize urgent tasks devices use interrupts.
What are interrupts?
Signals sent to the CPU requesting immediate attention, causing the CPU to halt all other processes until the interrupt is completed.
Examples of when interupts may be used
- Hardware device has signaled that is has data to process
- Hardware device has completed a task that it was asked to do
- A software process needs a service to be provided or OS function to be performed
- An allotted amount of time has expired and an action needs to be performed
- A hardware failure has occured and needs to be addressed
What do OS’s activate when an interrupt is recieved
Interrupt service routines (ISRs)
What is an Interrupt service routine?
A mini program created to respond to interrupt signals, these can be built into OSs or provided via device drivers
What are the 10 steps of an ISR?
- The processor receives the interrupt
- The processor completes the fetch-decode-execute cycle of the instruction that it was running when it received the interrupt
- The current contents of the processor registers (including the program counter) are saved to memory
- The origin of the interrupt is identified so that the appropriate ISR is called
- All other lower-priority interrupts are put on hold to allow the ISR to finish running
- The program counter is updated with the address of the first instruction of the ISR
- The ISR completes its execution
- The processor registers are reloaded with the values that were saved to memory
- The lower-priority interrupts that were put on hold are re-established
- The program counter is set to point to the address of the next instruction that needs to be executed in the program that the processor was running when it received the interrupt
How does the OS manage Input/Output devices
Manages communications between devices and the user abd manages functionality issues.
How does the OS provide network services?
- Creating and managing user accounts on the network
- Controlling access on the network
- Providing communication services between the network devices
- Troubleshoot and Monitor the network
- Configuring and Managing the resources on the network.
What does the OS do for security?
Ensuring resources are protected from unauthorized access through permissions and passwords
What are the different classifications of the OS?
Single user, Distributed, Multitasking, Multiuser, Embedded, Real Time
What is a single user OS?
Can only have one active user at a time eg laptops
What is a distributed OS?
Multiple computers acting as one, if one crashes more computers running it eg servers
What is a multitasking OS?
Can run multiple applications at a time (most modern computers)
What is a multiuser OS?
Allows multiple people to act as users on one computer, only used in large datacentres, used to be used when a single computer was very expensive.
What is an Embedded OS?
Has a specific use, you cannot do anything other than the intended process as all programs are preprogrammed and non changeable
What is a Real Time OS?
Permanently live and does not buffer, information is vital and time sensitive
What is BIOS?
A set of computer instructions, stored in non volatile memory (ROM or flash memory) responsible for performing a computer’s start up procedures.
What are BIOS’s roles when starting a computer?
Initialising hardware operations
Loading the OS
Managing the flow of data to and from the OS during bootup
What are the stages of BIOS?
- POST
- Checking the CPU clock, memory and processor are all operational.
- Test for any external memory devices
- Loading the bootstrap program
What is POST?
The Power On Self Test, this initialises and indentigies system devices including the CPU, RAM and other hardware
What is the bootstrap program?
The program that loads the OS into RAM
What is a Device Driver?
A piece of software that provides an interface between an operating system and a specific piece of hardware.
Why are device drivers important?
They allow any OS to interact with any hardware, meaning devices can be build with efficiency and not compatibility in mind
What is a Virtual Machine?
A VM runs software processes within other software that is already running without causing a decrease in performance
What are the uses of a VM?
- Running alternative OSs
- Supporting incompatible software
- Creating a test system
- Running multiple servers
What is intermediate code?
MR COUNT HELP