Computer Science, E-1

Lecture 2: Hardware, continued

September 27, 2006

Lecturer: David J. Malan

Next Week Preview:

Video: Pirates of Silicon Valley

As I mentioned last week, we will use this movie as a proxy of sorts for our lecture next week.  The movie will be here same place next week.  Distance students cannot watch this via video due to copyright issues.

·  More material on the website this week; representative of the resources available

·  Handouts from last lecture available online in PDF

·  A few additional resources: The scribe notes from last week

·  In addition thanks to Karen (Diaz), you can now read the transcription of last week’s lecture

·  Finally, the video of lecture 1 is available online

·  The real video format is now up; if you choose the highest quality version of this, you will get a streaming version of the lecture, synchronized with the slides

·  Other formats available, including podcast; [which you can] download and [are] savable to your computer

·  Flash format plays within the confines of your browser (and shows up much faster)

·  Know too, if you were overwhelmed (by the lectures), there is a workshop coming up this Saturday

·  On Videos of the Week (VOTWs) , a wonderful first set of videos; 5-15 minutes bite-sized videos (on different topics)

·  Flash is wonderful for relatively short videos

·  Example: Rei offering a 10 or so minute demonstration of upgrading a PC

·  Similar set of videos released in the futures as well

·  What you'll notice is that via the podcast’s link, [it]provides another means of accessing the course’s material via Apple’s interface

With that said, are there any questions?

I spent the weekend answering 10 or so Not Dumb questions, we are currently listing the 10 most recent questions listed on the website

Problem Set 1 is now released tonight, due Oct 11, you can submit in paper or as we prefer, submit electronically as Word document and upload the file to the website dropbox.

Final 2 announcements: tonight begins the first of the classe’s sections.  [More hands on, more intimate, more conceptual than verbal.  If you chose Wednesday’s section, you got that day, same for Saturday.]  You, not we, will get yours hands dirty.  Saturday will repeat that same process (as Wednesday’s section).  Saturday also has the option of a workshop; Workshop 1 really caters to the neophytes.

Rei’s pitch:  Even if you feel comfortable using a PC and the course’s website, I recommend coming to the workshop to lay down the foundation for further discussion.

The section will be held in B09, The workshop is at 3 pm.

What did we do last week?  What did you learn last week?

·  Binary code: the language that computers speak, 0s and 1s

·  Took apart the inside of a computer; CPU is just a piece of ceramic

·  Typically people will refer to the desktop component as ‘CPU’

·  Talked about hard drives and storages, specifically how magnetic storage works

We said that in a typical computer that there is a pathway between the CPU (the brains) and the hard drive (HD), [which] in layman’s terms, is storage, and stores it in such a way that it is permanent. In between we have another kind of memory: RAM.  RAM is used for temporal storage. [It stores things] only when you’re working on it, hard drive is for long term storage, permanent, and is not based on the computer being on.

Question: When you turn off your computer, is your RAM wiped clean? 

- Yes, so long as there is no electricity for the 0 and 1, it is wiped clean.

[Say] you are double clicking Word, the computer is temporarily loading [the program] into the RAM from the HD, then loads into the CPU, so that you get the effect of an interactive program.  If you open the file, it is stored in your HD, then temporarily in RAM, then back to HD.  If you lose power, etc. failed to save data, [it would] typically [have still been] stored in RAM ( the bits lie there until you hit ‘ctrl-s’).  How many people have lost data this way? (show of hands) Each year this [number] decreases, [as] dummy proof features are built in to back up documents.

Question: How big is a typical HD?

- 20-60 GB , up to 400 GB

Question: How many cents per GB?

- 35 cents

[With something] such as an internal HD, you can do as well as 24 cents/GB; it might seem trivial, but it can lead to savings of $10 or more [per HD]

Question: How much RAM does a typical computer have?

-   256-1024 MB aka 1 GB; you can get up 2+ GB, particularly for servers

Today’s software demands more RAM than 64 or 128MB

Question: How do you measure CPU speed?

- MHz, GHz

Question: So what’s a common speed for a CPU?

- (5400 rpms are for the HD) 700 MHz – 3 GHz

What does it mean to operate at 3 GHz?  It means that the computer is capable of doing up to 3 billion things/second.

Typically when buying a computer, it doesn’t suffice to buy a fast processor if there is a bottleneck in the RAM or HD.  Even though a lot of advertising simplifies things these days, there are a lot of other numbers that are just as if not more relevant.  Look at Apple or to put it into real world perspective

