Title: Class 1: What is an Operating System?
Date: 2014-01-14
Category: Classes
Tags: operating systems, programing languages
Author: David Evans

<center>
<iframe src="http://www.slideshare.net/slideshow/embed_code/30027597" width="476" height="400" frameborder="2" marginwidth="0" marginheight="0" scrolling="no"></iframe><br>
[Videos](http://www.youtube.com/watch?v=ycpSnZN-c_Q&feature=share&list=PLvpsxlEF9cP2hCgWeSjVLIG-2QrMzq6Ma)
</center>

# Action Items

   <div class="todo">

You should do at least these three things before <b>Thursday's class</b>:

1. Read the [Course Syllabus](|filename|../../pages/syllabus.md).

2. Setup Rust on your computer by either:
    - [Installing VirtualBox following these directions.](|filename|../../pages/tools/virtualbox.md) (This should work for everyone.  It takes a long time to download so get started early.  This is the simplest way to get started, but can be a bit slow and klunky.)
    - Setting up Rust to run natively on your machine, following [these directions](http://static.rust-lang.org/doc/master/tutorial.html#getting-started).  If you are running Mac OS X or Linux, this is probably the best option.  There is a native Windows version of Rust also, but it requires [quite a bit of effort](https://github.com/mozilla/rust/wiki/Note-getting-started-developing-Rust]) to set up.
    - Setting up an Amazon EC2 instance for running Rust following [these directions](http://rust-class.org/pages/amazon-ec2.html).

3. Set up your student github account, following [these directions](|filename|../../pages/tools/github.md).  

By **4:59pm on Sunday**, you should also submit [Problem Set
0](|filename|../../pages/ps/ps0/ps0.md) which includes completing [part 1 of the
Rust tutorial](http://aml3.github.io/RustTutorial/html/01.html) and course registration survey.

Before next Tuesday's class:

- Read [Introduction to Operating
Systems](http://pages.cs.wisc.edu/~remzi/OSTEP/intro.pdf) from Remzi
H. Arpaci-Dusseau and Andrea C. Arpaci-Dusseau's [Operating Systems:
Three Easy Pieces](http://pages.cs.wisc.edu/~remzi/OSTEP/) book.  (This
book is freely available on-line, but may also be ordered as a [printed
book](http://www.lulu.com/shop/remzi-arpaci-dusseau-and-andrea-arpaci-dusseau/operating-systems-three-easy-pieces-softcover-v06/paperback/product-21159220.html)
for $29.  We will have several readings from the book during the
semester, all of which are also freely available on-line, but if you
prefer to read things in printed form I encourage you to buy the printed
book.)
 

**Don't forget to bring your laptop to Thursday's class.**  If you do not
have access to a suitable machine for use in this class, please contact
me right away.  The department does have a few loaner machines that may
be available for you to borrow.



   </div>

## Operating Systems

<center>
</center>

What is an operating system?

<div class="gap">


</div>

<center>
<iframe width="640" height="360" src="//www.youtube-nocookie.com/embed/4YFjWAUtkqo?list=PLvpsxlEF9cP2hCgWeSjVLIG-2QrMzq6Ma" frameborder="2" allowfullscreen></iframe>
</center>

What fraction of a baby's toys had an operating system in 1990?  What
about in 2014?  What fraction would you expect in 2020

<div class="gap">


</div>

<center>
<iframe width="640" height="360" src="//www.youtube-nocookie.com/embed/cJbIXG50RCE?list=PLvpsxlEF9cP2hCgWeSjVLIG-2QrMzq6Ma" frameborder="2" allowfullscreen></iframe>
</center>

What aspects of computing seem like magic to you today?

<div class="gap">


</div>


## Programming Languages

<center>
<iframe width="640" height="360" src="//www.youtube-nocookie.com/embed/oD1_3iL12mU?list=PLvpsxlEF9cP2hCgWeSjVLIG-2QrMzq6Ma" frameborder="2" allowfullscreen></iframe>
</center>

Why are there so many programming languages?

<div class="gap">


</div>

- Languages change the way we **think**.

- Languages provide **abstractions** for machine resources.  The
  abstractions they provide are engineering tradeoffs between:
      - *expressiveness* and *"truthiness"*
      - *freedom* and *safety*
      - *flexibility* and *simplicity*
      - *efficiency* and *ease-of-use* 

Which of these should we prefer for a programming language for systems programming?

<div class="gap">

</div>

What's the difference between a language and an operating system?

<div class="gap">

</div>

## Rust

[Rust](http://www.rust-lang.org) is a systems programming language
developed by [Mozilla Research](http://www.mozilla.org/en-US/research/).
It is a new and immature language: the release we are using is Version
0.9 (released last week).

Rust is designed with a particular focus on providing both *safety* and
*control*.  This means it provides programmers with a lot of control
over how memory is managed to enable efficient programs, but without the
opportunity to shoot yourself in the foot so readily provided by C/C++.
Much of the design is driven by the needs of
[Servo](https://github.com/mozilla/servo), an experimental,
highly-parallelizable web browser engine.

# Discussion

In the discussion, please answer "What aspects of computing seem like
magic to you today?" and feel free to also use the discussion below for
any comments about Class 1 (including thoughts on the questions above).

<A class="btn primary xsmall" href="http://rust-class.org/class-2-getting-rustified.html">Next Class</a>

<div id="disqus_thread"></div>

<script type="text/javascript">
        /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
        var disqus_shortname = 'rust-class'; // required: replace example with your forum shortname
	var disqus_url = 'http://www.rust-class.org/class1.html';

        /* * * DON'T EDIT BELOW THIS LINE * * */
        (function() {
            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
            dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
        })();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>


