SlideShare ist ein Scribd-Unternehmen logo
1 von 73
Downloaden Sie, um offline zu lesen
Class	
  1:	
  
Introduc0on	
  
cs4414	
  Spring	
  2014	
  
rust-­‐class.org	
  
University	
  of	
  Virginia	
  
David	
  Evans	
  
Plan	
  for	
  Today	
  
•  What	
  is	
  an	
  Opera0ng	
  System?	
  
•  Course	
  Overview	
  
•  Introducing	
  Rust	
  

2	
  
What	
  is	
  an	
  Opera0ng	
  System?	
  

3	
  
An	
  opera&ng	
  system	
  is	
  a	
  program	
  that	
  
manages	
  a	
  computer’s	
  hardware.	
  It	
  also	
  
provides	
  a	
  basis	
  for	
  applica0on	
  programs	
  and	
  
acts	
  as	
  an	
  intermediary	
  between	
  the	
  computer	
  
user	
  and	
  the	
  computer	
  hardware.	
  An	
  amazing	
  
aspect	
  of	
  opera0ng	
  systems	
  is	
  how	
  they	
  vary	
  in	
  
accomplishing	
  these	
  tasks.	
  Mainframe	
  
opera0ng	
  systems	
  are	
  designed	
  primarily	
  to	
  
op0mize	
  u0liza0on	
  of	
  hardware.	
  Personal	
  
computer	
  (PC)	
  opera0ng	
  systems	
  support	
  
complex	
  games,	
  business	
  applica0ons,	
  and	
  
everything	
  in	
  between.	
  Opera0ng	
  systems	
  for	
  
mobile	
  computers	
  provide	
  an	
  environment	
  in	
  
which	
  a	
  user	
  can	
  easily	
  interface	
  with	
  the	
  
computer	
  to	
  execute	
  programs.	
  Thus,	
  some	
  
opera0ng	
  systems	
  are	
  designed	
  to	
  be	
  
convenient,	
  others	
  to	
  be	
  efficient,	
  and	
  others	
  
to	
  be	
  some	
  combina0on	
  of	
  the	
  two.	
  
4	
  
 
6.00
$18

It	
  is	
  hard	
  to	
  pin	
  down	
  what	
  
an	
  opera0ng	
  system	
  is	
  
other	
  than	
  saying	
  it	
  is	
  the	
  
so2ware	
  that	
  runs	
  in	
  
kernel	
  mode	
  –	
  and	
  even	
  
that	
  is	
  not	
  always	
  true.	
  Part	
  
of	
  the	
  problem	
  is	
  that	
  
opera0ng	
  systems	
  perform	
  
two	
  basically	
  unrelated	
  
func0ons:	
  providing	
  
applica0on	
  programmers	
  
(and	
  applica0on	
  programs,	
  
naturally)	
  a	
  clean	
  abstract	
  
set	
  of	
  resources	
  instead	
  of	
  
the	
  messy	
  hardware	
  ones	
  
and	
  managing	
  these	
  
hardware	
  resources.	
  
5	
  
What’s	
  an	
  opera0ng	
  system?	
  You	
  might	
  say	
  it’s	
  what’s	
  
between	
  you	
  and	
  the	
  hardware,	
  but	
  that	
  would	
  cover	
  
prey	
  much	
  all	
  so]ware.	
  So	
  let’s	
  say	
  it’s	
  the	
  so]ware	
  
that	
  sites	
  between	
  your	
  so]ware	
  and	
  the	
  hardware.	
  But	
  
does	
  that	
  mean	
  that	
  the	
  library	
  you	
  picked	
  up	
  from	
  some	
  
web	
  site	
  is	
  part	
  of	
  the	
  opera0ng	
  system?	
  We	
  probably	
  
want	
  our	
  opera0ng-­‐system	
  defini0on	
  to	
  be	
  a	
  bit	
  less	
  
inclusive.	
  So,	
  let’s	
  say	
  that	
  it’s	
  that	
  so2ware	
  that	
  almost	
  
everything	
  else	
  depends	
  upon.	
  This	
  is	
  s0ll	
  vague,	
  but	
  
then	
  the	
  term	
  is	
  used	
  in	
  a	
  rather	
  nebulous	
  manner	
  
throughout	
  the	
  industry.	
  
	
  
Perhaps	
  we	
  can	
  do	
  beer	
  by	
  describing	
  what	
  an	
  
opera0ng	
  system	
  is	
  actually	
  supposed	
  to	
  do.	
  From	
  a	
  
programmer’s	
  point	
  of	
  view,	
  opera&ng	
  systems	
  provide	
  
useful	
  abstrac&ons	
  of	
  the	
  underlying	
  hardware	
  
facili&es.	
  Since	
  many	
  programs	
  can	
  use	
  these	
  facili0es	
  at	
  
once,	
  the	
  opera&ng	
  system	
  is	
  also	
  responsible	
  for	
  
managing	
  how	
  these	
  facili&es	
  are	
  shared.	
  

$149.9
5	
  

6	
  
There	
  is	
  a	
  body	
  of	
  so]ware,	
  in	
  fact,	
  
that	
  is	
  responsible	
  for	
  making	
  it	
  easy	
  
to	
  run	
  programs	
  (even	
  allowing	
  you	
  
to	
  seemingly	
  run	
  many	
  at	
  the	
  same	
  
0me),	
  allowing	
  programs	
  to	
  share	
  
memory,	
  enabling	
  programs	
  to	
  
interact	
  with	
  devices,	
  and	
  other	
  fun	
  
stuff	
  like	
  that.	
  That	
  body	
  of	
  so]ware	
  
is	
  called	
  the	
  opera&ng	
  system,	
  as	
  it	
  is	
  
in	
  charge	
  of	
  making	
  sure	
  the	
  system	
  
operates	
  correctly	
  and	
  efficiently	
  in	
  
an	
  easy-­‐to-­‐use	
  manner.	
  	
  

$0.00	
  (
$29)	
  

7	
  
Do	
  we	
  like	
  any	
  of	
  
these	
  defini0ons?	
  

8	
  
hp://www.merriam-­‐webster.com/dic0onary/defini0on	
  

9	
  
Simplis0c	
  View	
  of	
  Compu0ng	
  Systems	
  

Applica0ons	
  
Opera0ng	
  System	
  
Hardware	
  
10	
  
More	
  Realis0c	
  View	
  
Applica0ons	
  
Opera0ng	
  System	
  
Hardware	
  
11	
  
cs4414	
  OS	
  Defini0on	
  
An	
  opera&ng	
  system	
  is	
  a	
  program	
  
that	
  manages	
  resources	
  and	
  
provides	
  abstrac&ons.	
  

12	
  
Main	
  Ideas	
  in	
  cs4414	
  
Managing	
  Resources	
  
	
  How	
  do	
  you	
  share	
  processors,	
  memory,	
  and	
  
	
  hardware	
  devices	
  among	
  programs?	
  
	
  
Providing	
  Abstrac&ons	
  
	
  How	
  do	
  you	
  provide	
  programs	
  with	
  clean	
  and	
  
	
  easy	
  to	
  use	
  interfaces	
  to	
  resources,	
  without	
  
	
  sacrificing	
  (too	
  much)	
  efficiency	
  and	
  flexibility?	
  
13	
  
Does	
  it	
  have	
  an	
  Opera0ng	
  System?	
  

14	
  
Apple	
  II	
  
1977	
  
15	
  
16	
  
✖ Manage	
  Resources	
  
✔	
  	
  	
  Provide	
  Abstrac0ons	
  
17	
  
18	
  
Not	
  just	
  one	
  opera0ng	
  system,	
  but	
  dozens	
  of	
  them!	
  

19	
  
Does	
  it	
  have	
  an	
  Opera0ng	
  System?	
  

20	
  
21	
  
Course	
  Overview	
  

22	
  
Cool	
  Compu0ng	
  Stuff	
  

Its	
  all	
  magic!	
  
Physics	
  

Minimizing	
  Magic	
  
23	
  
Cool	
  Compu0ng	
  Stuff	
  

Its	
  all	
  magic!	
  

Four	
  Years	
  Studying	
  
Compu0ng	
  at	
  an	
  
Elite	
  Public	
  
University	
  

Physics	
  

Minimizing	
  Magic	
  
24	
  
Cool	
  Compu0ng	
  Stuff	
  

Its	
  all	
  understandable!	
  

(and	
  I	
  can	
  do	
  magical	
  things!)	
  

Its	
  all	
  magic!	
  

Four	
  Years	
  Studying	
  
Compu0ng	
  at	
  an	
  
Elite	
  Public	
  
University	
  

Physics	
  

Minimizing	
  Magic	
  
25	
  
Cool	
  Compu0ng	
  Stuff	
  

Its	
  all	
  magic!	
  

cs1110	
  

By	
  the	
  0me	
  you	
  graduate,	
  
