L8 - Memory Flashcards
What is the name of the memory internal to the processor?
Registers
How is external memory accessible by the processor?
Through IO modules
Cache is a form of ______ memory.
a) internal
b) external
a) internal
In what unit is memory capacity usually expressed
Bytes
What are the four methods of accessing units of data?
Sequential access
Direct access
Random access
Associative access
Define “associative access”
Word is retrieved based on a portion of its own contents rather than its address
Each location has its own address
Constant retrieval time
Cache memory may use associative
Information can be searched by type
***SPECIAL CASE OF RANDOM ACCESS***
Define “random access”
Each location has unique, wired in address
Any location can be selected and accessed
Access time is constant - same for any location
Order unimportant
Example: Main memory, cache
Define “direct access”
Shared read-write mechanism
Individual blocks have unique physical address
Access time depends on physical position of data
Example: Harddrive (R/W Mechanism is the magnetic head)
Define “sequential access”
Memory organized into units of data calld records
Access is made linearly, i.e. one record after another
Access time depends on position of required data
Example: Tape reel
What are the three performance parameters use with regard to memory?
Access time (latency)
Memory cycle time
Transfer rate
What is the access time (latency) of a memory system?
For random-access - time taken for a read/write operation
For non-random-access memory - time taken to position the read/write mechanism at desired location
Define “memory cycle time”
Access time plus any additional time before another access can commence
Example: time for R/W Head to move back to default position or time for SSD to calculate the address/difference etc.
Concerned with system bus, not processor
Define “transfer rate” as it applies to memory systems.
Rate at which data can be transferred into or out of a memory unit
For random access memory, 1/(cycle time)
What is memory hierarchy?
Balance of cost, speed and capacity
In general, increased speed = increased cost & decreased capacity
increased capacity = decreased speed & increased price
etc.
So for a good balance can use many different memory components
Describe the process of reading from memory
1) Source address put in Memory Address Register
2) Address bus set to value of MAR
3) Control line set to “read”
4) Data bus set to value at address in MAR
5) Memory buffer register set to value of Data bus
Describe the process of writing to memory
1) Destination address put in Memory address register
2) Data to be written put in Memory buffer register
3) Address bus set to value of MAR
4) Control line set to indicate write operation
5) Data bus set to contents of MBR
6) Data at address in Address bus set to value of MBR
Cache memory is a very common modification to what?
Von Neumann Machine
Why is cache memory used?
Faster memory access because reads/writes are cached and cache memory is very fast
Describe the cache read operation
Receive Read Address from CPU
If block containing address present in cache, fetch and return it from the cache
Otherwise, fetch from the external memory and then store in the cache, using a replacement algorithm if not enough space
What are the three most common replacement algorithms
Least recently used - most effective; replace the block that was least recently used; most popular option
First-in-first-out - replace block that has been cached the longest
Least frequently used - replace block that has experienced fewest writes
What are the two write cycle schemes using the cache?
Write through - all write operations also write to the cache; bit pointless to have a cache in this case
Write back - minimises memory writes, updates only made in cache, then at some point all the blocks from the cache are written to the main memory
How do hard disks store data?
Magnetic substrate which can store a magnetic state indefinitely
What is the read/write head in a HDD made of?
Crystal.
How and why does sectore size change between tracks in a HDD?
Outermost tracks have larger sectors
What is Rotational Delay in HDDs?
Delay while the head finds the right sector
What is seek time in HDDs?
Time taken to position head at tracks
Mean seek time is 1/3*time from outermost to innermost track
What is the access time of a HDD?
Sum of seek time and rotational delay
Time it takes to get into position to read or write
How do you calculate the average rotational latency of a HDD?
Time taken for disk to rotate 180 degrees
Why is rotational speed an issue with cds?
Data density same everywhere so must spin slower at edge of disc to maintain same data rate