Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 111 – Aug. 30 1.2 – 1.3 –Information arranged in memory –Types of memory –Disk properties Commitment for next day: –Read pp. 38-40, 45-47. In other.

Similar presentations


Presentation on theme: "CS 111 – Aug. 30 1.2 – 1.3 –Information arranged in memory –Types of memory –Disk properties Commitment for next day: –Read pp. 38-40, 45-47. In other."— Presentation transcript:

1 CS 111 – Aug. 30 1.2 – 1.3 –Information arranged in memory –Types of memory –Disk properties Commitment for next day: –Read pp. 38-40, 45-47. In other words, only the parts of 1.4 and 1.5 dealing with numbers and text

2 Memory units Bit = a single 0 or 1 value Nibble = 4 bits = 1 hexadecimal digit Byte = 8 bits Kilobyte (KB) = 2 10 bytes Megabyte (MB) = 2 20 bytes Gigabyte (GB) = 2 30 bytes Terabyte (TB) = 2 40 bytes 2 10 = 1024, though 1000 is a close approx.

3 CPU and memory CPU’s job is to obey instructions and do calculations Memory system stores information for current and future use –CPU has tiny number of “registers” for calculations –main memory (RAM) stores all files currently open –Secondary memory (e.g. hard drive) is for long-term storage of files –Backup system: tape, external hard drive Other types of memory: –Cache, between CPU and RAM –Removable drive, e.g. USB or DVD

4 RAM Runs on electricity: volatile but fast Each byte is numbered and addressable –Capable of holding a single character or small # AddressContents 0“c” 1“a” 2“t” 39 425 5100 ……

5 Memory comparison TypeSizeAccess timeCost per MB CPU registers256 bytes1 nsN/A Cache64 KB2 ns$ 20 RAM512 MB50 ns$ 0.20 Disk200 GB100,000 ns$ 0.0002 Numbers are approximate. “ns” means nanosecond = 1 billionth of a second

6 Disk geometry Tracks Sectors Platters Hard drive  Ex. A DVD has roughly 50,000 tracks and 40 (2KB) sectors per track.

7 Disk access time Analogous to a record player: Seek time: read-write head moves to find the correct track (up to ~ 8ms) Latency: wait for disk to rotate to beginning of file (up to ~ 4ms) Transfer: grab info from disk (e.g. 1 MB/sec read or 0.1 MB/sec write)


Download ppt "CS 111 – Aug. 30 1.2 – 1.3 –Information arranged in memory –Types of memory –Disk properties Commitment for next day: –Read pp. 38-40, 45-47. In other."

Similar presentations


Ads by Google