Operating Systems 2017F Lecture 1: Difference between revisions

From Soma-notes
Created page with "==Audio== Audio from the lecture given on September 7, 2017 [http://homeostasis.scs.carleton.ca/~soma/os-2017f/lectures/comp3000-2017f-lec01-07Sep2017.m4a is now available]."
 
Add notes (thanks Shaun!)
 
Line 2: Line 2:


Audio from the lecture given on September 7, 2017 [http://homeostasis.scs.carleton.ca/~soma/os-2017f/lectures/comp3000-2017f-lec01-07Sep2017.m4a is now available].
Audio from the lecture given on September 7, 2017 [http://homeostasis.scs.carleton.ca/~soma/os-2017f/lectures/comp3000-2017f-lec01-07Sep2017.m4a is now available].
==Notes==
''The following notes are based on those provided by a student. They do not necessarily cover all material. If you think something is missing, let us know!''
==== What is an Operating System (OS)? ====
* Resource Manager for all applications.
* Abstracts the hardware and provides an easy way for programs to access the virtualized hardware
====Where did Operating Systems begin?====
* Started in the 60's when mainframes became popular
====What is the goal of an Operating System?====
* Facilitates the sharing of resources (Hard disks, CPU, RAM, etc.) among many concurrent programs.
* Uses time slices to allocate resources and enforces usage rules so programs don't hog 100% of the available resources. Time was equivalent to cash during early computing.
* Store files persistently[[#ref1|<sup>1</sup>]]
* Handle problems related to concurrency (multiple programs running at the same time).[[#ref1|<sup>1</sup>]]
===Architecture===
* Kernel:
** This is the first program that launches when we turn on a computer. The kernel provides the hardware abstraction and is the part of the operating system that dictates how the hardware is managed and accessed. The Kernel has absolute power over the hardware.
** The kernel controls program execution, for example with signals
*** Kill: stops execution immediately
*** Terminate: allows the program to stop gracefully
*** Stop: pauses execution
*** Continue: resumes execution
* Hypervisor:
** A Kernel that manages other kernels. An operating system may have several kernels that perform specific tasks; a hypervisor manages these kernels.
* Processes (An executable):
** One or more threads plus address space
** A thread is a function that runs in the same memory space as other functions
* Memory:
** A contiguous array of bytes. Every byte has a physical address.
** On modern machines, memory is virtualized so that it can be divided into segments. All of the segments are mapped to the physical memory space.
** Every time an operation occurs the memory map (MMU) is consulted.
** Each program is given a segment of memory; this is called virtual memory. All of the programs share the same physical memory.
* Interrupts:
** Allows the kernel to interrupt the CPU when other tasks take priority. The kernel uses a table to manage the various types of interrupts available. One example is a timer interrupt, it determines CPU time usage.
* Signals:
** Inter-Process communication; How the kernel communicates with a process.
** Can be initiated by the kernel or sent by programs to control other processes.
* System Calls:
** Special calls to the kernel. This is how the application asks for more resources.
** Not a function call, though higher level languages may wrap them in convenience functions.
** When called, transfer control to the OS and raises the hardware privilege level[[#ref1|<sup>1</sup>]]
==References==
<span id=ref1>1.</span> Arpaci-Dusseau, Operating Systems: Three Easy Pieces, ''Introduction'', p. 11-13 http://pages.cs.wisc.edu/~remzi/OSTEP/intro.pdf

Latest revision as of 04:56, 28 September 2017

Audio

Audio from the lecture given on September 7, 2017 is now available.

Notes

The following notes are based on those provided by a student. They do not necessarily cover all material. If you think something is missing, let us know!

What is an Operating System (OS)?

  • Resource Manager for all applications.
  • Abstracts the hardware and provides an easy way for programs to access the virtualized hardware

Where did Operating Systems begin?

  • Started in the 60's when mainframes became popular

What is the goal of an Operating System?

  • Facilitates the sharing of resources (Hard disks, CPU, RAM, etc.) among many concurrent programs.
  • Uses time slices to allocate resources and enforces usage rules so programs don't hog 100% of the available resources. Time was equivalent to cash during early computing.
  • Store files persistently1
  • Handle problems related to concurrency (multiple programs running at the same time).1

Architecture

  • Kernel:
    • This is the first program that launches when we turn on a computer. The kernel provides the hardware abstraction and is the part of the operating system that dictates how the hardware is managed and accessed. The Kernel has absolute power over the hardware.
    • The kernel controls program execution, for example with signals
      • Kill: stops execution immediately
      • Terminate: allows the program to stop gracefully
      • Stop: pauses execution
      • Continue: resumes execution
  • Hypervisor:
    • A Kernel that manages other kernels. An operating system may have several kernels that perform specific tasks; a hypervisor manages these kernels.
  • Processes (An executable):
    • One or more threads plus address space
    • A thread is a function that runs in the same memory space as other functions
  • Memory:
    • A contiguous array of bytes. Every byte has a physical address.
    • On modern machines, memory is virtualized so that it can be divided into segments. All of the segments are mapped to the physical memory space.
    • Every time an operation occurs the memory map (MMU) is consulted.
    • Each program is given a segment of memory; this is called virtual memory. All of the programs share the same physical memory.
  • Interrupts:
    • Allows the kernel to interrupt the CPU when other tasks take priority. The kernel uses a table to manage the various types of interrupts available. One example is a timer interrupt, it determines CPU time usage.
  • Signals:
    • Inter-Process communication; How the kernel communicates with a process.
    • Can be initiated by the kernel or sent by programs to control other processes.
  • System Calls:
    • Special calls to the kernel. This is how the application asks for more resources.
    • Not a function call, though higher level languages may wrap them in convenience functions.
    • When called, transfer control to the OS and raises the hardware privilege level1

References

1. Arpaci-Dusseau, Operating Systems: Three Easy Pieces, Introduction, p. 11-13 http://pages.cs.wisc.edu/~remzi/OSTEP/intro.pdf