nothing	
  should	
  be	
  “magic”	
  
other	
  than	
  how	
  transistors	
  
work	
  and	
  NP-­‐Completeness.	
  	
  

Physics	
  

Minimizing	
  Magic	
  
26	
  
Cool	
  Compu0ng	
  Stuff	
  

cs3102	
  

Its	
  all	
  magic!	
  

cs1110	
  

cs2110	
  

cs2150	
  

By	
  the	
  0me	
  you	
  graduate,	
  
nothing	
  should	
  be	
  “magic”	
  
other	
  than	
  how	
  transistors	
  
work	
  and	
  NP-­‐Completeness.	
  	
  

cs2150	
  

cs3330	
  
cs2330	
  

Physics	
  

Minimizing	
  Magic	
  
27	
  
Cool	
  Compu0ng	
  Stuff	
  
cs4414	
  
cs3102	
  

Its	
  all	
  magic!	
  

cs1110	
  

cs2110	
  

cs2150	
  
cs4414	
  

By	
  the	
  0me	
  you	
  graduate,	
  
nothing	
  should	
  be	
  “magic”	
  
other	
  than	
  how	
  transistors	
  
work	
  and	
  NP-­‐Completeness.	
  	
  

cs2150	
  

cs3330	
  
cs4414	
  
cs2330	
  

Physics	
  

Minimizing	
  Magic	
  
28	
  
Cool	
  Compu0ng	
  Stuff	
  
elec0ves	
  
cs4414	
  
cs3102	
  

Its	
  all	
  magic!	
  

cs1110	
  

cs2110	
  
cs4610	
  
cs2150	
  
cs4414	
  

By	
  the	
  0me	
  you	
  graduate,	
  
nothing	
  should	
  be	
  “magic”	
  
other	
  than	
  how	
  transistors	
  
work	
  and	
  NP-­‐Completeness.	
  	
  

cs2150	
  

cs3330	
  
cs4414	
  
cs2330	
  

Physics	
  

Minimizing	
  Magic	
  
29	
  
(Academic)	
  Goal	
  of	
  the	
  Class	
  
Improve	
  our	
  
understanding	
  of	
  how	
  
computers	
  work.	
  	
  

30	
  
(Academic)	
  Goal	
  of	
  the	
  Class	
  
Improve	
  our	
  
understanding	
  of	
  how	
  
computers	
  work.	
  	
  
Not:	
  
31	
  
Why	
  bother?	
  
1.  Beer	
  understanding	
  of	
  how	
  computers	
  work	
  
make	
  you	
  a	
  beEer	
  programmer	
  which	
  will	
  help	
  
you	
  build	
  something	
  cool,	
  succeed	
  in	
  grad	
  
school,	
  or	
  get	
  a	
  more	
  interes0ng	
  job.	
  
2.  Beer	
  understanding	
  of	
  how	
  computers	
  work	
  
(and	
  why)	
  is	
  intellectually,	
  culturally,	
  and	
  
scien&fically	
  interes&ng.	
  

32	
  
Why	
  bother?	
  
1.  Beer	
  understanding	
  of	
  how	
  computers	
  work	
  
make	
  you	
  a	
  beEer	
  programmer	
  which	
  will	
  help	
  
you	
  build	
  something	
  cool,	
  succeed	
  in	
  grad	
  
school,	
  or	
  get	
  a	
  more	
  interes0ng	
  job.	
  
2.  Beer	
  understanding	
  of	
  how	
  computers	
  work	
  
(and	
  why)	
  is	
  intellectually,	
  culturally,	
  and	
  
scien&fically	
  interes&ng.	
  

33	
  
Why	
  bother?	
  
1.  Beer	
  understanding	
  of	
  how	
  computers	
  work	
  
make	
  you	
  a	
  beEer	
  programmer	
  which	
  will	
  help	
  
you	
  build	
  something	
  cool,	
  succeed	
  in	
  grad	
  
school,	
  or	
  get	
  a	
  more	
  interes0ng	
  job.	
  
2.  Beer	
  understanding	
  of	
  how	
  computers	
  work	
  
(and	
  why)	
  is	
  intellectually,	
  culturally,	
  and	
  
scien&fically	
  interes&ng.	
  

34	
  
Why	
  bother?	
  
1.  Beer	
  understanding	
  of	
  how	
  computers	
  work	
  
make	
  you	
  a	
  beEer	
  programmer	
  which	
  will	
  help	
  
you	
  build	
  something	
  cool,	
  succeed	
  in	
  grad	
  
school,	
  or	
  get	
  a	
  more	
  interes0ng	
  job.	
  
2.  Beer	
  understanding	
  of	
  how	
  computers	
  work	
  
(and	
  why)	
  is	
  intellectually,	
  culturally,	
  and	
  
scien&fically	
  interes&ng.	
  
If	
  these	
  reasons	
  don’t	
  apply	
  for	
  you	
  and	
  you	
  are	
  only	
  in	
  this	
  class	
  
because	
  there	
  is	
  a	
  bureaucra&c	
  requirement	
  that	
  you	
  take	
  it	
  so	
  
some	
  Dean	
  will	
  hand	
  you	
  a	
  nice	
  bit	
  of	
  paper	
  in	
  front	
  of	
  your	
  
parents,	
  you	
  should	
  meet	
  with	
  me	
  to	
  figure	
  out	
  an	
  alterna0ve.	
  
35	
  
What	
  Mr.	
  Jefferson	
  Wants	
  

36	
  
What	
  Mr.	
  Jefferson	
  Wants	
  
“We	
  wish	
  to	
  establish	
  in	
  the	
  
upper	
  country	
  of	
  Virginia,	
  and	
  
more	
  centrally	
  for	
  the	
  State,	
  a	
  
University	
  on	
  a	
  plan	
  so	
  broad	
  and	
  
liberal	
  and	
  modern,	
  as	
  to	
  be	
  
worth	
  patronizing	
  with	
  the	
  public	
  
support,	
  and	
  be	
  a	
  tempta&on	
  to	
  
the	
  youth	
  of	
  other	
  States	
  to	
  
come	
  and	
  drink…”	
  	
  
TJ’s	
  leer	
  to	
  Joseph	
  Priestly,	
  1800	
  

No	
  Majors	
  
No	
  Degrees	
  
No	
  President	
  
37	
  
Note:	
  this	
  does	
  not	
  mean	
  he	
  wants	
  you	
  to	
  be	
  lazy:	
  
:	
  

Thomas	
  Jefferson	
  enrolled	
  in	
  the	
  College	
  of	
  William	
  
and	
  Mary	
  on	
  March	
  25,	
  1760,	
  at	
  the	
  age	
  of	
  16…	
  	
  
By	
  the	
  0me	
  he	
  came	
  to	
  Williamsburg,	
  the	
  young	
  
scholar	
  was	
  proficient	
  in	
  the	
  classics	
  and	
  able	
  to	
  
read	
  Greek	
  and	
  La0n	
  authors	
  in	
  the	
  original…	
  He	
  
was	
  instructed	
  in	
  natural	
  philosophy	
  (physics,	
  
metaphysics,	
  and	
  mathema&cs)	
  and	
  moral	
  
philosophy	
  (rhetoric,	
  logic,	
  and	
  ethics).	
  A	
  keen	
  and	
  
diligent	
  student,	
  he	
  displayed	
  an	
  avid	
  curiosity	
  in	
  all	
  
fields	
  and,	
  according	
  to	
  family	
  tradi0on,	
  he	
  
frequently	
  studied	
  fi2een	
  hours	
  a	
  day.	
  	
  
38	
  
hp://www.wm.edu/about/history/tjcollege/tjcollegelife/	
  
What	
  is	
  my	
  goal	
  for	
  lectures?	
  
Convey	
  some	
  complex	
  technical	
  ideas	
  
	
  	
  
Teach	
  you	
  what	
  you	
  need	
  to	
  know	
  to	
  do	
  
the	
  projects	
  
Avoid	
  being	
  fired	
  
Keep	
  most	
  of	
  you	
  awake	
  for	
  75	
  minutes	
  
Get	
  you	
  to	
  laugh	
  at	
  dumb	
  jokes	
  
39	
  
What	
  is	
  my	
  goal	
  for	
  lectures?	
  
Lectures	
  are	
  a	
  horrible	
  medium	
  for	
  learning	
  complex	
  ideas.	
  
Convey	
  some	
  complex	
  technical	
  ideas	
   	
  	
  
Beer	
  to	
  read	
  wikipedia.	
  
	
  	
  
Teach	
  you	
  what	
  you	
  need	
  to	
  know	
  to	
  do	
  
the	
  projects	
  
Avoid	
  being	
  fired	
  
Keep	
  most	
  of	
  you	
  awake	
  for	
  75	
  minutes	
  
Get	
  you	
  to	
  laugh	
  at	
  dumb	
  jokes	
  
