Operating Systems 2014F Lecture 1: Difference between revisions

From Soma-notes
Afry (talk | contribs)
No edit summary
Afry (talk | contribs)
No edit summary
Line 9: Line 9:
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.  
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.  


[[File:L1pic1.png]]
[[File:L1pic1.png|300px]]


===Real Hardware===  
===Real Hardware===  

Revision as of 17:44, 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.

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.

Real Hardware VS. What We Want our Hardware to be capable of (Conflict / Gap)

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. The trick with Operating Systems is that they do things you can't normally do, in that they have powers that other programs don't have. They get around the quirks and variability of the hardware. We get abstraction. Operating systems take this idea pretty far. Translates the computer you have, and outputs the computer you want to program.

Operating Systems enable sharing between programs. If you think about a computer as not running one program, but running a bunch of programs all together, think of them like living entities. Now you have some sort of social structure, some model of governance.

What style of government does an operating system impose? An absolute dictatorship - highly authoritarian. Command and control autonomy in the strictest sense. The OS is boss! ()

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

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.