Digital Logic - Wellesley College · 2018-10-24 · Digital Logic Microarchitecture Instruction Set...

3
CS 240 in context Devices (transistors, etc.) Solid-State Physics Hardware H Digital Logic Microarchitecture Instruction Set Architecture Operating System Programming Language Compiler/Interpreter Program, Application, Algorithm Software How Computers Work 1 Security + Reliability Trickiest exploits & errors involve multiple layers, even hardware! Performance Memory: clever, imperfect abstraction. Tiny code changes, huge impact. Representation No representation without taxation. Representations have costs. Abstraction Do not start every project with transistors. Abstraction is beautiful and empowering, but real abstractions have leaks and wrinkles. These things matter more every day. Translation Between layers of abstraction. Structured computation. Big Ideas in CS, Systems, and beyond 2

Transcript of Digital Logic - Wellesley College · 2018-10-24 · Digital Logic Microarchitecture Instruction Set...

Page 1: Digital Logic - Wellesley College · 2018-10-24 · Digital Logic Microarchitecture Instruction Set Architecture Operating System Programming Language Compiler/Interpreter Program,

CS240incontext

Devices(transistors,etc.)

Solid-StatePhysics

Hardware

H

DigitalLogic

Microarchitecture

InstructionSetArchitecture

OperatingSystem

ProgrammingLanguage

Compiler/Interpreter

Program,Application,Algorithm

Softw

are

HowCom

putersW

ork1

Security+ReliabilityTrickiestexploits&errors

involvemultiplelayers, evenhardware!

PerformanceMemory:clever,imperfectabstraction.

Tinycodechanges,hugeimpact.

RepresentationNorepresentationwithouttaxation.

Representationshavecosts.

AbstractionDonotstarteveryprojectwithtransistors.Abstractionisbeautifulandempowering,

butrealabstractionshaveleaksandwrinkles.

Thesethingsmattermoreeveryday.

TranslationBetweenlayersofabstraction.

Structuredcomputation.

BigIdeasinCS,Systems,andbeyond2

Page 2: Digital Logic - Wellesley College · 2018-10-24 · Digital Logic Microarchitecture Instruction Set Architecture Operating System Programming Language Compiler/Interpreter Program,

Ariane 5Rocket,1996Explodedduetocastof64-bitfloating-pointnumberto16-bitsignednumber.Overflow.

1998MarsClimateOrbiterDisintegratedduetomismatchedunitsinLockheed-Martin/NASAsoftwarecomponents.

http://www.safetyresearch.net/blog/articles/toyota-unintended-acceleration-and-big-bowl-%E2%80%9Cspaghetti%E2%80%9D-code

Toyota"UnintendedAccelerationEvents"Oklahomajury:"SpaghettiCode"="recklessdisregard"

>10,000globalvariables81,514violationsofMISRA-Ccodingrules

Expect3minorbugs+1majorbugper30violations

Task/processmonitoringfailedtomonitortasks/processesMemorycorruption

(Wait,itwaswritteninC?!?!?!)

"...aModel787airplane thathasbeenpoweredcontinuouslyfor248dayscanloseallalternatingcurrent(AC)electricalpowerduetothegeneratorcontrolunits(GCUs)simultaneouslygoingintofailsafemode...Thisconditioniscausedbyasoftwarecounter internaltotheGCUsthatwilloverflow after248days ofcontinuouspower.WeareissuingthisADtopreventlossofallACelectricalpower,whichcouldresultinlossofcontroloftheairplane."--FAA,April2015

https://xkcd.com/571/

Howcouldweimprovecomputersystems?Security

EfficiencySpeedSpaceProgrammerCost,availability

Whatasimplephonecandoforpeople:https://opendatakit.org/about/deployments/

Energy,materialsA fewoftheimpactsweusuallydon'tsee:http://www.nytimes.com/2015/06/07/magazine/making-and-unmaking-the-digital-world.html?_r=0

Reliability

Page 3: Digital Logic - Wellesley College · 2018-10-24 · Digital Logic Microarchitecture Instruction Set Architecture Operating System Programming Language Compiler/Interpreter Program,

10

(image:CCBY-SA,©WilliamHook) (image:CCBY-NC-SA,©jntolva)

(image:CCBY-SA,©KentaroIEMOTO@Tokyo)

SkillsforThinkingandProgramming

FewofyouwillbuildnewHW,OS,compiler,but…1. Effectiveprogrammersunderstandtheirtoolsandsystems.2. Theskillsandideasyoulearnhereapplyeverywhere.

Reasonaboutcomputationalmodels,translation.

Debugforcorrectnessandperformance(withtoolstohelp).

Assesscostsandlimitsofrepresentations.

"Figureitout"viadocumentation,experiments,criticalthinking.

3

CS240:Computer Systems/Organization

CS3??:OperatingSystems

CS251:ProgrammingLanguages

CS301:CompilersandRuntimeSystems

CS342:ComputerSecurity

CS3??:Computer Architecture

CS249:ScientificandParallelComputing

Research

CS242:Computer Networks

Foundations

CS349:Distributed Computing

CS304:Databases withWebInterfaces

4