40	
  
What	
  is	
  my	
  goal	
  for	
  lectures?	
  
Lectures	
  are	
  a	
  horrible	
  medium	
  for	
  learning	
  complex	
  ideas.	
  
Convey	
  some	
  complex	
  technical	
  ideas	
   	
  	
  
Beer	
  to	
  read	
  wikipedia.	
  
	
  	
  
The	
  point	
  of	
  the	
  projects	
  is	
  to	
  teach	
  you	
  things	
  I	
  want	
  you	
  to	
  
Teach	
  he	
  class	
  (mostly	
  by	
  sugges0ng	
  tto	
  know	
  hould	
   o	
  
learn	
  in	
  t you	
  what	
  you	
  need	
   hings	
  you	
  s to	
  d
learn	
  o rojects	
  
the	
  pn	
  your	
  own).	
  
Avoid	
  being	
  fired	
  
Keep	
  most	
  of	
  you	
  awake	
  for	
  75	
  minutes	
  
Get	
  you	
  to	
  laugh	
  at	
  dumb	
  jokes	
  
41	
  
What	
  is	
  my	
  goal	
  for	
  lectures?	
  
Lectures	
  are	
  a	
  horrible	
  medium	
  for	
  learning	
  complex	
  ideas.	
  
Convey	
  some	
  complex	
  technical	
  ideas	
   	
  	
  
Beer	
  to	
  read	
  wikipedia.	
  
	
  	
  
The	
  point	
  of	
  the	
  projects	
  is	
  to	
  teach	
  you	
  things	
  I	
  want	
  you	
  to	
  
Teach	
  he	
  class	
  (mostly	
  by	
  sugges0ng	
  tto	
  know	
  hould	
   o	
  
learn	
  in	
  t you	
  what	
  you	
  need	
   hings	
  you	
  s to	
  d
learn	
  o rojects	
  
the	
  pn	
  your	
  own).	
  
I	
  have	
  
Avoid	
  being	
  fired	
   tenure	
  already	
  
Keep	
  most	
  of	
  you	
  awake	
  for	
  75	
  minutes	
  
Get	
  you	
  to	
  laugh	
  at	
  dumb	
  jokes	
  
42	
  
What	
  is	
  my	
  goal	
  for	
  lectures?	
  
Lectures	
  are	
  a	
  horrible	
  medium	
  for	
  learning	
  complex	
  ideas.	
  
Convey	
  some	
  complex	
  technical	
  ideas	
   	
  	
  
Beer	
  to	
  read	
  wikipedia.	
  
	
  	
  
The	
  point	
  of	
  the	
  projects	
  is	
  to	
  teach	
  you	
  things	
  I	
  want	
  you	
  to	
  
Teach	
  he	
  class	
  (mostly	
  by	
  sugges0ng	
  tto	
  know	
  hould	
   o	
  
learn	
  in	
  t you	
  what	
  you	
  need	
   hings	
  you	
  s to	
  d
learn	
  o rojects	
  
the	
  pn	
  your	
  own).	
  
I	
  have	
  
Avoid	
  being	
  fired	
   tenure	
  already	
  
You	
  probably	
  should	
  be	
  gerng	
  more	
   inutes	
  
Keep	
  most	
  of	
  you	
  awake	
  for	
  75	
  msleep!	
  
Get	
  you	
  to	
  laugh	
  at	
  dumb	
  jokes	
  
43	
  
What	
  is	
  my	
  goal	
  for	
  lectures?	
  
Lectures	
  are	
  a	
  horrible	
  medium	
  for	
  learning	
  complex	
  ideas.	
  
Convey	
  some	
  complex	
  technical	
  ideas	
   	
  	
  
Beer	
  to	
  read	
  wikipedia.	
  
	
  	
  
The	
  point	
  of	
  the	
  projects	
  is	
  to	
  teach	
  you	
  things	
  I	
  want	
  you	
  to	
  
Teach	
  he	
  class	
  (mostly	
  by	
  sugges0ng	
  tto	
  know	
  hould	
   o	
  
learn	
  in	
  t you	
  what	
  you	
  need	
   hings	
  you	
  s to	
  d
learn	
  o rojects	
  
the	
  pn	
  your	
  own).	
  
I	
  have	
  
Avoid	
  being	
  fired	
   tenure	
  already	
  
You	
  probably	
  should	
  be	
  gerng	
  more	
   inutes	
  
Keep	
  most	
  of	
  you	
  awake	
  for	
  75	
  msleep!	
  
Monty	
  Python	
  ils	
  funnier	
  (unless	
  you	
  are	
  Kevin	
  Redmon)	
  
Get	
  you	
  to	
   augh	
  at	
  dumb	
  jokes	
  
44	
  
My	
  Real	
  Goal	
  for	
  Lectures	
  
Provide	
  context	
  and	
  meaning	
  for	
  the	
  
things	
  you	
  have	
  or	
  will	
  later	
  learn	
  on	
  
your	
  own.	
  

(I	
  also	
  have	
  an	
  insidious	
  goal	
  for	
  lectures,	
  that	
  I	
  
won’t	
  tell	
  you	
  about	
  un0l	
  later…)	
  

45	
  
Course	
  Assignments	
  

46	
  
The	
  Problem	
  Sets	
  
are	
  Sugges&ons	
  
If	
  you	
  have	
  a	
  beEer	
  idea,	
  
convince	
  me,	
  and	
  you	
  
should	
  do	
  that	
  instead.	
  	
  

47	
  
Plan	
  for	
  Projects	
  
PS0	
  (Friday):	
  Rust	
  tutorial	
  and	
  course	
  survey	
  
PS1	
  (23	
  Jan):	
  zhEpto	
  web	
  server	
  
PS2	
  (9	
  Feb):	
  gash	
  (learn	
  about	
  processes)	
  
PS3	
  (3	
  March):	
  zhEa	
  web	
  server	
  (learn	
  about	
  
	
  synchroniza0on,	
  memory	
  management)	
  
PS4	
  (2	
  April):	
  hacking	
  a	
  (rela0vely	
  simple)	
  kernel	
  
	
  
48	
  
This	
  genera0on	
  of	
  students	
  got	
  into	
  “UVa”	
  by	
  
doing	
  exactly	
  and	
  precisely	
  what	
  teacher	
  
wants.	
  If	
  teacher	
  is	
  vague	
  about	
  what	
  he	
  
wants,	
  they	
  work	
  a	
  lot	
  harder	
  to	
  figure	
  out	
  
what	
  they	
  want	
  and	
  whether	
  or	
  not	
  it	
  is	
  good.	
  
The	
  vaguer	
  the	
  direc&ons,	
  the	
  more	
  likely	
  the	
  
opportunity	
  for	
  serendipity	
  to	
  happen.	
  It	
  
drives	
  them	
  nuts!	
  
Harvard	
  Professor	
  John	
  S0lgoe	
  	
  
(on	
  "60	
  Minutes",	
  4	
  January	
  2004)	
  
49	
  
Final	
  Project	
  
Final	
  Project	
  (29	
  April):	
  	
  
(almost*)	
  anything	
  you	
  want!	
  
	
  
	
  *	
  must	
  be	
  at	
  least	
  two	
  of:	
  	
  
	
   	
  fun,	
  technically	
  interes0ng,	
  	
  
	
   	
  useful,	
  relevant	
  
Start	
  thinking	
  of	
  ideas	
  now	
  –	
  if	
  you	
  come	
  up	
  with	
  something	
  
sufficiently	
  worthwhile,	
  can	
  subs0tute	
  for	
  PS4/PS3/PS2/etc.	
  
50	
  
Some	
  Examples	
  
hp://uvasear.ch/	
  
Nishant	
  Shukla	
  
Jasdev	
  Singh	
  

51	
  
Norvigtorious	
  

Alex	
  Fabian	
  
Daniel	
  Nizri	
  
Renee	
  Seaman	
  
Casey	
  Silver	
  

52	
  
IronKernel	
  

Kevin	
  Broderick	
  	
  
Alex	
  Lamana	
  	
  
Zeming	
  Lin	
  
John	
  Stevans	
  
Wil	
  Thomason	
  

We	
  will	
  use	
  this	
  for	
  PS4!	
  
53	
  
54	
  
55	
  
Kiet	
  Tran	
  
56	
  
Why	
  learn	
  a	
  
new	
  
programming	
  
language?	
  
57	
  
“Jamais	
  Jamais	
  Jamais”	
  from	
  
Harmonice	
  Musices	
  Odhecaton	
  
A.	
  (1501)	
  

J	
  S	
  Bach,	
  “Coffee	
  Cantata”,	
  
BWV	
  211	
  (1732)	
  	
  
www.npj.com/homepage/teritowe/
jsbhand.html	
  	
  

58	
  
Modern	
  Music	
  Nota0on	
  

