Please enable JavaScript.
Coggle requires JavaScript to display documents.
Computer Systems, Questions - Coggle Diagram
Computer Systems
Processor Design
ALU
-
The ALU can be made from: ANDs, ORs, INVERTERs and Multiplexers
-
-
-
Clock
-
-
-
Edge triggered clocking is when state is updated on an active clock edge (rising and falling? seems to be just rising)
-
Memory Elements
Memory Elements
-
-
-
The output from a memory element depends on the inputs and the value already stored in the memory element
-
-
-
What is the difference between a latch and a flip flop. A flip flop changes on a clock edge, a latch changes on inputs and a clock assertion.
Cache
-
Handling a cache miss
- Set PC back one instruction PC = PC -4
- Request main memory read and wait
-
- Restart original instruction, this time the data will be found in the cache
-
-
-
The TlB is a specialised cache which stores common virtual - physical memory addresses to prevent costly lookups in the page table.
Memory Hierarchy
smaller faster memory is located closer to the processor, larger slower memory is located further away.
Virtual memory
To speed up processing times, main memory can act as a cache for secondary storage.
-
-
Virtual memory allows us to run programs (or virtual machines) on the same physical memory without sharing the same physical memory. We need to prevent memory sharing for security and memory safety issues.
-
-
-
Page Table: a table consisting of a mapping of virtual memory addresses to physical ones in real memory.
Least Recently Used replacement scheme: The least frequently used pages in the page table will be replaced by other pages and written to the swap space instead. The processor uses a heuristic involving the swap bit
The page table allows virtual memory to dynamically grow. It can grow in different directions to allow for memory for the heap and the stack
-
When RAM runs out, we may need to make use of swap space. This is secondary storage that acts like memory for us. The need to use this should be avoided as it is very slow.
-
-
There is a supervisor mode bit to indicate what kind of process it is, so what kind of privileges it should have
Virtual Machines
-
Each virtual machine will have their own virtual memory and own page tables. Only the host OS will actually interact with real addresses.
-
If two processes want to communicate they can get special permission from the OS to share some same memory
Register File
-
A set of registers and logic blocks that allow registers to be read from or written to by supplying the register number
-
To perform a read operation it requires a register number as a the selector to the multiplexor which outputs the data in the specified register. (1 input one output)
To perform a write operation, we need: a register number as a selector for the multiplexer, the data to write and a clock signal to control the writing into the register
-
-
Logic Design
-
Logic Block
-
-
-
-
NOR and NAND gates are universal as any gate type can be built from a permutation of just one of these gates.
Decoders: From n inputs, it produces 2^n outputs (one for each combination of inputs. only one of the output signals will be on for each combination of inputs)
-
Since the different combinations of inputs produce 2^n binary numbers it is common to label the output whatever binary number the inputs produce
Multiplexer: From multiple inputs it allows you to select only one of them with an extra "selector" input(s). There can be arbitrarily many inputs.
Consists of:
Decoder: That generates n outputs one for each input to the multiplexer (so the decoder itself requires log2(n) inputs). This is to allow the multiplexer to select the input line to output.
First layer of AND gates: One for each input, to combine with the selector lines from the decoder to allows us to select the input line to output.
One large or gate to allow us to combine the outputs of all these AND gates back into a single wire.
-
Programmable Logic Array
-
-
-
PLA's are efficient as they don't need gates for inputs which never produce truth values. Each product only needs one output gate e.g. if the same product is produced multiple times it can use the same gates
Finite State Machine
-
-
Moore machine: A type of FSM whose output values are only determined by its current state. Moore and Mealy machines are equivalent
Mealy machine: A type of FSM whose outputs are determined by its current state and its current inputs
-
-
-
-
Questions
-
How does OS ensure processes have only access to certain parts of memory and RO to certain parts of memory.