Operating Systems 2021F Lecture 1

From Soma-notes
Revision as of 16:35, 9 September 2021 by Soma (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Video

Video from the lecture given on September 9, 2021 is now available:

Video is also available through Brightspace (Resources->Class zoom meetings->Cloud Recordings tab)

Notes

Lecture 1
---------

Tutorials
 - you'll be assigned a TA, that TA will be responsible for giving you tutorial grades and tracking your progress
 - you can get your tutorial grades in one of two ways
    - submit written answers that demonstrate you made a reasonable effort
    - talk with your TA about the work you did
    - grade is based on effort, not knowledge, marked out of 4
    - getting a 4/4 should be very doable for everyone

 - TAs and I also have office hours and will reply to postings on Teams
   (DM and Teams forums), so you can get support from anyone in addition to
   your assigned TA

 - communicate with your TAs via Teams, your TA will have a private channel with all of their 
   assigned students, so you all can chat there or even meet via Teams meetings (audio/video),
   or switch to a zoom call

 - tutorials are async, assigned time will just mean there is a TA available during that time

 - brightspace is just for submitting work and seeing confidential info
   (zoom links)

Class VMs
 - we'll be mostly using openstack, but that will start with Tutorial 2
 - Tutorial 1 goes up tomorrow



Operating systems!

so what is an operating system?
 - software
 - virtualizes resources (hardware)
 - allows interaction between user and hardware
 - is in control of hardware
 - allows for multiple programs to run at the same time
   - facilitates communication between runnning programs


What I say an OS is:
 - turns the computer you have into the system you want to program

So, doesn't the OS run on bare hardware?
 - well, not always, and increasingly less and less

But OSs always do abstraction and resource management

So, isn't a web browser an OS?
 - it is, from a certain point of view!

Rather than saying yes OS, no OS, instead thing of "OS-ness"
 - how much control does it have of the resources?
 - how much abstraction does it do?

But in this class, we're focusing on UNIX-like systems, specifically Linux
 - because it has become the universal OS, its concepts are everywhere

Linux has become a bit weird
 - it increasingly isn't in control of systems
 - but we write most applications targeting Linux (or web browsers)
   - that's web apps

What has happened with modern systems is we keep getting transistors and we aren't 
always sure what to do with them

So what we mostly do is make computers, inside computers, that are then inside computers
(or communicating with them)

Any modern device is a collection of computers, and Linux will be only controlling 
a subset of them

For example, consider the CPU
 - this is managed by the OS, right?  wrong
 - modern CPUs have built-in OSs that control initialization and system management
   - you can remotely connect to it to manage the system, e.g., reinstall the operating system 
     (great for enterprises)
   - this OS is UNIX-like (on Intel, it is Minix, the ancestor of Linux!)
 - so windows on Linux isn't really in charge of your desktop, another OS
   is always there
   
Moore's law
 - number of transistors on a chip doubles every 18 months
 - not quite true nowadays but still exponential increase
   - adding cores is one way to use the extra transistors
   - also, extra security, GPUs, AI accelerators...

Mainstream OSs rely on embedded OSs to manage hardware, and those embedded OSs
provide an API to the OS you see
 - you see this in CPUs, network cards, GPUs, cellular modems, SSDs,
   hard drives
 - any separate thing has its own processor with its own RAM and generally its own OS and software.
   We just call this "firmware"

API: application programming interface
 - a way to call other code
 - when you use a library, you're using an API

Is this a driver?
 - drivers teach an OS how to use hardware
 - firmware teaches hardware how to talk to a driver/OS
    (implements the interface the OS/driver expects,
     abstracting the hardware)

Don't worry if you get lost early in this course
 - I repeat a lot and elaborate
 - multiple views of same concepts
 - if this is all new to you, it will come together just give it time