Roman	
  Haubenstock-­‐
Rama0,	
  Concerto	
  a	
  Tre	
  	
  

John	
  Cage,	
  Fontana	
  Mix	
  
hp://www.medienkunstnetz.de/works/fontana-­‐mix/audio/1/	
  
59	
  
60	
  
61	
  
Thought	
  and	
  Ac0on	
  
Languages	
  change	
  the	
  way	
  we	
  think	
  
BASIC:	
  think	
  about	
  GOTO	
  
Algol,	
  Python:	
  think	
  about	
  assignments,	
  control	
  blocks	
  
Scheme,	
  Haskell:	
  think	
  about	
  procedures	
  
Java,	
  C++:	
  think	
  about	
  types,	
  objects	
  

Languages	
  provide	
  abstrac&ons	
  of	
  machine	
  resources	
  
–  Hide	
  dangerous/confusing	
  details:	
  memory	
  loca0ons,	
  
instruc0on	
  opcodes,	
  number	
  representa0ons,	
  calling	
  
conven0ons,	
  etc.	
  
–  Hiding	
  more	
  increases	
  simplicity,	
  but	
  limits	
  control	
  

62	
  
Why	
  so	
  many	
  programming	
  
languages?	
  

63	
  
Fundamental	
  Differences	
  
All	
  equivalently	
  powerful!	
  
–  Universal	
  languages:	
  all	
  capable	
  of	
  simula0ng	
  each	
  other	
  

Fundamental	
  differences	
  
Expressiveness:	
  how	
  easy	
  it	
  is	
  to	
  describe	
  a	
  computa0on	
  
Control:	
  how	
  much	
  programmer	
  can	
  control	
  machine	
  
“Truthiness”:	
  likelihood	
  program	
  means	
  programmer	
  wants	
  
Safeness:	
  impact	
  of	
  programmer	
  mistakes	
  

Difficult	
  to	
  achieve	
  all	
  of	
  these	
  at	
  once	
  

64	
  
Fundamental	
  Differences	
  
All	
  equivalently	
  powerful!	
  
–  Universal	
  languages:	
  all	
  capable	
  of	
  simula0ng	
  each	
  other	
  

Fundamental	
  differences	
  
Expressiveness:	
  how	
  easy	
  it	
  is	
  to	
  describe	
  a	
  computa0on	
  
Control:	
  how	
  much	
  programmer	
  can	
  control	
  machine	
  
“Truthiness”:	
  likelihood	
  program	
  means	
  programmer	
  wants	
  
Safeness:	
  impact	
  of	
  programmer	
  mistakes	
  

Difficult	
  to	
  achieve	
  all	
  of	
  these	
  at	
  once	
  

65	
  
Fundamental	
  Differences	
  
All	
  equivalently	
  powerful!	
  
–  Universal	
  languages:	
  all	
  capable	
  of	
  simula0ng	
  each	
  other	
  

Fundamental	
  differences	
  
Expressiveness:	
  how	
  easy	
  it	
  is	
  to	
  describe	
  a	
  computa0on	
  
Control:	
  how	
  much	
  programmer	
  can	
  control	
  machine	
  
“Truthiness”:	
  likelihood	
  program	
  means	
  programmer	
  wants	
  
Safeness:	
  minimize	
  impact	
  of	
  programmer	
  mistakes	
  

Difficult	
  to	
  achieve	
  all	
  of	
  these	
  at	
  once	
  

66	
  
Fundamental	
  Differences	
  
All	
  equivalently	
  powerful!	
  
–  Universal	
  languages:	
  all	
  capable	
  of	
  simula0ng	
  each	
  other	
  

Fundamental	
  differences	
  
Expressiveness:	
  how	
  easy	
  it	
  is	
  to	
  describe	
  a	
  computa0on	
  
Control:	
  how	
  much	
  programmer	
  can	
  control	
  machine	
  
“Truthiness”:	
  likelihood	
  program	
  means	
  programmer	
  wants	
  
Safeness:	
  minimize	
  impact	
  of	
  programmer	
  mistakes	
  

Difficult	
  to	
  achieve	
  all	
  of	
  these	
  at	
  once	
  
What	
  do	
  we	
  want	
  for	
  systems	
  programming?	
  
67	
  
Programming	
  Language	
  Design	
  Space	
  

Expressiveness	
  

high	
  

low	
  
more	
  mistake	
  prone	
  

less	
  mistake	
  prone	
  

“Truthiness”	
  
68	
  
Programming	
  Language	
  Design	
  Space	
  

Expressiveness	
  

high	
  

Scheme
Python

(display “Hello!”)
print ("Hello!")

BASIC

C

strict	
  typing,	
  
sta0c	
  

C++
Java

Ada
Spec#

low	
  
more	
  mistake	
  prone	
  

less	
  mistake	
  prone	
  

“Truthiness”	
  
69	
  
Programming	
  Language	
  Design	
  Space	
  

Control	
  

high	
  

low	
  
very	
  risky	
  

Safety	
  

fairly	
  safe	
  
70	
  
Programming	
  Language	
  Design	
  Space	
  

high	
  

Control	
  

C

Java
Python
low	
  
very	
  risky	
  

Safety	
  

fairly	
  safe	
  
71	
  
“a	
  safe,	
  concurrent,	
  prac0cal	
  language”	
  
Its	
  design	
  is	
  oriented	
  toward	
  
concerns	
  of	
  “programming	
  in	
  the	
  
large”,	
  that	
  is,	
  of	
  crea0ng	
  and	
  
	
  
	
  
maintaining	
  boundaries	
  –	
  both	
  
	
  
abstract	
  and	
  opera0onal	
  –	
  that	
  
preserve	
  large-­‐system	
  integrity,	
  
availability	
  and	
  concurrency.	
  
	
  

from	
  hp://www.rust-­‐lang.org/	
  

Rust	
  

Advances	
  in	
  programming	
  language	
  design	
  and	
  compiler	
  
implementa0on	
  make	
  it	
  possible	
  to	
  get	
  both	
  control	
  and	
  safety,	
  and	
  
mostly	
  get	
  expressiveness	
  and	
  “truthiness”	
  all	
  at	
  the	
  same	
  0me!	
  
72	
  
Charge	
  
Bring	
  a	
  laptop	
  to	
  use	
  in	
  Thursday’s	
  class!	
  

•  Do	
  (or	
  at	
  least	
  aempt)	
  everything	
  on	
  the	
  Class	
  1	
  
notes	
  Ac&on	
  Items	
  before	
  class	
  Thursday	
  
–  Download	
  and	
  setup	
  your	
  compu0ng	
  environment	
  for	
  
cs4414	
  
–  Setup	
  your	
  github	
  account	
  

•  Next	
  class:	
  
–  Help	
  gerng	
  everything	
  working	
  on	
  your	
  machine	
  
–  Help	
  gerng	
  started	
  with	
  Rust	
  (Rust	
  tutorial)	
  
73	
  

Weitere ähnliche Inhalte

Was ist angesagt?

Kernel-Level Programming: Entering Ring Naught
Kernel-Level Programming: Entering Ring NaughtKernel-Level Programming: Entering Ring Naught
Kernel-Level Programming: Entering Ring NaughtDavid Evans
 
Bakers and Philosophers
Bakers and PhilosophersBakers and Philosophers
Bakers and PhilosophersDavid Evans
 
Kernel Recipes 2019 - Faster IO through io_uring
Kernel Recipes 2019 - Faster IO through io_uringKernel Recipes 2019 - Faster IO through io_uring
Kernel Recipes 2019 - Faster IO through io_uringAnne Nicolas
 
What Linux can learn from Solaris performance and vice-versa
What Linux can learn from Solaris performance and vice-versaWhat Linux can learn from Solaris performance and vice-versa
What Linux can learn from Solaris performance and vice-versaBrendan Gregg
 
System call (Fork +Exec)
System call (Fork +Exec)System call (Fork +Exec)
System call (Fork +Exec)Amit Ghosh
 
Coding for multiple cores
Coding for multiple coresCoding for multiple cores
Coding for multiple coresLee Hanxue
 
Lockless Programming GDC 09
Lockless Programming GDC 09Lockless Programming GDC 09
Lockless Programming GDC 09Lee Hanxue
 
java memory management & gc
java memory management & gcjava memory management & gc
java memory management & gcexsuns
 
Optimizing Parallel Reduction in CUDA : NOTES
Optimizing Parallel Reduction in CUDA : NOTESOptimizing Parallel Reduction in CUDA : NOTES
Optimizing Parallel Reduction in CUDA : NOTESSubhajit Sahu
 
BlinkDB and G-OLA: Supporting Continuous Answers with Error Bars in SparkSQL-...
BlinkDB and G-OLA: Supporting Continuous Answers with Error Bars in SparkSQL-...BlinkDB and G-OLA: Supporting Continuous Answers with Error Bars in SparkSQL-...
BlinkDB and G-OLA: Supporting Continuous Answers with Error Bars in SparkSQL-...Spark Summit
 