If RAM is what you really need, why is it so much smaller than your HD?  Because you don’t need to save all your permanent data in RAM and also cost.  Cost is the simplest and obvious answer, or you just don’t need [that much RAM].  RAM is faster than a hard drive because of no moving parts.  Nothing can break and anything that’s mechanical takes more times.  RAM is purely electrical, and faster.

In turns out in the pipeline, there are two other types of memories between the RAM and CPU: cache. They are in a lot of ads, but often the consumer has no control over them.  They are L1 and L2 cache.  HD - RAM - L2 (512 KB-2 MB) - L1 (32 KB -1024 KB) - CPU, in terms of ascending order.

[Cache] is usually in a form that you can’t physically see; L2 is built into the CPU or into a separate card.  L1 and L2 are not bought separately.  So why this complexity?  Computers can make use of the fact that the closer [something is] to the CPU, faster the memory and thus there are always some bits for the CPU.  It’s like a fire bucket chain: always a guy right next to the fire with water.

Question: Would this allow us to make sense of what happens when you click on something and your cursor just keeps spinning, etc.? 

There’s something called ‘virtual memory’.  How many have you virtual memory (VM)? (Show of hands) All recent modern computers have VM.  We like to run several programs at once, but computers can only run one thing at once.  A high speed CPU can make it look like it’s dooing several things at once.  When a program is dormant, it will recognize that fact and if you only have 256 MB of memory, you will run out of space for all your programs. 

Past: computers would say stop, [I can’t do anymore processes]

Today: it will tolerate and show a spinning icon. 

At some point the computer needs to make room; it will copy the 0s and 1s of the dormant programs, save to HD temporarily, and then free up space for the current program.  So RAM is faster, but if it’s constantly writing to HD, it causes a delay and the bits are slowly copying back to the RAM while the program is moving it’s way through.

[There is a] rise in expectations/needs in hardware and software; more RAM/HD for upgrades; RAM is one of the few upgrades that are worth it. Tends to be more economical to buy a new machine, but with rebates, increasing RAM or HD is most effective.  Buying a new CPU is effectively buying a new computer.

Question: What about the dual and quad CPUs these days? 

The former is more popular.  Intel core-duo, or Mac’s core-duo; all this means that inside PC and Mac, the hardware is more identical.  Dual core – higher end companies would have multiple processor computers; 2 cores, 2 in 1, don’t take very good advantage of this duality, but a benefit is that you can do 2 CPU intensive things at once.  Microsoft Word or instant messaging doesn’t use much CPU, but if you’re compiling or an anlyst, you can put the CPU intensive apps on one CPU and the rest on the other.  I.e. put background tasks on one CPU and then the rest on another.

Question: Would a CPU with a dual core of 2 700 MHz processors be better than 1 1.4 GHz?

 It depends, partly because the CPU isn’t the sole bottleneck, best way to answer that question is to go online and look at benchmark websites.  The dual core don’t run as fast, due to heat, lack of need, etc.  If you’re thinking of buying, the extra 200 MHz or so between processors is rarely worth the cost.  For a typical computer user, you might not notice.

Question: What if you had dual RAM? 

- The logic doesn’t quite apply.

Hyperthreading: feature touted by Intel, maybe by AMD as well; CPU gives illusion of being hyperthreaded or of being more CPUs than 1.  Largely a marketing things, these days just get the better hardware.

Question: Will the PS3 have 8 cores? 

Defer to Rei; could refer to the CPU or the graphic cards, graphics cards will often have their own processors to generate the illusion of real time video, etc.

Secondary storage:

·  Everything in HD, floppy drives, CDs, DVDs

·  Primary storage is RAM

How many of you defragment your computer yourself?  [Fragmenting] essentially means over time, the computer saves data in a non-contiguous way.  On a magnetic platter, it might take up a small chunk of 0s and 1s, next to other files.  Suppose that the only free space is separated from each other but you try to save something bigger than each piece.  Well, the computer will fragment the files and send each piece to a different space.  Top, middle and bottom of the platter, boils down to how quickly the head reaches the platter.

Over time, the HD will slow down if it has to reassemble the bits.  Consensus amongst researchers is that defragging tends to have little value these days due to large size of the HD.  Its value is overstated  (Picture: the more scattered the files, the more defragmenting)  Run some experiments if you like.  But I wouldn’t put so much attention on the process of defragging; more problems are less the computer and more the user.

