23. How do different types of storage work together?#

How do you think about memory?

What was shared in common with your classmates?

What was different?

23.1. Why do we need to know about this?#

  • computers are not magic and edge cases help you see that

  • in case you want to do high performance programming

  • it’s good practice with abstraction

23.2. Hardware vs Software abstraction#

Abstraction is to remove details and use higher level units

in hardware our abstractions are less leaky becuase it is less forgiving.

software abstractions can suffer from leaks; think git- it’s hard to learn because the abstraction is leaky.

a lot of programming is designing abstractions, to get good at making something, you study examples first- good and bad- to learn what to do, and not to do.

leaky abstractions

  • the above is a blog post by one of the co-founders and the 2010-2019 CEO of Stack Overflow Joel Spolsky

23.3. How to store a value#

We need a few more components:

  • mux select one of two values

  • flip-flop hold a value until told otherwise

register

this gives us SRAM which can hold a value as long as the system has power (1963)

23.4. another way to physically store a value#

DRAM uses one transistor and one capacitor. (SRAM uses 4-6 transistors)

a capacitor holds a charge for a time, but gradually fades, so it has to be refreshed

ROM is a diode matrix traditionally

  • hardward encodes the instructions

  • cannot be changed without rewiring

PROM

  • can be reprogrammed once after device is made

  • used for firmware/microcode

EPROM or EEPROM

  • treated like ROM

  • can be erased & reprogrammed

  • but not infinitely, very limited number of tmes

  • holds value when power goes away, UV light or electriciy can re-program

SRAM:

  • is volatile; it needs power to hold a value

  • is fast

  • takes up more space on the chip (uses 4-6 transistors per bit)

  • typically used of cache and internal registers

DRAM:

  • is volatile; it needs power to hold a value

  • is slower and requires a refresh

  • is small (1 transistor + 1 capacitor per bit) and space efficient

  • used for the main RAM

Flash memory

  • non-volatile; holds a value without power, can be electircally erased and re-programmed

  • comprised of memory “cells” in layerd boards

  • memory cells are mosfets - a different type of transistor that retains a state after power is removed and put bag

  • implemented with EEPROM

  • designed for large blocks and limited writes (~10k)

  • used for ssd, usb flash drives, smartphones, etc

  • slow to write, fast to read

23.5. Prepare for Next Class#

None.

23.6. Review today’s class#

this is integrative-2

  1. Add conclusion.md to your KWL repo. In the file include 2 sections: summary with an overall description of what you learned and how this course was/not helpful to you (paragraph or bullet form is fine) key points with the top 10 thigns you want to make sure you remember from this class

  2. Reflect on how this course impacts programming/debugging skills in skillup.md. You can write this as how you think your own skill has improved or as if you are convincing another student to take this class. Touch on at least three topics.

23.7. More Practice#

this is integrative-2

  1. Create in_five_years.md and answer the following two questions: What do you think you will remember from this class in five years? What parts of this course’s content do you think will change the most in five years?

  2. Reflect on how this course impacts programming/debugging skills in skillup.md. You can write this as how you think your own skill has improved or as if you are convincing another student to take this class. Touch on at least three topics.

  3. Submit a PR with either advice to future students on how to succeed in the course or on why a student should take this course. Each of those is linked to where you should add your advice.

23.8. Experience Report Evidence#

23.9. Questions After Today’s Class#

23.9.1. What kind of tools did you use for a software defined radio?#

I worked with matlab batch processing implemented the processing of the data from scratch with C.

23.9.2. Will RAID ever be 100% fail proof?#

RAID configurations can be data failure proof as long as not too many drives die at the same time and that they are all replaced as soon as they fail.

23.9.3. Is the clock speed of a computer how fast the clock goes on and off? and is there ever an error that occours if the clock speed goes too slow?#

It is the frequency of the clock signal we will learn more about next week.

23.9.4. Do you think this area in computer science/software engineering is harder than other fields like data science or web development?#

I think they’re just different. Working with hardware is certainly a different pace.

23.9.5. Can these different types of ram not be included or are they in every computer?#

most modern computers have cache, RAM, ROM, and solid state storage. these are implemented with different types of physical memory.

23.9.6. If a computer has extensive resources would it be more effcient to never use DRAM and only use SRAM?#

This might be possible, but I am not sure.

23.9.7. What is EEPROM?#

Electrically Erasable Programmable Read Only memory

23.9.8. How does knowing the hardware/internal components of the computer help improve one’s understanding of what they’re trying to achieve as a developer for something like a program?#

It helps you think through how abstractions work and understanding what actually happens will help you deign more efficient code.

23.9.9. How much would it cost to fix a cable that a whale found itself tangled in?#

the cable is mostly burried. It gets damaged mostly by anchors of ships.

23.9.10. Is ROM still used in modern computers?#

Only for the very beginning of the boot sequence, but yes.

23.9.11. When does a kind of storage become absolete?#

That is a good question, but I do not have a precise answer.

23.9.12. When they go down to set the transatlantic cable how long does it take to get them back up?#

I do not know this and a quick search did not yeild results. Finding this is worth a commnity badge (could be expanded to an explore).