Memory Flashcards
What is a logic level?
In analogue, 1s and 0s are divided by a threshold voltage. SO whilst 0 and 1 are convenient abstractions they do not reflect reality.
What are the main criteria for designing a memory system?
Rapid data access and it should take as little space as possible.
What assumptions must be made to model digital discrete circuits as networks?
The nodes are unidirectional, instantaneous, isopotential nets interconnecting devices.
How are digital ‘networks’ analysed?
Events (logic transitioned) are generated on the outputs at some future date in response to events asserted on the inputs.
As such analysis is centred on an event queue; a list of events ordered by time.
How is the system state of a discrete system represented?
The state can be summarised as the logic values in the nets and the event queue, i.e. events that will happen.
What happens when you assert an input?
Logic values don’t propagate instantaneously, although there will be an output change, for a brief time, the event is hidden from the device, but it is still part of the stae.
How are logic drivers modelled?
Logic drivers can be modelled as a voltage source with an ‘internal’ impedance.
What effect does modelling the driven gate as a resistor have?
Since the driven gate is a resistor, it means that the voltage value on the interconnect is loaded. This means that if multiple gates read from the same interconnect, they may pull down the voltage value, leading to a misrepresentation of the intended logic value.
What does fanout measure?
Fanout is a measure of the max number of gates an output can drive before the voltage value is pulled down to the point where the voltage may be incorrectly read.
What happens when interconnects are driven at high speeds?
The interconnect begins to behave more like a transmission line, The signal can be sent, reach the destination and reflect. The reflected signal returns after bouncing off the origin leading to a second logic event.
What is the forbidden zone in circuits?
The forbidden zone refers to either
(0threshold < V < 1threshold)
Or,
out of range (< 0V or > Vcc)
How does CMOS deal with voltages in the forbidden zone?
CMOS devices appear to behave as simple threshold devices so it can be assumed that voltages less than 0 are treated as logic ‘0’ whilst voltages greater than 1<strong>threshold</strong> are treated as logic ‘1’. For voltages in between manufacturers make no promises.
How does TTL deal with the forbidden zone?
Holding the voltage at 1V will lead to a 1MHZ oscillation on the output, the exact value depends on the system
Thus max transit time, may be specified, as a measure of how fast you are expected to transit through the zone.
Describe the logic states high and low
These are ‘disconnected but still have a value’.
They are capable of being read, like a 0 or 1, but will not fight if connected to a forcing
value. 0, 1, and X are the low impedance equivalents of L, H and Z.
Describe how the effective output impedance relates to logic values?
The effective output impedance of the driving gates: for ‘0’, ‘1’ and ‘X’, Rforce is as low as can be made practical; the corresponding fanout is high because the low value of Rforce allows Vhigh (or Vlow) to be asserted easily on the driven gates. For ‘H’, ‘L’ and ‘Z’, the output impedance (Rweak) is quite high so that if any other gate asserts a ‘0’ ‘1’ or ‘X’, it easily overcomes the high impedance
version.
How are events generated?
Outputs are generated in response to changes on inputs
How do you determine the difference between 1 and high?
To detect the difference between ‘1’ and ‘H’, . You have to have some means of loading the signal and measuring
d(signal)/d(load).
As measuring the voltage is insufficient to tell the difference.
Describe high impedance Z in computing
The voltage value is usually stored on some parasitic capacitance and will decay with time. This might sound a
bit tenuous, but it is the fundamental underlying physical principle of DRAM.
A ‘control’ or bus-driver gate have (conventional) data inputs, plus a ‘control’ input, which may be used to put the output into a high impedance state.
Describe the conflict logic state
This is an abstract logic state that unambiguously indicates a problem. It may be derived, for example, if two non-high impedance gates are connected together.
If they both assert the same value, there
is no problem: the drive capability is increased, If the two gates attempt to assert different low-impedance states (‘0’ and ‘1’, for example), then the resultant logic value will depend on the relative values of the two output impedances, but more importantly the current flowing through the two output circuits can
be arbitrarily high - the physical behaviour goes way outside the modelling intent, and in
some logic families device destruction will result. Even if a device can withstand such an insult transiently, the lifetime will be considerably compromised. Ideally, a simulation would tell you this.
Describe X (Don’t Know) State
This is a low-impedance signal (forcing) but we don’t know what the value is. Again, it cannot occur in reality - a ‘0’ is a ‘0’, a ‘1’ is a ‘1’, but a ‘X’ will be either a ‘0’ or a ‘1’.
Its existence may or may not indicate a problem; if it propagates through a system it is indicative of subtle (i.e. bad) design.
Like the conflict, you cannot measure it directly, but
also like the conflict, you want to know if you have one.
Describe U, uninitialised
This is again something you cannot measure in reality, it is a way for a
simulation to say “nothing that has ever happened has caused me to compute a value for
this signal”. Which begs the question “why is it here?”
Should you have more logic states?
Yes, VHDL has eleven distinct logic states, for example - but the more states, the more information you can extract about your design, for only a modest increase in compute.
What is the source of the Z persistence?
Most of the ‘unseen’ components that make up a system - nets, pins and so on -have a
parasitic capacitance associated with them. This capacitance stores charge which is the source.
Effect of capacitance on alogic driver
To assert a logic value usually means the driver has to
inject or remove that charge. This takes time and requires energy. It is easier, from a practical perspective, to produce a driver that is good at either injection or removal, as opposed to both.
What are the goals for memory design
- To make the user believe processes are executing simultaneously
- To make each process appear infinite memory is available and can be accessed infinitely quickly.
Describe the memory hierarchy
The memory hierarchy refers to the order of primacy for memory, i.e. which memory is used first..
Disk→Memory→Cache→Register
What is swapping in Memory?
• The OS stores a queue of processes waiting to
execute.
• As space becomes available, processes are loaded.
When a process finishes, it is removed.
• A process may be swapped out if stalled (e.g.
waiting for I/O).
Describe the idea of optimum swapping
Optimum swapping refers to maintaining a balance between too little and too much swapping. Too much and the processor is spending too much time with memory transfers.
Too little, stalled processes aren’t removed at the correct time.
What is partitioning?
Partitioning is simply a method of splitting memory into pieces. There are two types, fixed size and variable size.
Describe Fixed Size Partitioning
Fixed-size memory partitions: Easy to administer (logarithmic distribution is usually best)
Describe Variable Size Partitions
Variable-size memory partitions:
Memory allocated as required.
Fragmentation makes it harder to load incoming
processes
This leads to memory wastage..
Define Process Topology
Refers to what processes are running at what time.
Describe Physical Address
Physical addresses refer to absolute locations in memory.
Describe Logical Addresses
Logical addresses are relative to the address of the beginning of the program.
What is paging?
Paging is the process of dividing the memory of a process into fixed-size pages. Whilst physical memory is in turn divided into frames.
How are pages mapped onto frames
Pages can be mapped non-contiguously to
frames, and so does not result in memory gaps, unlike with partitioning.
Noncontiguous meaning, not placed in a consecutive manner.
Pages and Logical Addressing
Logical Addressing is more complicated, as
• For a process, a single offset is not enough anymore.
• Each process has a page table.
• Logical addresses now refer to a page, and the page table
translates the base address (logical page) to the physical
address (frame)
Why are page tables useful?
They are vital for logical addressing. As processes are divided into multiple pages. Pages that require a corresponding logical address for safe storage.
How is swapping used with pages?
Pages, not processes, are swapped in and out.
Thus, we’ve created the illusion of “infinite” memory, from the perspective of the process.
However, a paging supervisor is required for controlling swap rate.
Describe Mapping Logical to physical addressing
Logical addresses, which are used by software to reference sections of memory used by a process, function. differently in a paging system.
Logical addresses refer to a page number, which is used as a key in the page table.
The page table identifies the frame, from which a base address can be derived. The base address is combined with the offset to obtain the full physical address.
What is Page Thrashing? Why is this bad?
Page thrashing is when page faults happen too often. This refers to when a process wants a page that has been
swapped out. The OS needs to go fetch it.
This is a problem as the processor spends
a lot of time re/mapping pages to frames, as opposed to computing.
Page Table is Swapped Out
One method is, each logical memory access can require two physical accesses:
1st search through memory if page table is swapped out
Then, look up data using page table, however, this method is slow so, Translation Lookaside Buffer(TLB) is used.
The TLB is a cache that stores page table entries.
What is the Translation Lookaside Buffer?
Cache which stores recent page table entries used as pages can be swapped out.
Purpose of virtual memory
To pre-emptively get the required data into the
most accessible place, without
the user having to care.
Where can a page table be?
- The TLB
- Main memory
- Disk