You are on page 1of 20

UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence

Cperaung SysLems
CMSCl 377
lnLroducuon
rashant Shenoy
Un|vers|ty of Massachuseus
Amherst
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
2
1oday's C|ass
! Crganlzauonal meeung
- Course organlzauon & ouLllne
- ollcles
- rerequlslLes & course slgn-up
! lnLro Lo Cperaung sysLems
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
3
Crgan|zanona| Informanon
! Course web page
- vlslL www.cs.umass.edu/~shenoy/courses/377
- Moodle 377 page: Lo Lurn ln asslgnmenLs, dlscusslon
forums eLc
! ConLacL lnfo
- shenoy[cs.umass.edu
! 1A: uenny Wu dennywu[cs.umass.edu
! Cradlng sLa: Armand PalberL
! ulscusslon secuon
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
rerequ|s|tes and Sy||abus
! CMSCl 230: compuLer SysLems rlnclples
! 1exLbook: Cperaung SysLem ConcepLs
(SllberschaLz,Calvln,Cagne) 7
Lh
or 8
Lh
ed
! Modern Cperaung Sys, 3
rd
ed, 1annenbaum
! Course requlremenLs
- 6 homeworks plus several ln-class asslgnmenLs, class paruclpauon (13)
- 3-4 programmlng asslgnmenLs (43)
- 3 exams (40) - Lwo mldLerms and a nal
! SLrlcL laLe pollcles and pollcles on cheaung
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
Course Crgan|zanon: M|sc
! AccounLs ln Lhe Ld-lab: 30+ Llnux-based
Cs
! ulscusslon secuon Lo help you wlLh Lab
asslgnmenLs and course concepLs
! Cmce hours:
- lnsLrucLor: MW: 10:20 - 11, CS 336 or by appL
- 1A: uenny Wu
- C hrs: 1u1hu 11:30-12:30 and locauon: 18u
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
6
Course kequ|rements
! noLe: ercenLages are sub[ecL Lo revlslon.
! rogrammlng pro[ecLs: 43
- SLrlcL laLe pollcy!
! ln-class exams: 40
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
7
Labs
! 3-4 ro[ecLs
- locus on Loplcs covered ln Lhe class
! ro[ecLs wlll use !ava
! May work ln groups of 2
! CompuLer Lab AccounLs or use your own
machlne
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
8
|ag|ar|sm
! Pw1 : slgn laglarlsm pollcy on Moodle
! Cheaung lncludes:
- 8orrowlng" code from someone
- 1hls lncludes readlng prevlous soluuons
- Clvlng code Lo someone (even nexL year)
- Copylng code from anyone (lncludlng Lhe neL)
- Plrlng someone Lo wrlLe your code
- Submlmng someone else's code as your own
- Looklng aL anyone else's code
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
Ce|| hone and Laptop o||cy
! class use pollcy: uon'L!
! Cell phones should be o or on sllenL alerL
! 1exung ls sLrlcLly prohlblLed ln class
! LapLops and LableLs may nC1 be used ln
class: no emall, browslng, facebook,
Lwluer durlng class lecLures
! enalLy of 2 polnLs per vlolauon, plus
oLher penalues
!
9
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
Course Cut||ne & 1op|cs
! rocesses and 1hreads
! Memory ManagemenL
! SLorage and llle SysLems
! ulsLrlbuLed SysLems
10
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
11
What's An Cperanng System?
! uenluon has changed over years
- Crlglnally, very bare bones
- now, lncludes more and more
! Cperaung SysLem (CS)
- lnLerface beLween Lhe user and Lhe
archlLecLure
- lmplemenLs a vlrLual machlne LhaL ls
- (hopefully) easler Lo program Lhan raw
hardware.
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
12
What's an CS? 8||| Gates says.
even
a ham sandwlch"
(SLeve 8.)
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
13
User-level Applications
Operating System
Hardware
!"#$%&' )&*+",- ",$-#.&*-
/+01"*&' )&*+",- ",$-#.&*-
CS: 1rad|nona| V|ew
! lnLerface beLween user and archlLecLure
- Pldes archlLecLural deLalls
! lmplemenLs vlrLual machlne:
- Lasler Lo program Lhan raw hardware
! llluslonlsL
- 8lgger, fasLer, rellable
! CovernmenL
- ulvldes resources
- 1axes" = overhead
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
14
New Deve|opments |n CS
! Cperaung sysLems: acuve eld of research
- uemands on CS's growlng
- new appllcauon spaces (Web, Crld, Cloud)
- 8apldly evolvlng hardware
! AdvenL of open-source operaung sysLems
- Llnux eLc.
- ?ou can conLrlbuLe Lo and develop CS's!
- LxcellenL research plauorm
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
Cperanng Sys: Sa||ent Ieatures
Services: The OS provides standard services (the
interface) which the hardware implements.
Examples: the file system, virtual memory, networking, CPU
scheduling, and time-sharing
Coordination: The OS coordinates multiple
applications and users to achieve fairness and
efficiency (throughput).
Examples: concurrency, memory protection, networking, and
security.
Goal: Design an OS so that the machine is convenient
to use (a software engineering problem) and efficient
(a system and engineering problem).
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
Why Study Cperanng Systems?
Abstraction: How to get the OS to give users an
illusion of infinite memory, CPUs, resources, world
wide computing, etc.
System Design: How to make tradeoffs between
performance and the convenience of OS abstractions,
performance and the simplicity of OS design, and
putting functionality in hardware or software.
Basic Understanding: The OS provides the services
that allow application programs to work at all.
System Intersection Point: The OS is the point where
hardware and software meet.
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
Why Study Cperanng Systems?
noL many operaung sysLems are under developmenL, so you are
unllkely Lo geL a [ob bulldlng an CS. Powever, undersLandlng
operaung sysLems wlll enable you Lo use your compuLer more
eecuvely. 1hey also serve as an excellenL example of sysLem
deslgn lssues whose resulLs and ldeas you wlll apply elsewhere.
! 8ackground: 1o undersLand Lhls course you musL have a
solld baslc undersLandlng of hardware (Cu lnsLrucuon seLs,
memory hlerarchles, l/C sysLems, eLc.) and solld programmlng
skllls (complex daLa sLrucLures, classes as an encapsulauon
mechanlsm, eLc.)
- Cbvlously, you cannoL undersLand Lhe lmpllcauons of how
componenLs lnLersecL wlLhouL undersLandlng Lhe
componenLs.
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
18
8u||d Large Computer Systems
! CS as an example of large sysLem deslgn
! Coals: lasL, rellable, large scale
! 1o bulld Lhese sysLems, you need Lo know
- Lach compuLer:
- ArchlLecLural deLalls LhaL mauer
- C and C++ (nluy grluy & more)
- Memory managemenL & locallLy
- Concurrency & schedullng
- ulsks, neLwork, le sysLems
- Across clusLer:
- Server archlLecLures
- ulsLrlbuLed compuung, le sysLems
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
19
n|story of Cperanng Systems
! And now, for some hlsLorlcal conLexL
- lrom malnframes Lo web-based sysLems
ln nlne slldes
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
20
1. S|ng|e-User Computers
! Pardware: expenslve, humans: cheap
! Cne user aL a ume on console
- lnLeracung wlLh as program runs
! CompuLer execuLes one funcuon aL a ume
- no overlap: compuLauon & l/C
! user musL be aL console Lo debug
! Muluple users = lnemclenL use of machlne
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
21
2. 8atch rocess|ng
! LxecuLe muluple [obs" ln baLch:
- Load program
- 8un
- rlnL resulLs, dump machlne sLaLe
- 8epeaL
! users submlL [obs (on cards or Lape)
! Puman schedules [obs
! Cperaung sysLem loads & runs [obs
! More emclenL use of machlne
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
22
3. Cver|ap I]C and Computanon
! 8efore: machlne walLs for l/C Lo compleLe
! new approach:
- Allow Cu Lo execuLe whlle walung
- Add buerlng
- uaLa lls buer" and Lhen ouLpuL
- and lnLerrupL handllng
- l/C evenLs Lrlgger a slgnal (lnLerrupL")
! More emclenL use of machlne
- sull one [ob aL a ume
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
23
4. Mu|nprogramm|ng
! Several programs Lo run slmulLaneously
- 8un one [ob unul l/C
- 8un anoLher [ob, eLc.
! CS manages lnLeracuons
- Whlch [obs Lo run (schedule)
- roLecLs program's memory from oLhers
- uecldes whlch Lo resume when Cu avallable
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
24
CS Comp|ex|ty
! lncreased funcuonallLy & complexlLy
! llrsL CS fallures
- Mulucs (CL & Ml1):
announced 1963, released 1969
- CS/360 released wlLh 1000 known bugs
! need Lo LreaL CS deslgn sclenucally
! Managlng complexlLy becomes key Lo.
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
23
1he kena|ssance (1970's)
! Pardware: cheap, humans: expenslve
! users share sysLem vla Lermlnals
! 1he unlx era
- Mulucs:
- army of programmers, slx years
- unlx:
- Lhree guys, Lwo years
- Shell": composable commands
- no dlsuncuon beLween programs & daLa
! 8uL: response ume & Lhrashlng
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
26
Industr|a| kevo|unon (1980's)
! Pardware very cheap,
! humans expenslve
! Wldespread use of Cs
- l8M C: 1981, MaclnLosh: 1984
! Slmple CS (uCS, MacCS)
- no muluprogrammlng,
concurrency, memory proLecuon, vlrLual memory, .
- LaLer: neLworklng, le-sharlng, remoLe prlnung.
- Cul added Lo CS (WlM")
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
27
1he Modern Lra (1990's-now)
! Pardware cheap, processlng demands
lncreaslng
! 8eal" operaung sysLems on C's
- n1 (1991), Mac CS x, Llnux
! ulerenL modallues:
- 8eal-ume: SLrlcL or loose deadllnes
- Sensor/Lmbedded: Many small compuLers
- arallel: Muluple processors, one machlne
- ulsLrlbuLed: Muluple neLworked processors
- 1hlnk 2, Lhe Web, Coogle, cloud
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
28
!"#$%&!' 1983 1999
MlS 0.3 300
cosL/Ml $100,000 $300
memory 1 M8 1 C8
neLwork 10 MblL/s 1 Cb/s
dlsk 1 C8 1 1byLe
Arch|tectura| 1rends
! 8lg Changes
- ln 30 years, almosL every compuLer
componenL now
9 orders of magnlLude fasLer, larger, cheaper
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
n|story Lesson
1hls degree of change has no counLerparL ln any oLher area of
buslness.
Lxamp|es:
! 1ransporLauon -- over Lhe lasL 200 years, we have gone from
horseback (10 mlles/hour) Lo Lhe Concorde (1000 mlles/hour) -
2 orders of magnlLude.
! Communlcauon -- aL Lhe lnvenuon of Lhe Lelephone (volce), 1v
(vldeo) and fax (LexL \& plcLures), communlcauon wenL from
Lhe speed of LransporLauon Lo nearly Lhe speed of llghL - 7
orders of magnlLude.
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
30
Crders of Magn|tude
! 10^0
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
31
Crders of Magn|tude
! 10^1
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
32
Crders of Magn|tude
! 10^2
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
33
Crders of Magn|tude
! 10^3
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
34
Crders of Magn|tude
! 10^4
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
33
Crders of Magn|tude
! 10^3
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
36
Crders of Magn|tude
! 10^6
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
37
Crders of Magn|tude
! 10^7
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
38
Crders of Magn|tude
! 10^8
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
39
Crders of Magn|tude
! 10^9
UNIVLkSI1 CI MASSACnUSL11S AMnLkS1 - Department of Computer Sc|ence
40
Com|ng Soon
! Moore's Law - runnlng ouL of sLeam
! new feaLures" comlng
- Muluple cores
- unrellable memory
- Serlous power/heaL consLralnLs
! CLher Lradeos posslble
- Compuung power for rellablllLy.

You might also like