COS 109 Monday September 21 • Announcements – I won’t be here on Wednesday (Jewish holiday); class will be taught by Brian Kernighan – Powerpoints (in whole or abstracted) for all lectures will appear on the website after class – First assignment is available on the web site as of today (and is due next Monday September 28) – First lab is available on the web site as of today (this is early) and is due next Friday October 2 • Overview of today’s lecture – Describing the first assignment – Covering some material from Wednesday that was skipped o Largely course overview/roadmap o Some policy issues • Beginning our coverage of computer hardware About the first assignment • Monitor your use of technology – For a representative 4 hour period, monitor your usage of Computers Phones Other devices – How often do you use them and for what do you use them • Extrapolate from this – How much time you will spend on technology during your 4 years at Princeton – How much time Princeton students spend on technology per year – How much time all college students in America spend on technology per year – Translate the time spent into another activity (walking) and measure how far you could walk during the time spent on technology • Extend the gas station exercise from class in a few directions From: http://www.businessinsider.com/smartphones-in-americans-lives-2015-7 Course high level outline • hardware (3-4 weeks) • software (3-4 weeks) • networks and the impact of internetworking (3-4 weeks) • along the way – current events, history, QR, ... Course high level outline • hardware (3-4 weeks) – how computers represent and process information – what's inside a computer, how it works, how it's built – computer represents information – the universality of a computer • software (3-4 weeks) • networks and the impact of internetworking (3-4 weeks) • along the way Course high level outline • hardware (3-4 weeks) • software (3-4 weeks) – – – – how we tell computers how to do things algorithms as recipes for computations a very gentle introduction to programming in Javascript programs that make us able to write programs, run apps, … • networks and the impact of internetworking (3-4 weeks) • along the way Course high level outline • hardware (3-4 weeks) • software (3-4 weeks) • networks and the impact of internetworking (3-4 weeks) – how the Internet and Web work – protocols and routing – threats and countermeasures: security, privacy, cryptography, ... • along the way – current events, history, QR, ... Changing perceptions of the internet Peter Steiner cartoon published by The New Yorker on July 5, 1993 Who is paying for your free Internet? May 21, 2012 Leaving the analog world and becoming digital Going from analog to digital 1 0.8 0.6 0.4 A curve 0.2 0 -0.2 0 0.250.50.75 1 1.25 1.5 1.75 2 2.252.52.75 3 3.253.53.75 4 4.254.54.75 5 5.255.55.75 6 6.25 -0.4 -0.6 -0.8 -1 1 0.8 A string of numbers 0.6 0.4 0.2 0 -0.2 0 -0.4 -0.6 -0.8 -1 1 2 3 4 5 6 7 Can affect the sampling rate 1.5 1 0.5 0 0 0.4 0.8 1.2 1.6 2 2.4 2.8 3.2 3.6 4 4.4 4.8 5.2 5.6 6 -0.5 -1 -1.5 1.5 1 0.5 0 0 0.30.60.9 1.2 1.5 1.8 2.1 2.42.7 3 3.33.63.94.24.54.8 5.1 5.45.7 6 -0.5 -1 -1.5 Technologies becoming disruptive What do all of these changes have in common? Going digital [ Universal digital representation ] Music just numbers Pictures just numbers Sounds just numbers [ Universal digital representation ] Music Pictures Sounds Movies = pictures and sounds TV and radio = pictures and sounds Telephone calls = sounds (pictures for Skype) Books and newspapers = pictures and text Business records = pictures and text Classified documents = pictures and text Programs = text . . . specialized mechanisms replaced by uniform rep The impact of being digital: Copyright • music, movies, TV, games, etc., are all digital – copies are free, copies are perfect, distribution is free • technically, it's impossible to prevent copying – cryptography, watermarking, etc., don't work • legally, it's difficult to prevent copying – sensible laws are hard to write – laws are different in different countries – many countries don't protect intellectual property • warning: it's pretty easy to catch violators here – don't download copyrighted material like movies and TV shows Tracking copyright violations • Google transparency report – Google regularly receives requests from copyright owners and reporting organizations that represent them to remove search results that link to material that allegedly infringes copyrights. Each request names specific URLs to be removed, and we list the domain portions of URLs requested to be removed under specified domains. • Copyright removal requests received for search in the past month • • • • 55,702,393 URLs Requested to be Removed 80,526 Specified domains 5,991 Copyright Owners 2,683 Reporting Organizations • How many URLs are there? The impact of being digital: Privacy • data for shopping, banking, taxes, ..., is all digital – public records are increasingly digital too e.g., election contributions often include home addresses • data is easy to collect, store, copy, analyze, sell, and use for good or ill • technically, it's impossible to control access – we're vulnerable to bugs, incompetence, stupidity, theft • legally, in USA, we don't control data about ourselves – anyone can collect and sell anything about all of us – laws are different in different countries – some (but not all) countries are more restrictive And what about Ashley Madison? Last month, America's most prominent dating site for cheating spouses got egg on its face after hackers stole millions of users' private information. The stolen data reportedly included names and credit card information, photos, and sexually explicit chat logs. The hackers objected to Ashley Madison's morally dubious business model, and they tried to blackmail the site into shutting down. Ashley Madison refused to suspend its operations, so now the hackers appear to have retaliated by releasing the stolen data online. While Ashley Madison hasn't officially confirmed the data's authenticity, it appears to be genuine. That's going to cause heartburn for the millions of people who have created accounts on the site. From http://www.vox.com/2015/7/20/9007039/ashley-madison-hack-explained TORONTO (AP) — The hack of the cheating website Ashley Madison has triggered extortion crimes and led to two unconfirmed reports of suicides, Canadian police said Monday. From: http://www.usatoday.com/story/news/nation-now/2015/08/24/police-ashley-madison-hackextortion-crimes-suicides/32269699/ Ashley and the Ivies Has it happened to you? • What has already been hacked? [ Surveillance ] • Would you wear something like an ANKLE BRACELET so someone knew where you were all the time? • location tracking ("loss of locational privacy") – cell phones – ubiquitous cameras • government surveillance – NSA is monitoring pretty much everything on Internet – and on the phone system – and in your dealings with companies Security • the universal network makes us vulnerable to strangers – the Internet has no geography – it's easy to lie about who you are and where you are – the bad guys are usually far away • general-purpose computers are everywhere – "active content": web pages, email can contain programs • leads to spam, phishing, viruses, spyware, botnets, ... • it's impossible to control such programs Top 10 attacks on PU on Sept 3, 2014 It's not just computers • computers and networking are spreading into devices • devices are increasingly powerful • devices and systems are increasingly connected to the Internet: "Internet of Things" phones games consumer electronics cars planes medical systems telephone, power and other infrastructure systems weapons ... [ Big players, powerful interests ] • there's a lot of money and power at stake • governments, companies, criminals, little people • jurisdiction – countries limit Internet use (and monitor it) Google and other search engines v China online gambling in USA porn in Saudi Arabia access in lots of countries – Amazon resisted collecting state sales taxes for a long time • who has your data? – Google: gmail, docs, search history, ... GOOG has bought 27 companies so far this year – – – – Facebook: friends, pictures, relationships Amazon: everything you buy, read, watch, … will they release info for profit, for subpoena, ...? what's the answer in other countries? [ What matters and why ] • we are totally dependent on digital mechanisms – we can't just turn things off – technology won't wait while we figure out what to do – the rate of technological change is increasing • legal, economic, political and social systems change slowly – and change differently in different places • people don't change in fundamental ways – and certainly not as fast as technology does Wired Magazine July 21, 2015 What is wrong with this picture? How do we talk about a computer? • The pieces and what they do • The architecture of how the pieces fit together • The support for software that lets things happen Major pieces of a computer CPU (central processing unit) controls and processes Random Access Memory (RAM) stores instructions and data while computer is running Disks (secondary storage) Peripherals store everything when computer is off perform a variety of other tasks How the pieces fit together CPU mouse keyboard display (processor) Bus Memory (RAM) Hard disk CD/ DVD network /wireless (and many others) PC or Mac? • Why? • How does this compare to the broader world? • iPhone or Android? Different models -- PC vs Mac: who has what? Worldwide ~90% Windows Princeton students administration 75% Mac 50-60% Windows [ PC vs Mac: what operating system do people use? ] [ PC vs Mac: a comparison? ] • • • • which is better? why does Windows have ~ 90% of market? Why is Princeton different? what's different? what's the same? – what does "Intel inside" mean? • distinguish between hardware and software • why do they keep getting cheaper and faster? – how fast is that? – do they? Numbers • • • • • • • Kilo Mega Giga Tera Peta Exa Zetta 1,000 1,000,000 1,000,000,000 1,000,000,000,000 1,000,000,000,000,000 103 106 109 1012 1015 1018 1021 • • • • Milli Micro Nano Pico .0001 .0000001 .0000000001 .0000000000001 10-3 10-6 10-9 10-12 • Googol • Googolplex 10100 10googol 210 ~ 220 ~ 230 ~ 240 ~ 250 ~ 260 ~ 2019 freshman SCI computers Apple Macbook Pro 13" Retina •2.7 GHz Intel Dual Core i5 processor •13.3" retina display •Intel Iris Graphics 6100 •8 GB memory •256 GB PCI-e Flash Storage •Ethernet and VGA Adapters included •Mac OS X 10.10 Yosemite Dell XPS 13 •5th Generation Intel Core i7-5500u processor (4M Cache, up to 3.0 GHz) •13.3 inch UltraSharp QHD+ (3200x1800) Infinity Touch Display •UMA Graphics •8 GB memory •256GB Solid State Drive •Backlit Keyboard •Ethernet and VGA adapters incl. •Windows 8.1 Pro 2011 freshman offering: 2019 vs. Apple Macbook Pro 13" Retina •2.7 GHz Intel Dual Core i5 processor •13.3" retina display •Intel Iris Graphics 6100 •8 GB memory •256 GB PCI-e Flash Storage •Ethernet and VGA Adapters included •Mac OS X 10.10 Yosemite Dell XPS 13 •5th Generation Intel Core i7-5500u processor (4M Cache, up to 3.0 GHz) •13.3 inch UltraSharp QHD+ (3200x1800) Infinity Touch Display •UMA Graphics •8 GB memory •256GB Solid State Drive •Backlit Keyboard •Ethernet and VGA adapters incl. •Windows 8.1 Pro 2011 What you get in processors Processor I7-5500u Core 2 Duo Release Date January, 2015 July, 2006 Cost $393 $183 Size 4 cm x 2.4 cm 3.75 cm x 3.75 cm Transistor count 1.38 billion 295 million Line thickness 14 nm 65 nm Power requirement 15 watts Includes 65 watts Caches,graphics, • Thicknesses – 17,000 nm --- minimum width of human hair – 70,000 – 180,000 nm – thickness of paper Motherboard (~1998) Backplane (~1998) Functional design is not physical implementation • block diagram is "architectural" or "functional" or "logical" design – gives components, shows how they are connected, maybe what they do • physical construction is how it's built – usually many different ways to build same functional or logical design – will all behave more or less the same (same functions) • important general rule: the logical / functional organization does not describe a physical implementation – logical abstracts away irrelevant physical details Evolution of hardware • • • • • • fewer components (more going on inside that you can't see) more connections to outside (with finer, closer wiring) buses getting wider (more parallel wires) CPU chips have more pins, bigger heat sinks (but same size?) less handwork (automated assembly) changing countries of origin (and fewer?) Wrapup on components • the logical or functional components of computer hardware • how they fit together, what the numbers measure • some neat Greek/Latin/... prefixes: – (femto, pico,) nano, micro, milli, kilo, mega, giga, (tera, peta, exa) • what the basic physical pieces look like • one logical organization can have different physical forms • logical organization hasn't changed much in 60+ years • physical form has changed rapidly for the entire time – many tradeoffs among physical forms (size, weight, power, …)