1.2 Software and software development Part 1 Flashcards
1.2.1 (a) Functions of Operating Systems
Provides the Interface between the user and the hardware
Operating system provides a platform that the application software can run and communicate with the hardware
A user interface is provided by the operating system
Used alongside Utility Programs
Memory Management
File Management
Device Drivers
Interrupt Handling
1.2.1 (a) How does a User interact with the computer
The operating system provides the interface between the user and the hardware
The user communicates with the computer via the application software
The operating system provides a platform that the application software can run an communicate with the hardware
Application software usually involves a user interface which allows an interaction with software in a familiar and friendly way
The User Interface is also provided by the operating system
1.2.1 (a) Multitasking
When more than one program is open at the same time
The processor allocates a small amount of time (time slice) to each process and cycles between them
Happens so quickly it appears they are executing simultaneously
1.2.1 (a) File Management
Data is stored in files with extensions
Extensions tells the operating system which application to load the file into e.g. .pptx
Operating system presents a logical structure of files in folders
Allows the user to rename, delete, copy and move files
Files become fragmented and needs defragmentation
1.2.1 (a) User Management
Allows multiple users to log onto the same computer
Their preferences and settings are retained
They may have different access levels to files
Client Server network imposes a fixed or roaming profile, which has the same customised settings for all users on every device
Also manages login requests
1.2.1 (a) User Interface
The way in which humans can interact with the computer
WIMP: Windows, Icons, Menus, Pointers (Graphical User Interface: GUI)
Visual, Interactive, Intuitive, optimised for beginners and mouth and touch gestures
1.2.1 (b) Memory Management
When a new program arrives it is put into a slot, or split up and put into multiple spots - If there is enough total space
1.2.1 (b) Paging
Memory is divided into fixed sizes (equal)
Pages are made to fit sections of memory
Pages are physical divisions
Programs are split up into a given number of pages
Does not account for how memory is split up: Could separate a loop across multiple pages which makes it not very efficient
1.2.1 (b) Segmentation
Different sized divisions
Complete sections of programs
Logical divisions
Splits programs logically into parts, to fit into memory
1.2.1 (b) Similarities between Paging and Segmentation
Allows programs with insufficient memory to run
Both are stored on disk
Both are transferred into memory when needed
1.2.1 (b) Differences between Paging and Segmentation
Pages are fixed size, Segments are variable size
Pages are made to fit memory sections, Segments are complete sections of programs
Pages are physical divisions, Segments are logical divisions
1.2.1 (b) Virtual Memory
When RAM is gull
Fetched and Executed programs are stored in RAM
Store significantly more programs in the hard disk than RAM
Instructions that are not being used currently are moved to a space on the hard disk (Virtual Memory)
When they are needed a different program can be swapped out of RAM
If more time is spent moving between RAM and virtual memory (disk thrashing) then the computer will be slow
Impression of more memory
1.2.1 (c) Interrupts
Computers process data using the FDE cycle
While this occurs, other devices may need the processors attention
To do this they signal to the processor via an Interrupt
The Computer Fetches, Decodes and Executes the last instruction, then checks for new interrupts
1.2.1 (c) ISR
Interrupt Service Routine
The program to carry out the interrupt
The PC is changes to the interrupts address
The values of the registers are pushed onto the stack data structure for later retrieval as a stack frame
The interrupt is now executed
When the interrupt is complete, the stack frame is popped off the top of the stack
The previous values for the original program
Load them back into the processor registers
Continue executing the original program from where was left off
1.2.1 (c) Interrupting an Interrupt
While the ISR is executing interrupt A, a higher priority interrupt comes along, A is suspended
Registers contents are pushed onto the top of the stack
ISR handles B
WE pop the stack frame off the top of the stack
Load the Interrupt back into the registers
Continue executing ISR A
When ISR A is complete, we pop the stack frame off the top of the stack
Carry on executing with the original program
1.2.1 (c) Interrupt Priority
Interrupts are higher priority than normal programs
1.2.1 (c) Interrupt Examples
Hardware: Power Failure, Power Button Pressed
User: Clicking / Typing, Moving mouse
Software: Overflows, Log on requests
Timer: Data logging programs
I/O Devices: Signal complete data transfer, insufficient printer ink
1.2.1 (d) Scheduling
Multitasking operating systems, give the appearance of multiple tasks executing at the same time
Multiple threads may be executing in one program
Multi-User Environments, user need servicing at the same time
1.2.1 (d) Scheduler
Manages which process to execute next and how long the processes can execute for
Process enters the ready queue, when the previous process is executed, the process moves into a running state
1.2.1 (d) Ending a process
Either the process finishes completely and leaves the system
May get blocked if it requires an input or output command, it cannot continue until more data is received
May be suspended as it runs out of allotted time and moves to the back of the ready queue
If there are multiple processes, it requires a scheduling algorithm to decide which process to execute next
1.2.1 (d) First Come First Serve (FCFS)
One Queue Only
Processes are executed in the order they arrive in
If a process takes a while, the others have to wait for it to leave the CPU - Maybe be starved of processor time
Time to complete is not considered
1.2.1 (d) Shortest Job First (SJF)
One Queue Only
Picks the process that takes the shortest amount of time and runs them until they finish
Scheduler need to know how long each process will take
Scheduler orders based on shortest time
They execute as before, until completion allowing the next process in the ready queue to enter the running state
1.2.1 (d) Round Robin (RR)
Pre-Emptive Algorithm
One Queue Only
Each process is allocated a fixed time slice / quantum
If the process is not completed after the time slice, it is suspended and returns to the back of the ready queue
1.2.1 (d) Shortest Time Remaining
Pre-Emptive Algorithm
One Queue Only
Processes can be suspended if a higher priority process joins the queue, whilst executing