Solaris DTrace, An Introduction
Solaris DTrace, An IntroductionSolaris DTrace, An Introduction
Solaris DTrace, An Introductionsatyajit_t
 
Real-time streams and logs with Storm and Kafka
Real-time streams and logs with Storm and KafkaReal-time streams and logs with Storm and Kafka
Real-time streams and logs with Storm and KafkaAndrew Montalenti
 
[251] implementing deep learning using cu dnn
[251] implementing deep learning using cu dnn[251] implementing deep learning using cu dnn
[251] implementing deep learning using cu dnnNAVER D2
 

Was ist angesagt? (19)

Kernel-Level Programming: Entering Ring Naught
Kernel-Level Programming: Entering Ring NaughtKernel-Level Programming: Entering Ring Naught
Kernel-Level Programming: Entering Ring Naught
 
Bakers and Philosophers
Bakers and PhilosophersBakers and Philosophers
Bakers and Philosophers
 
Synchronization
SynchronizationSynchronization
Synchronization
 
Kernel Recipes 2019 - Faster IO through io_uring
Kernel Recipes 2019 - Faster IO through io_uringKernel Recipes 2019 - Faster IO through io_uring
Kernel Recipes 2019 - Faster IO through io_uring
 
Spanner
SpannerSpanner
Spanner
 
What Linux can learn from Solaris performance and vice-versa
What Linux can learn from Solaris performance and vice-versaWhat Linux can learn from Solaris performance and vice-versa
What Linux can learn from Solaris performance and vice-versa
 
System call (Fork +Exec)
System call (Fork +Exec)System call (Fork +Exec)
System call (Fork +Exec)
 
Booklet
BookletBooklet
Booklet
 
Coding for multiple cores
Coding for multiple coresCoding for multiple cores
Coding for multiple cores
 
Google Spanner
Google SpannerGoogle Spanner
Google Spanner
 
Lockless Programming GDC 09
Lockless Programming GDC 09Lockless Programming GDC 09
Lockless Programming GDC 09
 
java memory management & gc
java memory management & gcjava memory management & gc
java memory management & gc
 
Spanner (may 19)
Spanner (may 19)Spanner (may 19)
Spanner (may 19)
 
Optimizing Parallel Reduction in CUDA : NOTES
Optimizing Parallel Reduction in CUDA : NOTESOptimizing Parallel Reduction in CUDA : NOTES
Optimizing Parallel Reduction in CUDA : NOTES
 
Spanner osdi2012
Spanner osdi2012Spanner osdi2012
Spanner osdi2012
 
BlinkDB and G-OLA: Supporting Continuous Answers with Error Bars in SparkSQL-...
BlinkDB and G-OLA: Supporting Continuous Answers with Error Bars in SparkSQL-...BlinkDB and G-OLA: Supporting Continuous Answers with Error Bars in SparkSQL-...
BlinkDB and G-OLA: Supporting Continuous Answers with Error Bars in SparkSQL-...
 
Solaris DTrace, An Introduction
Solaris DTrace, An IntroductionSolaris DTrace, An Introduction
Solaris DTrace, An Introduction
 
Real-time streams and logs with Storm and Kafka
Real-time streams and logs with Storm and KafkaReal-time streams and logs with Storm and Kafka
Real-time streams and logs with Storm and Kafka
 
[251] implementing deep learning using cu dnn
[251] implementing deep learning using cu dnn[251] implementing deep learning using cu dnn
[251] implementing deep learning using cu dnn
 

Ähnlich wie Class 1: What is an Operating System?

Operating System Structure Of A Single Large Executable...
Operating System Structure Of A Single Large Executable...Operating System Structure Of A Single Large Executable...
Operating System Structure Of A Single Large Executable...Jennifer Lopez
 
Class 1: Introduction - What is an Operating System?
Class 1: Introduction - What is an Operating System?Class 1: Introduction - What is an Operating System?
Class 1: Introduction - What is an Operating System?David Evans
 
Cs504 handouts 1_45
Cs504 handouts 1_45Cs504 handouts 1_45
Cs504 handouts 1_45Ahsan Younis
 
From Duke of DevOps to Queen of Chaos - Api days 2018
From Duke of DevOps to Queen of Chaos - Api days 2018From Duke of DevOps to Queen of Chaos - Api days 2018
From Duke of DevOps to Queen of Chaos - Api days 2018Christophe Rochefolle
 
Growing as a software craftsperson (part 2) From Pune Software Craftsmanship
Growing as a software craftsperson (part 2) From Pune Software CraftsmanshipGrowing as a software craftsperson (part 2) From Pune Software Craftsmanship
Growing as a software craftsperson (part 2) From Pune Software CraftsmanshipDattatray Kale
 
Functional training day1
Functional training day1Functional training day1
Functional training day1Satyamitra maan
 
An illustrated guide to microservices (boston python meetup - Aug 2016)
An illustrated guide to microservices (boston python meetup - Aug 2016)An illustrated guide to microservices (boston python meetup - Aug 2016)
An illustrated guide to microservices (boston python meetup - Aug 2016)Ambassador Labs
 
The range and scope of computer applications
The range and scope of computer applicationsThe range and scope of computer applications
The range and scope of computer applicationsMirza Ćutuk
 
An illustrated guide to microservices (ploneconf 10 21-2016)
An illustrated guide to microservices (ploneconf 10 21-2016)An illustrated guide to microservices (ploneconf 10 21-2016)
An illustrated guide to microservices (ploneconf 10 21-2016)Ambassador Labs
 
Microcontroladores: comencemos la programación de imágenes usando microcontro...
Microcontroladores: comencemos la programación de imágenes usando microcontro...Microcontroladores: comencemos la programación de imágenes usando microcontro...
Microcontroladores: comencemos la programación de imágenes usando microcontro...SANTIAGO PABLO ALBERTO
 
Information Technology
Information TechnologyInformation Technology
Information TechnologyAshna Rajput
 
IRJET- Smart System to Aid Blind People
IRJET- Smart System to Aid Blind PeopleIRJET- Smart System to Aid Blind People
IRJET- Smart System to Aid Blind PeopleIRJET Journal
 
MiniOS: an instructional platform for teaching operating systems labs
MiniOS: an instructional platform for teaching operating systems labsMiniOS: an instructional platform for teaching operating systems labs
MiniOS: an instructional platform for teaching operating systems labsRafael Roman Otero
 
Os rtos.ppt
Os rtos.pptOs rtos.ppt
Os rtos.pptrahul km
 
Metaphors In It(2003)
Metaphors In It(2003)Metaphors In It(2003)
Metaphors In It(2003)dejure
 
Making Observability Actionable At Scale - DBS DevConnect 2019
Making Observability Actionable At Scale - DBS DevConnect 2019Making Observability Actionable At Scale - DBS DevConnect 2019
Making Observability Actionable At Scale - DBS DevConnect 2019Squadcast Inc
 
Linux Assignment 3
Linux Assignment 3Linux Assignment 3
Linux Assignment 3Diane Allen
 

Ähnlich wie Class 1: What is an Operating System? (20)

C q 2
C q 2C q 2
C q 2
 
Operating System Structure Of A Single Large Executable...
Operating System Structure Of A Single Large Executable...Operating System Structure Of A Single Large Executable...
Operating System Structure Of A Single Large Executable...
 
Class 1: Introduction - What is an Operating System?
Class 1: Introduction - What is an Operating System?Class 1: Introduction - What is an Operating System?
Class 1: Introduction - What is an Operating System?
 
CS504 Updated Handouts.pdf
CS504 Updated Handouts.pdfCS504 Updated Handouts.pdf
CS504 Updated Handouts.pdf
 
Cs504 handouts 1_45
Cs504 handouts 1_45Cs504 handouts 1_45
Cs504 handouts 1_45
 
From Duke of DevOps to Queen of Chaos - Api days 2018
From Duke of DevOps to Queen of Chaos - Api days 2018From Duke of DevOps to Queen of Chaos - Api days 2018
From Duke of DevOps to Queen of Chaos - Api days 2018
 
Growing as a software craftsperson (part 2) From Pune Software Craftsmanship
Growing as a software craftsperson (part 2) From Pune Software CraftsmanshipGrowing as a software craftsperson (part 2) From Pune Software Craftsmanship
Growing as a software craftsperson (part 2) From Pune Software Craftsmanship
 
Functional training day1
Functional training day1Functional training day1
Functional training day1
 
An illustrated guide to microservices (boston python meetup - Aug 2016)
An illustrated guide to microservices (boston python meetup - Aug 2016)An illustrated guide to microservices (boston python meetup - Aug 2016)
An illustrated guide to microservices (boston python meetup - Aug 2016)
 
