Software and Software Development Flashcards
Software and software development
Operating system (definition)
Set of programs acting as an interface between the user and the computer
Functions of OS (5)
Memory management
Interrupt service routines
Processor scheduling
Queueing processes
Multi-tasking
Memory management (OS definition)
Allocation of space in RAM to each program currently in use
How does paging work?
Memory is divided equally into “pages” and each program in memory can be held in non-continuous pages. A page table is used to link the physical addresses of pages back to their logical address order.
How does segmentation work?
Memory is partitioned into segments of varying length so that all program stays together. It is possible to load parts separately.
One use of segmentation
OS separated from programs to prevent impact of failures from affecting whole computer.
How does the OS handle interrupt requests?
After FDE cycle, pauses current processes and disables low-priority interrupts. Runs a routine to service high-priority interrupts and then resumes the current process afterwards.
Example order of priority for interrupt requests
Power-fail > clock > end of operation
When do interrupt service routines happen? (3)
- Check for interrupts after every execute stage
- when an application terminates or requests OS services
- when the allotted processor time for one task is completed
What is processor scheduling?
A scheduler allocates time to each process competing for the CPU
Why is processor scheduling useful? (3)
Maximises throughput
Allocates resources equally between users
Makes max use of hardware resources
How does round robin scheduling work?
Each process in the queue is given a time slice (queue organisation first in = first out). If it does not complete in that time, it moves to the back of the queue.
how does FCFS (first come, first serve) scheduling work?
There is no hierarchy of priority and jobs are processed in the order they arrived
How does SRT (shortest remaining time) scheduling work?
Runs smallest jobs first to maximize number of tasks completed in a time
Use of SRT scheduling
used for payroll or for jobs done regularly that can be done overnight.
Disadvantage of SRT scheduling
requires estimate for how long each task will take
what is an MLFQ (multi-level feedback queue)?
algorithm which separates processes based on needs from processer and gives preference to short jobs and I/O processes
What does the scheduler do? (II)
allocates time for each process
and queues next process while current on is in CPU
Multi-tasking (definition)
Carrying out small parts of multiple programs to give the appearance of parallel processing
Backing store management (definition + example)
Keeps directory of what is moved from secondary to primary memory and what space in storage is free
e.g. moving/deleting files/folders, limiting access to files
What does virtual memory do
swaps pages of temporarily inactive tasks with new tasks when
RAM is full
Why does virtual memory use slow down processing?
Accessing secondary storage is slower than accessing RAM
What are the types of OS? (5)
- Distributed
- Multi-tasking
- Multi-user
- Embedded
- Real-time
What does a distributed OS do?
OS runs across multiple devices, allowing task load to be spread across computers
What does a multi-tasking OS do?
Uses time slicing to switch quickly between programs in memory, giving the appearance of carrying out multiple tasks simultaneously
What is a multi-user OS?
OS for multiple users sharing one (usually high-performance) computer; usually in different accounts.
What does a multi-user OS do?
Uses a scheduling algorithm to share processor time fairly between multiple users in different accounts
What happens when a multi-user OS does not use a scheduling algorithm?
Processor starvation - the processes each user needs are not given enough time to execute