What was virtual memory precisely?  Simply the use of HD space as though it were RAM; the process is managed behind the scenes.  Years ago, there was special software for VM.

Question: If you lose power is the data in the VM lost?

- Yes, suspect that OSes don’t handle that situation very well, unless in hibernate mode

Why hibernate mode?  Convenience (not all computers can do this, different from standby), takes the contents of RAM, puts it to the HD, and then runs everything in a very low power state

Standby mode keeps everything where it is in an even lower power state , but uses more electricity.

Question: What is safe mode?

Largely a windows term that essentially means the computer booted up without drivers and most other apps.  Basically something bad happened last time and at least lets a user get in.  Irony is that you usually cannot load the add/change hardware control panel in order to protect you. Safe mode is not ideal because typical users wouldn’t know what to do when they got there.   When you add a new hardware, you tend to need to install a driver

Driver is a piece of software that teaches your computer how to speak with your new hardware.  Apples and Windows pre-loads a lot of drivers onto their OSes, but since their release, a lot of new hardware is available and there [and new drivers are needed].

Howa bout a little video then?  (Play Cddrive1.avi about the inside of a CD-rom drive)

Question: How much space does a CD-Rom disk hold?

-   ~650-700 MB worth of data

If you buy them in stores, they are CD-Rs; ROM stands for read-only memory.  You can’t delete data from the CD; essentially pits and lands (bumps and smooth spots) that encode 0s and 1s.  On the bottom of a CD is simply plastic, so sometimes touching the top messes up the CD more.  R means recordable, but you can only write to it once.  Sometimes you just drag files to the CD drive or you can use special software.

             CD-RW – rewriteable, tends to be more expensive and cannot always be read.  CD-R is more useful and better for compatibility.  Also for sound, 74-80 minutes of music can be written.

Similarly DVD-ROMs, 4.7 GBs of storage.  Single layer, double layer, refers to angle at which data is written.  The pause/transition found in some is the laser switching from one nagel to another to read data.

Types of writeable DVDs:





*Typically, DVD-R are most compatible for wide use; tends to be best.  Honestly it‘s a disaster.

5 minute break.

At this point we’d like to pass around some sugar of our own (Smarties passed around)

PSET 1: as part of our experimentation, Apple offered an iPod t-shirt and an iPod shuffle, so if you score 75% or higher on your assignment, you are entered into a raffle to win either a t-shirt or iPod shuffle.  Both local and distance students can enter.

(DVD-ROM disc slide)

·  Slightly more technically details regarding pits and lands

·  Clearly a disparity in amount of data that can be stored between CD and DVD

How is it that DVDs can store more?  DVDs are multi-layered, so using clever light tricks, you can get to the data via special angling of the light, wavelength/frequency of light.  Narrower light packs the bits closer together, resulting in smaller pits and lands.  It packs things closer, smaller. 

(play cddrive2.avi)

Pits and lands translate into 0s and 1s.

(motherboard slide)

CPU is like the brains and the motherboard is like the nervous or central artery system.  [There are a] whole bunch of things on the motherboard.  What are the slots on the left side?  Expansion card slots.  Computers come with a lot more built in functionality, but you might want to install a TV card or something, one side plugs into the computer, the other is a port.  The 3 lower RH slots are for RAM.

Types of Expansion Card Slots:




Different types of expansion card technologies.  ISA is older and slower and in fact is not even found on most modern motherboards.  PCIe is even newer and faster.  AGP and PCIe are currently the most used for newer computers.  Important for a gaming computer (really good graphics cards run several hundred dollars)

Question: Are the PCI slots where you might put the wireless card?

 Yes, it would go in a PCI slot.  In a P-II system, AGP looks a lot like ISA, but is where the video card would have gone.

All cables are color coded lately

(Ports slide)

·  Power port

·  Keyboard/mouse (PS/2) –decreasingly so

·  USB –newer and faster, not restricted to keyboards and mice, can be shipped alongside PS/2; stupid advancement back then because humans couldn’t move any faster, but now many devices use USB.  USB hub allows you to expand your number of slots.  MP3 players, printers, dig. Cameras, thumbdrives, not memory sticks, PDAs, hard drives, cell phones, zip drives, etc. can all be connected. Most common are players, printers, cameras, and hard drives

