1.2 Systems Software Flashcards
Need for OS (1.2.1A), Paging, Segmentation and Virtual Memory (1.2.1B), Interrupts (1.2.1C), Scheduling (1.2.1D), Types of OS (1.2.1E), BIOS (1.2.1F), Device Drivers (1.2.1G), Virtual Machines (1.2.1H), The Nature of Application (1.2.2A), Utilities (1.2.2B), Open vs Closed (1.2.2C), Translators (1.2.2D), Stages of Compilation (1.2.2E), Linkers, Loaders and Libraries (1.2.2F), Development Methodologies (1.2.3A), Writing and following algorithms (1.2.3C)
What is meant by the term multitasking?
- When you have more than one program open and running at the same time
- The processor allocates a small amount of time to each process and cycles between them
What is file management?
- Data is stored in files
- An extension to the filename tells the OS which application to load the file into
- The OS may present a logical structure of files in folders and allow the user to rename, delete, copy and move files
What is user management?
- Allows multiple users to log into the same computer.
- The OS will retain settings for each user such as icons, desktop, backgrounds etc.
- Each user may have different access rights to files and programs
- A client-server network may impose a fixed or roaming profile for a user and manage login requests to the network
What are some UIs?
- WIMP: Windows, Icons, Menus and pointers
- Visual
- Interactive
- Intuitive
- Optimised for mouse and touch gesture input
What are the 2 methods of dividing memory into smaller sections?
- Paging
- Segmentation
Describe paging
- Pages are fixed size
- Pages are made to fit sections of memory
- Pages are physical divisions
- Programs are split to fit into a given number of pages
- Paging takes no account of how it splits the program, only that it splits it into fixed-sized pages
- It could separate the instructions inside a looping condition so they are in different pages, but that wouldn’t be efficient
Describe segmentation
- Segments are different sizes
- Segments are complete sections of programs
- Segments are logical divisions
What is Virtual memory?
- Using parts of the HDD to store programs that can’t be stored in primary memory
What is an interrupt?
- While the processor does the FDE cycle other devices and applications may require the processor’s attention.
- They need a way to signal to the processor that they require attention - this is what’s called an interrupt
What is the ISR?
- Interrupt Service Routine
- A program with a set of instructions that need to be fetched, decoded and executed to carry out the operations of the interrupt
- That means that the contents of the PC need to be changed to point to the address for the first instruction of the interrupt
What happens when an interrupt is received?
- The values held in the registers are copied into a data structure in memory known as the stack
- These values are pushed onto the stack in a stack frame, effectively saving them for later retrieval
- The interrupt can now be executed
- Once the interrupt is complete, we pop the frame off the top of the stack.
What does popping the frame of the stack allow us to do?
- Retrieve the previous values for the original program
- Load them back into the processor registers
- Carry on executing the original program where we left off
What happens when a high-priority interrupt comes along while an interrupt is being executed?
- The stack system handles it by:
- Suspending ISR A
- Pushes register contents onto the top of the stack
- Starts executing ISR B
- Once ISR B has completed executing, we pop the frame off the top of the stack to retrieve the value for ISR A, load them back into the processor registers and carry on executing ISR A
What are some examples of hardware interrupts?
- Power supply failure
- Power/reset button pressed
What are some examples of user interrupts?
- Moving the mouse
- Keyboard presses
What are some examples of software interrupts?
- Illegal instructions encountered
- Arithmetic overflow
- New log on request
What are some examples of timer interrupts?
- Screen recording application
- Data-logging program reading an input-sensor every second
What are some examples of I/O devices interrupts?
- Buffer nearly empty
- Printer ink supply notification
- Signal the completion of a data transfer to/from a device
What does a scheduler do?
- Manages which process to execute next
- Manages the length of time the next process can execute for
Explain the process of scheduling using Process A as an example
- Process A is a new process
- The number indicates the length of time before it finishes
- It enters the ready queue
- When the currently executing process finishes or is blocked or suspended, process A can move into a running state
- From here it will either:
- Finishing executing completely and leave the system
- Get blocked as it requires an input or output commands, meaning it can’t continue until more data is received
- Run out of time - each process is allocated a certain amount of time after which it is suspended and moved to the back of the ready queue
What is an FCFS algorithm?
- First come First Served
- Processes are executed in the order they arrive
- If a process takes a long time, the others behind it have to wait
What is a SJF algorithm?
- Shortest Job First
- Picks the processes that take the shortest amount of time and runs them until they finish
- The scheduler needs to know how long each process will take
What is a RR algorithm?
- Round Robin
- Each process is allocated a fixed amount of time, known as a time slice or quantum
- If the process isn’t complete by the end of its time slice, it returns to the back of the ready queue
What is a SRT algorithm?
- Shortest Remaining Time
- Similar to SJF
- Pre-emptive algorithm, meaning processes can be suspended if a higher priority process joins the queue