Difference between revisions of "Operating Systems 2014F Lecture 1"

From Soma-notes
Jump to navigation Jump to search
Line 15: Line 15:
* they do things differently - abstraction
* they do things differently - abstraction
* most hardware expects a single master  
* most hardware expects a single master  
  * most hardware expects to be told what to do by one program, and only one program will actually give it instructions  
* most hardware expects to be told what to do by one program, and only one program will actually give it instructions  
  * They need to be consistent, not contradict each other.  
* They need to be consistent, not contradict each other.  


===On a regular computer we want:===   
===On a regular computer we want:===   
* portability -   
* portability -   
* uniformity   
* uniformity   
* run many programs concurrently - we don't want to run just one program at a time. Look at modern computers - they have gigabytes of RAM, they have multiple cores, they can do so many things. So why do they have to just run one program at a time?
* run many programs concurrently  
* we don't want to run just one program at a time.  
* Look at modern computers - they have gigabytes of RAM, they have multiple cores, they can do so many things.  
* So why do they have to just run one program at a time?


We want to be able to run on multiple systems, and want them to operate / behave in the same way. You can make portable code by putting in a lot of conditions to deal with lots of things. But we want to be consistent as much as possible.
We want to be able to run on multiple systems, and want them to operate / behave in the same way. You can make portable code by putting in a lot of conditions to deal with lots of things. But we want to be consistent as much as possible.

Revision as of 13:31, 10 September 2014

Audio from the lecture given on September 5, 2014 is now available.

Notes

Operating System: What is an Operating System? A layer between hardware and your applications. Operating Systems are software, not hardware. The distinction between these two is not always so clear. This diagram is misleading. Bits of the operating system may also be in the application layer. (For example, libraries) Basic conceptual model of what is happening inside the computer is that the operating system code is both:

  • separate from your programs,
  • and integrated in with your programs.

The reason for this is because operating systems have a very distinct role. Which is to make your life easier. Not your life as a user, you as a programmer. That's the basic goal of an operating system. It takes the computer you have and outputs the computer you want. (This is not an easy task, the hardware guys have made a mess - hardware is complete chaos.) Most of the time you don't want to do that, the hardware from one machine to another will vary.

L1pic1.png

Real Hardware

  • variable, quirks (bugs, problems, faults, mess-ups / didn't do things right instead they do things differently)
  • they do things differently - abstraction
  • most hardware expects a single master
* most hardware expects to be told what to do by one program, and only one program will actually give it instructions 
* They need to be consistent, not contradict each other. 

On a regular computer we want:

  • portability -
  • uniformity
  • run many programs concurrently
* we don't want to run just one program at a time. 
* Look at modern computers - they have gigabytes of RAM, they have multiple cores, they can do so many things. 
* So why do they have to just run one program at a time?

We want to be able to run on multiple systems, and want them to operate / behave in the same way. You can make portable code by putting in a lot of conditions to deal with lots of things. But we want to be consistent as much as possible.

The Operating System is what bridges these two sides. Gives you something you live on a regular computer where real hardware acts like this. They do things you can't normally do. They have powers that other programs don't have. Translates the computer you have, and outputs the computer you want to program.

What style of government does an operating system impose? An absolute dictatorship - highly authoritarian.

Von Newmann architecture - pioneer computer science (Turing's Cathedral - Book)

process - key abstraction behind an operating system - they are logically running at the same time.

Moore's Law:

  1. of transistors on a chip (of fixed size) doubles every 18 months

L1pic2.png Virtual Machines - talk about virtualizing resources - (for example: Virtualbox). you are going to be running an operating system as a program.

50 million lines of code per user. Hypervisor - on top of that you are going to run your own instance of the operating system. Unix was designed as a multi user operating system. Designed to allow many people to share the same computer. But instead of doing that you run entire operating systems for one user. This is horribly wasteful. Also very useful.

Sequential reads are much faster than random reads.

Solid state disks - writes are very expensive, you can't write too many times to the same sector. It is dead.