·  Back ups are a good thing!  Not really any user friendly back up software available, but at least having an external hard drive is good.

·  Speakers, microphone, audio in – tend to be color coded

·  Parallel port, not found on Macs, still some PCs, used to be used for printers and scanners, not so much anymore

·  Serial port – joystick, modem, largely antiquated

·  VGA port

·  Not on board: S-video, DVI, and Firewire

·  Firewire –similar in spirit to USB, allows transmit of rapid data transfer, comes in Firewire 400 and 800.  800 is the faster one

·  See Computer Dictionary link/box on the left side of the website; start there for reference

·  Also Wikipedia; detailed information; wonderful resource for computer information

·  Ethernet (RJ-11) and modem (RJ-45) ports– will crimp own cable during a section

Question:How much faster is USB2 than USB? 

- According to Wikipedia, USB1 is about 1.5-12 Mb, hi-speed is 480 Mb, but USB2 is not always hi-speed

I/O devices

·  Stands for ‘ input/output’

·  Keyboard, mouse are input by humans

·  Output is from computer to human

How to shop for a computer

Question: Has Vista been released yet? 

- No, much touted in media, sort of a disaster, unclear as to the added value.  Maybe greater stability, but not sure, but mainly user interface (UI) changes.

Question: Apple vs IBM stability? 

- Numerically, Mac OS is more secure due to less exploits; partially design, partially popularity.  For the first time, with the Hodgkin’s ad, Apple advertised itself as more secure.  Even though Window’s has more viruses, there is no open source to check it.  Windows CAN be run safely.  David (DJM) used Macs till 1997, ditched, then got a MacMini and says that Mac OS X can be just as complicated.

Question: What’s the state of emulators for Windows on Apple?

- ‘Parallels’ is a type of virtual machine software; creates the illusion of another type of computer altogether.  Load up a window running the OS; Windows cannot emulate OS X.  More likely now that both OSes will coincide.

Running emulations are not as fast as the actual OS.

Bootcamp? Allows you to dual boot OSes; previously Windows and Linux could do that.  Now, Macs can boot either Mac or Windows, takes advantage of the hardware natively, but requires rebooting between OSes.

·  So many options can be overwhelming

·  Celeron: cheaper P4 processor, not enough difference for average user

·  Dell starts working on the upsell with RAM, etc.

·  Hard Drive: laptops tend to have smaller HD, due to speed, heat, etc.

·  Why do people need 100+ GB HD?  For new software (i.e. original Word came on 4 floppy disks, Microsoft Office can come on a DVD now) and also for media storage

·  How big is a typical MP3? 2-6 MB

·  Also for back ups…(HD size)

·  Optical media: DVD+; for a combo DVD-R drive, typically $20-30

·  New Egg is great for piecemeal hardware; NEC is a good brand

·  $632 CPU in August -> $280 CPU in late September

·  A typical user does not need to buy top of the line

Question: Is dual core like having two motherboards?

- No

·  MacMini: Core Duo is 1 processor with 2 cores

·  Sometimes, you can have discretion over the L2 cache; tends to be a good thing

·  L1 cache doesn’t really matter

·  ‘Combo drive’is a nice friendly way to say that it does everything

·  Does 1.66 GHz core duo mean both processors are 1.66 GHz or together they are 1.66 GHz?  Both run at 1.66 each

·  (The two models shown are) identical except for the HD and processor

·  Main question: what are you going to do with it?

·  If you use a lot of graphics programs, you’re not really a typical user, but more of a specialist

·  More pressure to buy “more” due to outdating so quickly; fancier hardware buys you a couple of extra months

·  Very small marginal difference

·  Exposure to piecemeal hardware can help safe money in long run

History of computers

[History of computers is] beyond the scope of the course, which is to keep you informed for at least a few months.

·  1943, Mark I, Harvard Science Center, first computer. 

·  Mark II, first bug was a literal bug, which became the namesake of “bugs”. 

·  1970s, Altair 8800, was not easily programmable, and thus got Jobs and Gates excited.

·  1977, Wozniak and Jobs with their motherboard and Apple II. 

·  1979, VisiCalc propelled Apple to popularity, first spreadsheet program.

·  1981, IBM, 5.25” floppy disks.

·  1984, Macintosh release, during Superbowl, the commercial aired only once.  Commercial released in doctored format later (run commercial)  At the time, IBM was “Big Blue”and thus, the commercial was blue toned.

See you next week!