Operating Systems Flashcards
What is an operating system?
- Software on comp that manages its day to day use
- Deals with security, provides a GUI, manages the hard and the software of the system
What is a multi-tasking OS?
- Allows multiple programs running simultaneously
- CPU’s can deal with more programs than they have cores
- CPU is much faster than peripherals so it creates illusion that multiple programs are running at once when in fact one instruction is executed at a time
What is a multi user OS?
- More than one user can access computers resources at the same time
- Common on mainframe comps where multiple users will need to use it at same time
What is a distributed OS?
- Controls multiple comps, presenting them to user as 1 system
- Used to tackle difficult tasks were more power is needed
What is an Embedded OS?
- Only has one job and won’t need multitasking
- Designed for a specific device and will run efficiently on low CPU’s with little RAM
- eg: ATM or TV
What is a real time OS?
- Used to carry out actions in real time
- eg: Hospital equipment such as heart rate monitors will alert the staff as soon as sudden changes occur
- Auto pilot, traffic lights
What is a special feature of these OS’s
OS’s can have more than one of these properties. Most real time OS’s are also embedded
What is the Kernel and what is its function?
- Core of an OS
- Manages the system, memory management and scheduling
- Allows apps to send and receive data from devices
- Lies below UI
What does the memory manager allow?
- Programs to run simultaneously, programs to share memory to run at the same time
- Programs to share data if they have a valid reason
What does the memory manager disallow?
- Programs to collide and overwrite one another
- Restricts Programs from accessing and amending there own area of data
- Malicious software from attacking the data of another program
What two processes allow programs to split up across the memory if there is not room for the whole program?
Paging = Division of data into blocks of the same physical size. Each block is a page. OS uses page table to keep track of Where the pages are stored meaning all the pages of a process don't have to be stored together. More precise but not as efficient, used for smaller files and smaller sections of memory. Data would be good for paging. Page files usually 4kb Segmentation = Logical division of data into blocks containing routines or modules. Programs would be good for segmentation as they need to be logically divided into segments
What is virtual memory and why is it used?
- System takes area of hard drive and treats it as RAM
- OS identifies a page(s) in the RAM that are unlikely to be needed in the future and moves them to virtual memory. When needed they are moved back to physical memory
- Used when the RAM is low, it free ups space by moving pages or segments that are not likely to be used in the near future into the virtual memory
- RAM is expensive so instead of buying more this method is used
- Slower than actual RAM
What is disc thrashing
- If RAM is full the OS can move pages back and fourth between RAM and VM often.
- Slows down system
What is a schedular?
- Program that managers the time different processes have in the CPU
- They use algorithms to decide this
What is the advantage of scheduling?
- Allows multiple process to be ran at the same time
- Algorithms ensure that all processes get seen
What type of OS’s uses schedulers
Multi-user and multi-tasking
What is the Round robin algorithm?
- Each process given set amount of time
- If process not completed it goes to the back of the que and waits for its turn again
What is the First come first served algorithm?
- 1st process is dealt with start to finish
- other processes que up and wait their turn
What is the Shortest job first Algorithm?
- Picks shortest job to deal with first and deals with it start to finish
- Needs to know time before hand
What is the shortest remaining time algorithm?
- Estimates how long each will take then picks shortest one
- If new job is added with shortest time it then chooses that one
What is polling? -?
- CPU checks each peripheral to see if it needs attention
- Waste of time
- like a teacher coming round classroom asking each student if they need help
What is an interrupt?
- Device sends a signal to the processor to get its attention
- Similar to when a kid puts a hand up in class to get attention
- Has a priority in dictating how urgently it requires attention
- When an interrupt is raised it runs the correct ISR
What is an Interrupt service routine (ISR) and what are the steps involved?
Determines what happens when a particular interrupt is carried out
- At end of each fetch-decode-execute cycle the CPU checks to see if there are any interrupts. If they are and they are of a higher priority of the current task;
- The contents of the program counter and the other registers are copied at the stack
- The relevant ISR is loaded by changing to program counter to the value where the ISR starts in the memory
- When complete the previous values of the programs counter and the other registers can be restored from memory to CPU
Problems with ISR’s?
- It is possible that the interrupt could itself be interrupted by a higher priority interrupt.
- When this happens the current interrupt is copied to the stack and the new interrupt is carried out
- When finished (assuming it hasn’t been interrupted again) the original interrupt is loaded from the stack and carries on