The range and scope of computer applications
The range and scope of computer applicationsThe range and scope of computer applications
The range and scope of computer applications
 
An illustrated guide to microservices (ploneconf 10 21-2016)
An illustrated guide to microservices (ploneconf 10 21-2016)An illustrated guide to microservices (ploneconf 10 21-2016)
An illustrated guide to microservices (ploneconf 10 21-2016)
 
Microcontroladores: comencemos la programación de imágenes usando microcontro...
Microcontroladores: comencemos la programación de imágenes usando microcontro...Microcontroladores: comencemos la programación de imágenes usando microcontro...
Microcontroladores: comencemos la programación de imágenes usando microcontro...
 
Information Technology
Information TechnologyInformation Technology
Information Technology
 
IRJET- Smart System to Aid Blind People
IRJET- Smart System to Aid Blind PeopleIRJET- Smart System to Aid Blind People
IRJET- Smart System to Aid Blind People
 
MiniOS: an instructional platform for teaching operating systems labs
MiniOS: an instructional platform for teaching operating systems labsMiniOS: an instructional platform for teaching operating systems labs
MiniOS: an instructional platform for teaching operating systems labs
 
Wk 8
Wk 8 Wk 8
Wk 8
 
Os rtos.ppt
Os rtos.pptOs rtos.ppt
Os rtos.ppt
 
Metaphors In It(2003)
Metaphors In It(2003)Metaphors In It(2003)
Metaphors In It(2003)
 
Making Observability Actionable At Scale - DBS DevConnect 2019
Making Observability Actionable At Scale - DBS DevConnect 2019Making Observability Actionable At Scale - DBS DevConnect 2019
Making Observability Actionable At Scale - DBS DevConnect 2019
 
Linux Assignment 3
Linux Assignment 3Linux Assignment 3
Linux Assignment 3
 

Mehr von David Evans

Cryptocurrency Jeopardy!
Cryptocurrency Jeopardy!Cryptocurrency Jeopardy!
Cryptocurrency Jeopardy!David Evans
 
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for CypherpunksTrick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for CypherpunksDavid Evans
 
Hidden Services, Zero Knowledge
Hidden Services, Zero KnowledgeHidden Services, Zero Knowledge
Hidden Services, Zero KnowledgeDavid Evans
 
Anonymity in Bitcoin
Anonymity in BitcoinAnonymity in Bitcoin
Anonymity in BitcoinDavid Evans
 
Midterm Confirmations
Midterm ConfirmationsMidterm Confirmations
Midterm ConfirmationsDavid Evans
 
Scripting Transactions
Scripting TransactionsScripting Transactions
Scripting TransactionsDavid Evans
 
How to Live in Paradise
How to Live in ParadiseHow to Live in Paradise
How to Live in ParadiseDavid Evans
 
Mining Economics
Mining EconomicsMining Economics
Mining EconomicsDavid Evans
 
Becoming More Paranoid
Becoming More ParanoidBecoming More Paranoid
Becoming More ParanoidDavid Evans
 
Asymmetric Key Signatures
Asymmetric Key SignaturesAsymmetric Key Signatures
Asymmetric Key SignaturesDavid Evans
 
Introduction to Cryptography
Introduction to CryptographyIntroduction to Cryptography
Introduction to CryptographyDavid Evans
 
Class 1: What is Money?
Class 1: What is Money?Class 1: What is Money?
Class 1: What is Money?David Evans
 
Multi-Party Computation for the Masses
Multi-Party Computation for the MassesMulti-Party Computation for the Masses
Multi-Party Computation for the MassesDavid Evans
 
Proof of Reserve
Proof of ReserveProof of Reserve
Proof of ReserveDavid Evans
 
Blooming Sidechains!
Blooming Sidechains!Blooming Sidechains!
Blooming Sidechains!David Evans
 
Useful Proofs of Work, Permacoin
Useful Proofs of Work, PermacoinUseful Proofs of Work, Permacoin
Useful Proofs of Work, PermacoinDavid Evans
 

Mehr von David Evans (20)

Cryptocurrency Jeopardy!
Cryptocurrency Jeopardy!Cryptocurrency Jeopardy!
Cryptocurrency Jeopardy!
 
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for CypherpunksTrick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
 
Hidden Services, Zero Knowledge
Hidden Services, Zero KnowledgeHidden Services, Zero Knowledge
Hidden Services, Zero Knowledge
 
Anonymity in Bitcoin
Anonymity in BitcoinAnonymity in Bitcoin
Anonymity in Bitcoin
 
Midterm Confirmations
Midterm ConfirmationsMidterm Confirmations
Midterm Confirmations
 
Scripting Transactions
Scripting TransactionsScripting Transactions
Scripting Transactions
 
How to Live in Paradise
How to Live in ParadiseHow to Live in Paradise
How to Live in Paradise
 
Bitcoin Script
Bitcoin ScriptBitcoin Script
Bitcoin Script
 
Mining Economics
Mining EconomicsMining Economics
Mining Economics
 
Mining
MiningMining
Mining
 
The Blockchain
The BlockchainThe Blockchain
The Blockchain
 
Becoming More Paranoid
Becoming More ParanoidBecoming More Paranoid
Becoming More Paranoid
 
Asymmetric Key Signatures
Asymmetric Key SignaturesAsymmetric Key Signatures
Asymmetric Key Signatures
 
Introduction to Cryptography
Introduction to CryptographyIntroduction to Cryptography
Introduction to Cryptography
 
Class 1: What is Money?
Class 1: What is Money?Class 1: What is Money?
Class 1: What is Money?
 
Multi-Party Computation for the Masses
Multi-Party Computation for the MassesMulti-Party Computation for the Masses
Multi-Party Computation for the Masses
 
Proof of Reserve
Proof of ReserveProof of Reserve
Proof of Reserve
 
Silk Road
Silk RoadSilk Road
Silk Road
 
Blooming Sidechains!
Blooming Sidechains!Blooming Sidechains!
Blooming Sidechains!
 
Useful Proofs of Work, Permacoin
Useful Proofs of Work, PermacoinUseful Proofs of Work, Permacoin
Useful Proofs of Work, Permacoin
 

Kürzlich hochgeladen

Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 

Kürzlich hochgeladen (20)

Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 

