The Fetch-Execute Cycle Fetch the next instruction Decode the instruction Get data (if needed) Execute the instruction Remember: In a vn machine, both instructions and data are stored in the same memory! 1
The Fetch-Execute Cycle 2 Read pp.130-132 of text!
RAM and ROM The memory used for the main memory (MM) of a computer is of 2 types: RAM and ROM Both can be accessed directly, i.e. in constant time, by providing a memory address. Both can be read. However, when it comes to writing
RAM and ROM Random Access Memory (RAM): can be changed (written) is volatile Read Only Memory (ROM): cannot be changed (written) is not volatile Take this with a grain of salt: Today s ROMs can be written, just not as fast as RAMs.
Secondary Storage The size of the MM (RAM+ROM) in today s computers ranges between The amounts of data we need to store are much larger! Example: Youtube video clips 20 GB Secondary storage is a.k.a. mass/volume/bulk storage. 5
Secondary Storage technologies Magnetic: drum, tape, floppy disk, hard disk (internal or external) Semiconductors: flash drive, SD card Optical: CD-R (WORM=Write Once Read Many times), DVD-R, DVD-R DL, Blue-Ray Emerging: spintronics (MRAM), Ferroelectric RAM, DNA storage, etc. 6
Other benefits of Secondary Storage Portability Reliability (backups) Modularity (add as you go) 7
The first truly mass storage device was the magnetic tape drive Magnetic Tape Tape drives have a major problem; can you spot it? Figure 5.4 A magnetic tape
The first high-volume auxiliary storage device was the magnetic tape drive 1964 2013 Image sources: http://museum.ipsj.or.jp/en/computer/device/magnetic_tape/0003.html http://www.computerhistory.org/revolution/memory-storage/8/258/1025 http://wodumedia.com/large-hadron-collider-ready-to-restart/ 1993
Magnetic Disk - HDD Platter Amount of information (bits, bytes) is the same on all tracks Disc rotates at the same angular velocity no matter which track is being read same transfer rate on all tracks! Tracks near center are more densely packed with information
QUIZ: HDD A HDD has 512 Bytes/sector, 256 sectors/track, and 10 platters. The diameter of each platter is 10 cm, and each track is 1 mm wide. Calculate the total capacity of the drive in MB. Use binary Mega!
Solution A HDD has 512 Bytes/sector, 256 sectors/track, and 10 platters. The diameter of each platter is 100mm, and each track is 1mm wide. Calculate the total capacity of the drive in MB. Use binary Mega! 125 MB
Seek time Time it takes for read/write head to be over right track Latency Time it takes for sector to be in position under R/W head Access time = Seek time + latency Transfer rate (e.g. 100 MB/s) 13
QUIZ: HDD The arm of a HDD moves at an average velocity of 40 m/s. The platter diameter is 100 mm. What are the minimum and maximum possible seek times? 14 Calculate the average seek time.
15 Calculate the average seek time. 1.25 ms Solution The arm of a HDD moves at an average velocity of 40 m/s. The platter diameter is 100 mm. What are the minimum and maximum possible seek times?
QUIZ: HDD The spindle of a HDD rotates at 7200 RPM. What are the minimum and maximum possible latencies? Calculate the average latency. 16
Solution The spindle of a HDD rotates at 7200 RPM. What are the minimum and maximum possible latencies? Calculate the average latency. 17 4.16 ms
QUIZ: HDD If the previous 2 quizzes refer to the same HDD, what is its average access time? 18
Solution If the previous 2 quizzes refer to the same HDD, what is its average access time? 4.16 ms + 1.25 ms = 5.41 ms 19 EOL3
QUIZ: HDD A file is on the HDD, on 15 consecutive blocks of the same track. Each block stores 4 KB. Average seek time = 10 ms, average latency = 5 ms. Once the first block is under the head, data is transferred at a rate of 50 MB/s. Calculate the total time needed to transfer the file. 20
Solution A file is on the HDD, on 15 consecutive blocks of the same track. Each block stores 4 KB. Average seek time = 10 ms, average latency = 5 ms. Once the first block is under the head, data is transferred at a rate of 50 MB/s. Total time needed to transfer the file: 16.23 ms 21
22 Source: http://nextshark.com/ibm-5mb-hard-drive/
Magnetic Disks - Removable Floppy disks (Why "floppy"?) Year when they first became commercially available: 1969 (8-inch) 1976 (5¼-inch) 1982 (3½-inch) 80-500 KB 87 KB-1.2 MB 1.44 MB 23
Magnetic Disks - Removable Zip disks Iomega, 1994 100 MB, 250 MB, 750 MB 24
Flash memory IBM 1998 Nonvolatile! Can be erased and rewritten But there s a rub: Flash Endurance No moving parts! Thumb drives Solid State Drives (SSD) 25
To do in notebook for next time: Calculate the cost per gigabyte for HDD and SDD 26 Source: www.newegg.com October 2013
Optical Disks CD (600 MB) A compact disk that uses a laser to read information stored optically on a plastic disk; data is evenly distributed around track CD-ROM read-only memory CD-DA digital audio CD-WORM or CD-R user can write once, read many times CD-RAM or CD-RW user can both write and read many times DVD (4.7 GB) Digital Versatile Disk, used for storing audio and video DL = dual layer 8.5 GB Blu-Ray (25 GB) DL = dual layer 50 GB 27
Your turn! How many songs can be stored on each type of optical disk? CD (600 MB) DVD (4.7 GB) Blu-Ray (25 GB) Hints: The average MP3 file is 4 MB. Use binary multipliers! 28
Solution How many songs can be stored on each type of optical disk? CD (600 MB) DVD (4.7 GB) Blu-Ray (25 GB) Hints: The average MP3 file is 4 MB. Use binary multipliers! 29
Interesting difference between magnetic and optical disks: Unlike magnetic disks, data on optical disks is uniformly packed per sector length. Tracks near the center have less data than tracks near the periphery. To ensure a uniform transfer rate, the rotation speed changes as the read/write head moves in and out! 30
Read and take notes: Touch Screens 31
5.3 Embedded Systems Computers that are dedicated to perform a narrow range of functions as part of a larger system. Every computer that doesn t have a normal display and keyboard How many embedded systems do you think are in this room? 32
Embedded systems are everywhere today! communications automotive military medical consumer/home machine control (CNC) robotics entertainment Source: http://www.gosphero.com/ Source: www/ethio-civility.com 33
5.4 Parallel Architectures Remember that a vn architecture has one main memory and one CPU. There are two ways to evolve into nonvn architectures: 1. Multiple main memories (Harward arch.) 2. Multiple CPUs, a.k.a. parallel arch. 34
Parallel Arch.: Synchronous processing One approach to parallelism is to have multiple processors apply the same program to multiple data sets, i.e. Figure 5.8 Processors in a synchronous computing environment 35
Not in text Synchronous processing example: GPU = Graphics Processing Unit It was invented by NVIDIA in 1999 36 Image source: http://tatourian.com/2013/09/03/nvidia-gpu-architecture-cuda-programming-environment/
Parallel Arch.: Pipelining Processors arranged in tandem, where each processor contributes one part to an overall computation Figure 5.9 Processors in a pipeline 37
Not in text Washer-dryer analogy 38
Not in text Train analogy 39
Find the # of steps in terms of n and k n k Hint: Concentrate on the last car! # of steps is n+k-1 40
QUIZ Pipelining A computer pipeline has 3 stages, as shown above. Each stage takes 8 ms to execute, and each instruction must go sequentially through all 3 stages. A program has 5 instructions. Calculate how long it takes to run it: without pipelining with pipelining 41
Parallel Arch.: Parallel Processor It s made of a number of vn processors which communicate through shared memory Unlike synchronous processing, there is no central control. Each CPU participates in a distributed control protocol! 42 Figure 5.10 Shared memory configuration of processors
To do in notebook for next time: Read pp.130-137 of our text and take notes Answer end-of-chapter questions 29-36, 39-43 Homework: 49, 54, 56, 63, 64 Thought Questions 3, 4 Due Monday, Oct.16 at beginning of class 43