Day Before Exam Flashcards
ISA?
Instruction set architecture.
ISR?
Interrupt Service Routine.
DMA?
Direct Memory Access?
Three techiniques for I/O data exchange?
Programmed (CPU waiting), Interrupt Driven (avoids active polling - ie repeat checking), DMA (extra module)
Three types of DMA?
single bus, integrated with I/O, extra I/O bus.
PC?
Program Counter
IR?
Instruction Register
AC?
Accumulator Register.
DRAM and 3 points.
Dynamic RAM. Uses charges in capcitors. Information must be refreshed frequently due to charge leakages. Cheap. Used for main memory.
SRAM and 3 points.
Static RAM. Uses flip flops. Holds data as long as power supplied. expensive. Used for cache memory.
ROM and 2charachteristics
Read only memory. Non-volatile, so no power source required to keep data in memory. used to store BIOS which is required when computer turned on.
PROM
Programmable ROM (once only)
EPROM
Erasable programmable ROM. Expensive. Erase completely with Ultraviolet light.
EEPROM
Electrically erasable ROM. Erase partly.Very expensive.
Flash Memory characheristic
can be erased in seconds. High Density.
What is cache?
SRAM located between CPU and main memory. Purpose = increase I/O performance of cpu.
What is locality of reference?
Computer performance is improved by caches with efficient transfer strategies.
Cache replacement algorithms? 3
Least recently used, least frequently used, FIFO
Magnetic Disk - describe
Fast and large. Circular platter coated with magentisable material. Divided into rings called racks. Tracks seperated by inner gap and broken into sectors.
Access time of magnetic disk?
Is seek time (R/W head to correct track) and Rotational Latency (disk to spin to correct sector).
rpm of magentic drives?
5400rpm. 7200rpm available.
How to increase capacity of magnetic drive?
Use more than one platter. Use both sides of platter.
What does formating a magentic disk mean?
Make it usable for an OS. Control data used to mark tracks and sectors.
RAID
Redundant Array of Independent Disks. Multiple disks in parallel. Extra reliability.
What is a process?
a program being executed.
Memory management - system requires it for 3 reasons
Sharing(several processes same memory), Relocation (prcoess returned to main memory at different location), Protection (between processes accessing each other)
5 types of memory management:
Fixed partitioning, Dynamic partitioning, Paging, Demand Paging, Virtual Memory.
Internal versus external fragmentation?
Internal = fixed partitioning wastage of space when process smaller than partition. External = dynamic partitioning space between partitions as processes swapped in and out.
3 algorithms for dynamic partitioning placement?
best fit, first fit, next fit.
4 charachteristics of paging:
Frames = partition memory. Pages = partition process. Page table = OS tracks frame locations for each page in process. Memory map = page number and offsets within page.
What is demand paging?
Process does not have to be loaded in it’s entirety to memory. Page swapped in and out as needed.
What does demand paging use?
Page interrupt handler to decide swapping of process pages from secondary to main memory.
What does a process contain? 5
Stack, Memory, Heap, Data, Text.
PCB?
Process Control Block
Process Image consists of:
program data, program to be executed, stack, PCB
Short Term Schedulers job:
Dispatcher, decides which job to exectue next. Frequent.
Medium Schedulers job:
Swap processes between main memory and hard disk. Suspend and activate. Buffer between short and long.
Long term schedulers job:
decides which process to admit. Infrequent.
What are suspend queues?
Dispatcher uses them to prioritise processes.
Starvation?
A process never getting to CPU. Mayeb because of less priority. Safeguard by changing priority queue based on ag and use more priority queues.
List 5 scheduling algorithms:
FCFS, SPN (Shortest Process Next), SRT (shortest remaining time), RR (round robin), MLF (multi-level feedback).
Describe RR
Round Robin: Pre-emption algorithm based on clock interrupt. next process chosen on FCFS basis. Best for CPU bound processes and interractive systems.
Concurrency:
Apparent simultaneous execution of processes. Time Slicing CPU. Requires cooperatice processes to share CPU
What is data incoherence?
Can occur if two processes share data and cause it to be inconsistent or incorrect.
Three levels of awareness concurrent processes may have of one another:
UNaware - compete for rsources (MUtual exclusion, deadlock, starvation). Indirectly aware - share resources (ME, Deadlock, starvation, data incohernce), Directly aware, cooperate by communication (deadlock, starvation).
What is deadlock
Permanent blocking of processes as they wait for each other. Only happens in concurrent system.
Critical Section?
Part of the process that tries to use a critical resource. Only one process allowed to enter CS for a resource at a time. This is mutual exclusion.
Mutual Exclusion? 5 points
1 process at a time. others processes must not interfere when they halt. no deadlock or starvation allowed. process in CS for a finite time. No delay to access of CS.
two approaches to mutual exclusion:
Hardware (test and set). OS (semaphores).
psudo code for semaphore approach
Process Pi: repeat Wait(s); CS Signal(s); RS forever. RS = remainder section.