Class 1: What is an Operating System?

  • 1. Class  1:   Introduc0on   cs4414  Spring  2014   rust-­‐class.org   University  of  Virginia   David  Evans  
  • 2. Plan  for  Today   •  What  is  an  Opera0ng  System?   •  Course  Overview   •  Introducing  Rust   2  
  • 3. What  is  an  Opera0ng  System?   3  
  • 4. An  opera&ng  system  is  a  program  that   manages  a  computer’s  hardware.  It  also   provides  a  basis  for  applica0on  programs  and   acts  as  an  intermediary  between  the  computer   user  and  the  computer  hardware.  An  amazing   aspect  of  opera0ng  systems  is  how  they  vary  in   accomplishing  these  tasks.  Mainframe   opera0ng  systems  are  designed  primarily  to   op0mize  u0liza0on  of  hardware.  Personal   computer  (PC)  opera0ng  systems  support   complex  games,  business  applica0ons,  and   everything  in  between.  Opera0ng  systems  for   mobile  computers  provide  an  environment  in   which  a  user  can  easily  interface  with  the   computer  to  execute  programs.  Thus,  some   opera0ng  systems  are  designed  to  be   convenient,  others  to  be  efficient,  and  others   to  be  some  combina0on  of  the  two.   4  
  • 5.   6.00 $18 It  is  hard  to  pin  down  what   an  opera0ng  system  is   other  than  saying  it  is  the   so2ware  that  runs  in   kernel  mode  –  and  even   that  is  not  always  true.  Part   of  the  problem  is  that   opera0ng  systems  perform   two  basically  unrelated   func0ons:  providing   applica0on  programmers   (and  applica0on  programs,   naturally)  a  clean  abstract   set  of  resources  instead  of   the  messy  hardware  ones   and  managing  these   hardware  resources.   5  
  • 6. What’s  an  opera0ng  system?  You  might  say  it’s  what’s   between  you  and  the  hardware,  but  that  would  cover   prey  much  all  so]ware.  So  let’s  say  it’s  the  so]ware   that  sites  between  your  so]ware  and  the  hardware.  But   does  that  mean  that  the  library  you  picked  up  from  some   web  site  is  part  of  the  opera0ng  system?  We  probably   want  our  opera0ng-­‐system  defini0on  to  be  a  bit  less   inclusive.  So,  let’s  say  that  it’s  that  so2ware  that  almost   everything  else  depends  upon.  This  is  s0ll  vague,  but   then  the  term  is  used  in  a  rather  nebulous  manner   throughout  the  industry.     Perhaps  we  can  do  beer  by  describing  what  an   opera0ng  system  is  actually  supposed  to  do.  From  a   programmer’s  point  of  view,  opera&ng  systems  provide   useful  abstrac&ons  of  the  underlying  hardware   facili&es.  Since  many  programs  can  use  these  facili0es  at   once,  the  opera&ng  system  is  also  responsible  for   managing  how  these  facili&es  are  shared.   $149.9 5   6  
  • 7. There  is  a  body  of  so]ware,  in  fact,   that  is  responsible  for  making  it  easy   to  run  programs  (even  allowing  you   to  seemingly  run  many  at  the  same   0me),  allowing  programs  to  share   memory,  enabling  programs  to   interact  with  devices,  and  other  fun   stuff  like  that.  That  body  of  so]ware   is  called  the  opera&ng  system,  as  it  is   in  charge  of  making  sure  the  system   operates  correctly  and  efficiently  in   an  easy-­‐to-­‐use  manner.     $0.00  ( $29)   7  
  • 8. Do  we  like  any  of   these  defini0ons?   8  
  • 10. Simplis0c  View  of  Compu0ng  Systems   Applica0ons   Opera0ng  System   Hardware   10  
  • 11. More  Realis0c  View   Applica0ons   Opera0ng  System   Hardware   11  
  • 12. cs4414  OS  Defini0on   An  opera&ng  system  is  a  program   that  manages  resources  and   provides  abstrac&ons.   12  
  • 13. Main  Ideas  in  cs4414   Managing  Resources    How  do  you  share  processors,  memory,  and    hardware  devices  among  programs?     Providing  Abstrac&ons    How  do  you  provide  programs  with  clean  and    easy  to  use  interfaces  to  resources,  without    sacrificing  (too  much)  efficiency  and  flexibility?   13  
  • 14. Does  it  have  an  Opera0ng  System?   14  
  • 15. Apple  II   1977   15  
  • 16. 16  
  • 17. ✖ Manage  Resources   ✔      Provide  Abstrac0ons   17  
  • 18. 18  
  • 19. Not  just  one  opera0ng  system,  but  dozens  of  them!   19  
  • 20. Does  it  have  an  Opera0ng  System?   20  
  • 21. 21  
  • 23. Cool  Compu0ng  Stuff   Its  all  magic!   Physics   Minimizing  Magic   23  
  • 24. Cool  Compu0ng  Stuff   Its  all  magic!   Four  Years  Studying   Compu0ng  at  an   Elite  Public   University   Physics   Minimizing  Magic   24  
  • 25. Cool  Compu0ng  Stuff   Its  all  understandable!   (and  I  can  do  magical  things!)   Its  all  magic!   Four  Years  Studying   Compu0ng  at  an   Elite  Public   University   Physics   Minimizing  Magic   25  
  • 26. Cool  Compu0ng  Stuff   Its  all  magic!   cs1110   By  the  0me  you  graduate,   nothing  should  be  “magic”   other  than  how  transistors   work  and  NP-­‐Completeness.     Physics   Minimizing  Magic   26  
  • 27. Cool  Compu0ng  Stuff   cs3102   Its  all  magic!   cs1110   cs2110   cs2150   By  the  0me  you  graduate,   nothing  should  be  “magic”   other  than  how  transistors   work  and  NP-­‐Completeness.     cs2150   cs3330   cs2330   Physics   Minimizing  Magic   27  
  • 28. Cool  Compu0ng  Stuff   cs4414   cs3102   Its  all  magic!   cs1110   cs2110   cs2150   cs4414   By  the  0me  you  graduate,   nothing  should  be  “magic”   other  than  how  transistors   work  and  NP-­‐Completeness.     cs2150   cs3330   cs4414   cs2330   Physics   Minimizing  Magic   28  
  • 29. Cool  Compu0ng  Stuff   elec0ves   cs4414   cs3102   Its  all  magic!   cs1110   cs2110   cs4610   cs2150   cs4414   By  the  0me  you  graduate,   nothing  should  be  “magic”   other  than  how  transistors   work  and  NP-­‐Completeness.     cs2150   cs3330   cs4414   cs2330   Physics   Minimizing  Magic   29  
  • 30. (Academic)  Goal  of  the  Class   Improve  our   understanding  of  how   computers  work.     30  
  • 31. (Academic)  Goal  of  the  Class   Improve  our   understanding  of  how   computers  work.     Not:   31  
  • 32. Why  bother?   1.  Beer  understanding  of  how  computers  work   make  you  a  beEer  programmer  which  will  help   you  build  something  cool,  succeed  in  grad   school,  or  get  a  more  interes0ng  job.   2.  Beer  understanding  of  how  computers  work   (and  why)  is  intellectually,  culturally,  and   scien&fically  interes&ng.   32  
  • 33. Why  bother?   1.  Beer  understanding  of  how  computers  work   make  you  a  beEer  programmer  which  will  help   you  build  something  cool,  succeed  in  grad   school,  or  get  a  more  interes0ng  job.   2.  Beer  understanding  of  how  computers  work   (and  why)  is  intellectually,  culturally,  and   scien&fically  interes&ng.   33  
  • 34. Why  bother?   1.  Beer  understanding  of  how  computers  work   make  you  a  beEer  programmer  which  will  help   you  build  something  cool,  succeed  in  grad   school,  or  get  a  more  interes0ng  job.   2.  Beer  understanding  of  how  computers  work   (and  why)  is  intellectually,  culturally,  and   scien&fically  interes&ng.   34  
  • 35. Why  bother?   1.  Beer  understanding  of  how  computers  work   make  you  a  beEer  programmer  which  will  help   you  build  something  cool,  succeed  in  grad   school,  or  get  a  more  interes0ng  job.   2.  Beer  understanding  of  how  computers  work   (and  why)  is  intellectually,  culturally,  and   scien&fically  interes&ng.   If  these  reasons  don’t  apply  for  you  and  you  are  only  in  this  class   because  there  is  a  bureaucra&c  requirement  that  you  take  it  so   some  Dean  will  hand  you  a  nice  bit  of  paper  in  front  of  your   parents,  you  should  meet  with  me  to  figure  out  an  alterna0ve.   35  
  • 36. What  Mr.  Jefferson  Wants   36  
  • 37. What  Mr.  Jefferson  Wants   “We  wish  to  establish  in  the   upper  country  of  Virginia,  and   more  centrally  for  the  State,  a   University  on  a  plan  so  broad  and   liberal  and  modern,  as  to  be   worth  patronizing  with  the  public   support,  and  be  a  tempta&on  to   the  youth  of  other  States  to   come  and  drink…”     TJ’s  leer  to  Joseph  Priestly,  1800   No  Majors   No  Degrees   No  President   37  
  • 38. Note:  this  does  not  mean  he  wants  you  to  be  lazy:   :   Thomas  Jefferson  enrolled  in  the  College  of  William   and  Mary  on  March  25,  1760,  at  the  age  of  16…     By  the  0me  he  came  to  Williamsburg,  the  young   scholar  was  proficient  in  the  classics  and  able  to   read  Greek  and  La0n  authors  in  the  original…  He   was  instructed  in  natural  philosophy  (physics,   metaphysics,  and  mathema&cs)  and  moral   philosophy  (rhetoric,  logic,  and  ethics).  A  keen  and   diligent  student,  he  displayed  an  avid  curiosity  in  all   fields  and,  according  to  family  tradi0on,  he   frequently  studied  fi2een  hours  a  day.     38   hp://www.wm.edu/about/history/tjcollege/tjcollegelife/  
  • 39. What  is  my  goal  for  lectures?   Convey  some  complex  technical  ideas       Teach  you  what  you  need  to  know  to  do   the  projects   Avoid  being  fired   Keep  most  of  you  awake  for  75  minutes   Get  you  to  laugh  at  dumb  jokes   39  
  • 40. What  is  my  goal  for  lectures?   Lectures  are  a  horrible  medium  for  learning  complex  ideas.   Convey  some  complex  technical  ideas       Beer  to  read  wikipedia.       Teach  you  what  you  need  to  know  to  do   the  projects   Avoid  being  fired   Keep  most  of  you  awake  for  75  minutes   Get  you  to  laugh  at  dumb  jokes   40  
  • 41. What  is  my  goal  for  lectures?   Lectures  are  a  horrible  medium  for  learning  complex  ideas.   Convey  some  complex  technical  ideas       Beer  to  read  wikipedia.       The  point  of  the  projects  is  to  teach  you  things  I  want  you  to   Teach  he  class  (mostly  by  sugges0ng  tto  know  hould   o   learn  in  t you  what  you  need   hings  you  s to  d learn  o rojects   the  pn  your  own).   Avoid  being  fired   Keep  most  of  you  awake  for  75  minutes   Get  you  to  laugh  at  dumb  jokes   41  
  • 42. What  is  my  goal  for  lectures?   Lectures  are  a  horrible  medium  for  learning  complex  ideas.   Convey  some  complex  technical  ideas       Beer  to  read  wikipedia.       The  point  of  the  projects  is  to  teach  you  things  I  want  you  to   Teach  he  class  (mostly  by  sugges0ng  tto  know  hould   o   learn  in  t you  what  you  need   hings  you  s to  d learn  o rojects   the  pn  your  own).   I  have   Avoid  being  fired   tenure  already   Keep  most  of  you  awake  for  75  minutes   Get  you  to  laugh  at  dumb  jokes   42  
  • 43. What  is  my  goal  for  lectures?   Lectures  are  a  horrible  medium  for  learning  complex  ideas.   Convey  some  complex  technical  ideas       Beer  to  read  wikipedia.       The  point  of  the  projects  is  to  teach  you  things  I  want  you  to   Teach  he  class  (mostly  by  sugges0ng  tto  know  hould   o   learn  in  t you  what  you  need   hings  you  s to  d learn  o rojects   the  pn  your  own).   I  have   Avoid  being  fired   tenure  already   You  probably  should  be  gerng  more   inutes   Keep  most  of  you  awake  for  75  msleep!   Get  you  to  laugh  at  dumb  jokes   43  
  • 44. What  is  my  goal  for  lectures?   Lectures  are  a  horrible  medium  for  learning  complex  ideas.   Convey  some  complex  technical  ideas       Beer  to  read  wikipedia.       The  point  of  the  projects  is  to  teach  you  things  I  want  you  to   Teach  he  class  (mostly  by  sugges0ng  tto  know  hould   o   learn  in  t you  what  you  need   hings  you  s to  d learn  o rojects   the  pn  your  own).   I  have   Avoid  being  fired   tenure  already   You  probably  should  be  gerng  more   inutes   Keep  most  of  you  awake  for  75  msleep!   Monty  Python  ils  funnier  (unless  you  are  Kevin  Redmon)   Get  you  to   augh  at  dumb  jokes   44  
  • 45. My  Real  Goal  for  Lectures   Provide  context  and  meaning  for  the   things  you  have  or  will  later  learn  on   your  own.   (I  also  have  an  insidious  goal  for  lectures,  that  I   won’t  tell  you  about  un0l  later…)   45  
  • 47. The  Problem  Sets   are  Sugges&ons   If  you  have  a  beEer  idea,   convince  me,  and  you   should  do  that  instead.     47  
  • 48. Plan  for  Projects   PS0  (Friday):  Rust  tutorial  and  course  survey   PS1  (23  Jan):  zhEpto  web  server   PS2  (9  Feb):  gash  (learn  about  processes)   PS3  (3  March):  zhEa  web  server  (learn  about    synchroniza0on,  memory  management)   PS4  (2  April):  hacking  a  (rela0vely  simple)  kernel     48  
  • 49. This  genera0on  of  students  got  into  “UVa”  by   doing  exactly  and  precisely  what  teacher   wants.  If  teacher  is  vague  about  what  he   wants,  they  work  a  lot  harder  to  figure  out   what  they  want  and  whether  or  not  it  is  good.   The  vaguer  the  direc&ons,  the  more  likely  the   opportunity  for  serendipity  to  happen.  It   drives  them  nuts!   Harvard  Professor  John  S0lgoe     (on  "60  Minutes",  4  January  2004)   49  
  • 50. Final  Project   Final  Project  (29  April):     (almost*)  anything  you  want!      *  must  be  at  least  two  of:        fun,  technically  interes0ng,        useful,  relevant   Start  thinking  of  ideas  now  –  if  you  come  up  with  something   sufficiently  worthwhile,  can  subs0tute  for  PS4/PS3/PS2/etc.   50  
  • 51. Some  Examples   hp://uvasear.ch/   Nishant  Shukla   Jasdev  Singh   51  
  • 52. Norvigtorious   Alex  Fabian   Daniel  Nizri   Renee  Seaman   Casey  Silver   52  
  • 53. IronKernel   Kevin  Broderick     Alex  Lamana     Zeming  Lin   John  Stevans   Wil  Thomason   We  will  use  this  for  PS4!   53  
  • 54. 54  
  • 55. 55  
  • 57. Why  learn  a   new   programming   language?   57  
  • 58. “Jamais  Jamais  Jamais”  from   Harmonice  Musices  Odhecaton   A.  (1501)   J  S  Bach,  “Coffee  Cantata”,   BWV  211  (1732)     www.npj.com/homepage/teritowe/ jsbhand.html     58  
  • 59. Modern  Music  Nota0on   Roman  Haubenstock-­‐ Rama0,  Concerto  a  Tre     John  Cage,  Fontana  Mix   hp://www.medienkunstnetz.de/works/fontana-­‐mix/audio/1/   59  
  • 60. 60  
  • 61. 61  
  • 62. Thought  and  Ac0on   Languages  change  the  way  we  think   BASIC:  think  about  GOTO   Algol,  Python:  think  about  assignments,  control  blocks   Scheme,  Haskell:  think  about  procedures   Java,  C++:  think  about  types,  objects   Languages  provide  abstrac&ons  of  machine  resources   –  Hide  dangerous/confusing  details:  memory  loca0ons,   instruc0on  opcodes,  number  representa0ons,  calling   conven0ons,  etc.   –  Hiding  more  increases  simplicity,  but  limits  control   62  
  • 63. Why  so  many  programming   languages?   63  
  • 64. Fundamental  Differences   All  equivalently  powerful!   –  Universal  languages:  all  capable  of  simula0ng  each  other   Fundamental  differences   Expressiveness:  how  easy  it  is  to  describe  a  computa0on   Control:  how  much  programmer  can  control  machine   “Truthiness”:  likelihood  program  means  programmer  wants   Safeness:  impact  of  programmer  mistakes   Difficult  to  achieve  all  of  these  at  once   64  
  • 65. Fundamental  Differences   All  equivalently  powerful!   –  Universal  languages:  all  capable  of  simula0ng  each  other   Fundamental  differences   Expressiveness:  how  easy  it  is  to  describe  a  computa0on   Control:  how  much  programmer  can  control  machine   “Truthiness”:  likelihood  program  means  programmer  wants   Safeness:  impact  of  programmer  mistakes   Difficult  to  achieve  all  of  these  at  once   65  
  • 66. Fundamental  Differences   All  equivalently  powerful!   –  Universal  languages:  all  capable  of  simula0ng  each  other   Fundamental  differences   Expressiveness:  how  easy  it  is  to  describe  a  computa0on   Control:  how  much  programmer  can  control  machine   “Truthiness”:  likelihood  program  means  programmer  wants   Safeness:  minimize  impact  of  programmer  mistakes   Difficult  to  achieve  all  of  these  at  once   66  
  • 67. Fundamental  Differences   All  equivalently  powerful!   –  Universal  languages:  all  capable  of  simula0ng  each  other   Fundamental  differences   Expressiveness:  how  easy  it  is  to  describe  a  computa0on   Control:  how  much  programmer  can  control  machine   “Truthiness”:  likelihood  program  means  programmer  wants   Safeness:  minimize  impact  of  programmer  mistakes   Difficult  to  achieve  all  of  these  at  once   What  do  we  want  for  systems  programming?   67  
  • 68. Programming  Language  Design  Space   Expressiveness   high   low   more  mistake  prone   less  mistake  prone   “Truthiness”   68  
  • 69. Programming  Language  Design  Space   Expressiveness   high   Scheme Python (display “Hello!”) print ("Hello!") BASIC C strict  typing,   sta0c   C++ Java Ada Spec# low   more  mistake  prone   less  mistake  prone   “Truthiness”   69  
  • 70. Programming  Language  Design  Space   Control   high   low   very  risky   Safety   fairly  safe   70  
  • 71. Programming  Language  Design  Space   high   Control   C Java Python low   very  risky   Safety   fairly  safe   71  
  • 72. “a  safe,  concurrent,  prac0cal  language”   Its  design  is  oriented  toward   concerns  of  “programming  in  the   large”,  that  is,  of  crea0ng  and       maintaining  boundaries  –  both     abstract  and  opera0onal  –  that   preserve  large-­‐system  integrity,   availability  and  concurrency.     from  hp://www.rust-­‐lang.org/   Rust   Advances  in  programming  language  design  and  compiler   implementa0on  make  it  possible  to  get  both  control  and  safety,  and   mostly  get  expressiveness  and  “truthiness”  all  at  the  same  0me!   72  
  • 73. Charge   Bring  a  laptop  to  use  in  Thursday’s  class!   •  Do  (or  at  least  aempt)  everything  on  the  Class  1   notes  Ac&on  Items  before  class  Thursday   –  Download  and  setup  your  compu0ng  environment  for   cs4414   –  Setup  your  github  account   •  Next  class:   –  Help  gerng  everything  working  on  your  machine   –  Help  gerng  started  with  Rust  (Rust  tutorial)   73