Presentation on theme: "Hardware vs. Software Great Example: Data Compression"— Presentation transcript:
1Hardware vs. Software Great Example: Data Compression This lecture has a theme:Hardware/Devices are getting bigger, meaner, and faster, butSometimes clever software can make even more of a difference.Designing clever software is often much more cost effective and turn around time is faster.We’ll look at one clever piece of software that beat the hardware
2Storage UnitsOne character is represented using 8 bits Example: ‘A’ =8 bits = 1 byteKilobyte (KB) 1,000 bytesMegabyte (MB) 1,000,000 bytesGigabyte (GB) 1,000,000,000 bytesTerabyte (TB) 1,000,000,000,000 bytes (trillion)Message: Just know the differences in magnitude
3Storage Unit (Examples) A high resolution image file (jpg format) is 500 KBThe highest quality images can be as large as 10 MBYour average 100 page word document would take up about 2 or 3 MBMy 143 page Ph.D thesis takes up 6.4 MB (includes embedded pictures)Walmart’s central database is approximately 2 TB (terabytes) or so they say…Message: Just be aware of the striking difference between 2TB and 500KB. One is insignificant compared to the other
4Storage Unit (Examples) A 4 minute song (mp3 format) is about 5 MBIn an uncompressed format (wav), it would be about 60 MB (4 minute song)Message: Quality is the same. They seem close in size, but imagine waiting 5 minutes vs. 1 hour to download.CD quality songs 50 minutes (600MB).A 22 minute “South Park” video (mpg format) is 40 MB (very poor quality)A higher quality video (mpg format) can take up as much as 10 MB per minute.A 2.5 hour movie (highest quality video) 4000 MB (4 GB); Can’t fit on a regular CD
5Storage Unit (Examples) CD quality songs 50 minutes (600MB).A 22 minute “South Park” video (mpg format) is 40 MB (very poor quality)A higher quality video (mpg format) can take up as much as 10 MB per minute.A 2.5 hour movie (highest quality video) 4000 MB (4 GB); Can’t fit on a regular CDMessage: DVD’s emerged out of necessity to store video. If there was a way to compress it on a CD…?
6Storage Devices 3.5 Floppy (soon to be obsolete) 1.4 MB Zip disk: 250MB +CD ROM 700MB+DVD 5GB +Hard disks 80GB+ Special disk racks that can hold up to 500GB in a standard tower case.Message: There is a correspondence between the size of data and where its stored.
7The Real Problem: Transmission not Storage Storage devices have kept up with the demand to store larger and larger databases.and to store larger and larger media formatsThe real problem is transmitting these large files over an Internet that has severe limitations.The solution comes in two forms:Compression algorithms for files that can not be split.Fancy software and new protocols for delivering only the parts of the data that need to be sent.
8Types of ComputersHistorically, there are have been 5 different types of computersSupercomputers (once a hot area, now 90% of the companies are out of business)Custom multiple processors, complex architecture, Cray/SGI was the big playerMainframe (still going strong, go figure?)Highly fault tolerant, supports multiple users, never shuts offMinicomputers are really just smaller mainframesMicrocomputers are PC’s and laptopsGeneric components, cheap (in many ways), prone to crashWorkstations are PC’s but with expensive componentsThe buzz in the early 90’s, much better memory architecture than PC’s (Sun, SGI, HP, DEC, were the players), 1 year, 244 days and counting….Message: Nowadays, there is very little difference between the average home computer and the average computer used in business.
9Processors 8086 Intel Processor (1980) 5 MHz 8 bit 80286 Intel Processor (1984) 8 MHz 20 time faster 16 bit386 Processor (1988) 20 MHz 32 bit486 Processor (1991) 66 MHz 32 bitPentium (would have been 586) 200 MHz 64 bit (bought one in 1994 for $2400)Pentium4 (2002) 2 GHz $1500Pentium4 (2003) 3.2 GHz $1000Message: There are a lot of messages here.
10Processors Is Intel the only manufacturer of processors? No! IBM probably sells more processors but they are for other devices: cell phones, lab instruments, cars, etc.Other processor manufacturers:Apple (Mac)MotorolaAMDSun MicrosystemsPatriot ScientificMessage: Computing is not just about PC’s
11Processor Speed1 MHz means that the processor cycles (i.e., processed an instruction 1,000,000 times per second). However, this is a very basic instruction.Adding two numbers sometimes can require as many as 4 or 5 basic instructionsIn theory, a 2 GHz processor should be able to perform 2 billion instructions in just one second.In practice, it’ll do around 400 to 500 millionWhy?
12Memory Two kinds of memory: Storage and RAM Storage: Hard Disk, CDRW, Zip disk, floppyRAM (Random Access Memory): Memory chips used to store working programs and data.RAM is much much faster than storageFaster means the stored data can be delivered to the processor in less time.Message: Memory is currently the processing bottleneck. The memory can not deliver instructions to the processor fast enough.
13MiniaturizationThe key to making processors and memory faster is to make them smallerSmaller things are closer together. Thus, it takes less time for the signal to travel from one component to another.Also, if your “wires” are very small you can connect thousands or millions of wires in a small space (bandwidth)In about 6-7 years, we will reach a critical limit where it will be very very hard to make things smaller.Currently, the big buzz is nanocell computers; the processor and its connections are built with units that are as small as a molecule (several atoms).
14Where are things going Mobile computing Computers in everything: beepers, phones, cars, even the fridgeHow about a mini computer in your credit card?Its already in developmentComputers will be part of everythingX10Part of a new house, just like plumbing
15ThemeEven though processors are getting so fast and so cheap, we can NOT count on this to continue indefinitely.There are two main issues:We might hit a physical brick wall in terms of physical limitations on miniaturizationThere is a need to put computer-like processors in devices that need to bevery smallvery cheap
16ThemeThus, the industry is eventually going to have to look into clever ways of making programsmore efficientmore reliableThus, there is a need for bettersoftware engineeringmore efficient integration of hardware and software.
17Homework Skim through pages 38-60. but concentrate on (read these pages more carefully)ReadNext, we are going to study one detailed example of compression.