Operating Systems 2019W Lecture 1

From Soma-notes
Revision as of 23:40, 14 January 2019 by Soma (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Video

Video from the lecture given on January 7, 2019 is now available.

Notes

In class

Lecture 01
----------

What is an operating system?

* resource management
* abstraction

Software that turns the computer you have into the system you want to program

Linux - operating system "kernel"

"GNU/Linux" - because an OS is a kernel + other stuff, and GNU made a lot of
the other stuff


Security


Threat model
 - every defense has limits
 - threat models capture the kinds of attacks a defense defends against

Problem models
 - what problem are you trying to solve?
 - what are you assuming about the world?


What happens when a program crashes?
 - program "misbehaves" and is shut down

MS-DOS et al
 - "operating systems", but not modern operating systems
 - yes: abstracts disk access
 - no: no support for running multiple programs safely

 - TSRs like sidekick allowed "multiple" programs to run at once
   (actually, allowed you to switch programs, in a hack-y way)

Modern computers must multitask, because they have to deal with
 - user input/output
 - network input/output

Someone has to be in charge on a modern operating system
 - allocate resources
 - deal with misbehaving programs


The operating system kernel is what does the above

The kernel runs first, so it gets the "high ground"
 - it gets first access to the hardware
 - hardware distinguishes between what is first run and the rest
 - hardware has "modes" for running different kinds of code

How safe is it to depend on the "who came first"?


    F | E |
    i | m |
    r | a |
    e | c |
    f | s |
    o |   |
    x |   |
    ------------
     OS kernel
    ------------
      hardware

running program on a modern OS: process
requests from a process to the kernel: system calls

system calls often look like function calls

When you make a function call, the CPU jumps to the address of the function called (and arguments + return address are pushed on the stack)

System calls require you to jump to a new address space and change CPU modes