Operating Systems 2018F Lecture 18

From Soma-notes
Revision as of 17:08, 14 November 2018 by Soma (talk | contribs)
Jump to navigation Jump to search

Video

The video from the lecture given on November 14, 2018 is now available.

Notes

In Class

Lecture 18
----------

To Do
-----
  strace memoryll
  uid vs euid
  scheduling and __schedule

Optional reading:
  https://utcc.utoronto.ca/~cks/space/blog/unix/RawTtyInputThenAndNow

Scheduling
----------

System calls => enter supervisor mode (kernel) from user mode (processes)

scheduler => enter user mode (processes) from supervisor mode (kernel)

Scheduling algorithms

Challenges of scheduling
 - maximize use of resources (throughput)
 - minimize wait time (latency)
 - minimal computational complexity
    scheduling is pure overhead
 - make sure "important" things get done
    - obey user preferences
    - do important system things



Classic scheduling
Batch scheduling
 - shortest job first
    - lowers latency for shorter jobs but isn't "fair"
 - first in, first out
    - fair, but can have bad consequences

"time sharing" - preemptible scheduling
 - each process gets a "time slice"
 - when process is interupted, what to do next?
   key question
     - is it waiting for I/O?