Lecture 1

Syllabus Notes

Extensions

  • Each of us gets one extension for any assignments.

  • The extension is 3 days.

Operating Systems

Operating Systems: a layer between humans and any hardware. (It's a very broad term)

Execute User Programs

Make solving user problems easier

Provide Conveinence

Make tasks easier

Interface to Hardware

And use computer hardware efficiently.

Components of Computer System Structures

Operating Systems Are Interfaces

Deal With Hardware

Operating Systems

Applications/Programs

Users

Operating Systems Are Interfaces

  • We let the programmers focus on the software.

  • The operating systems offer easier interfaces for users and programmers.

  • Operating Systems provide an abstraction

  • Operating systems are resource managers

    • Controls Processes

    • Controls hardware.

    • Decides which applications get run first.

The Kernel

Kernels Are Stable

  • Kernels Are Privileged: They have so much more permissions than user mode.

  • Kernels Talk to Hardware: It's an interface between applications/programs and hardware.

  • Kernels Don't Crash: Kernels are way more stable. If a program crashes, the OS does not.

  • Kernels Provide Interfaces: Kernels provide kernel mode for programs in user mode.

The kernel is the one program running at all times on the computer.

Interrupts

What is an Interrupt?

  • Interrupts transfer control

  • There are 3 types of interrupts.

    • Hardware Interrupts: Asynchronous and may occur at any time

    • Traps: Software interrupts, raised by a user or program to invoke OS functionality.

    • Exceptions: Generated automatically by the processor itself via illegal instructions.

      • Faults: recoverable errors (like: can't load a missing page)

      • Aborts: Difficult to recover (like dividing by zero; a program is often terminated)

"An operating system is interrupt driven"

Storage Structure

Several types of storage exist:

What types of storage exist?

Main Memory

Fast for random access, but typically volatile

Secondary Storage

Large capacity, but slow. A disk controller interfaces between the CPU and disk..

Caching

Copies information to faster units.

What is a Cache?

CPUs are so fast. RAM is slower.

  • CPUs have SRAM (Think Silicone RAM) which is super super expensive, but way faster.

  • Modern processors are really good at deciding what should go in the Cache.

  • More Cache is advantageous.

  • L1 is Cache is the fastest, but smallest.

  • L2 and L3 has a little more space, but is a bit slower. It's still faster than memory.

How are they different?

Each type of storage serves a different purpose. For example, hard drives are slower (left), but hold far more information than quick hardware registers (right).

The Storage Hierarchy

Factors when considering

We have to balance:

  • Speed

  • Cost

  • Volatility (how long can data stay on the device?)

Speeds By The Numbers

How Modern Computers Work

Instructions vs Data

  • The CPU communicates with the memory.

  • The CPU loads instructions from memory.

    • Processes are made up of sets of instructions from instructions.

    • Learn more about processes in lecture 2

Types of Processors

Single Core Processors


Multi-Core Processors


Multi-Processors


Multiprocessors

Why Use Multiprocessors?

  • Most systems use a single general-purpose processor.

  • Advantages of multi-processors

    • Increased throughput

    • Economy of scale

    • Increased reliability: graceful degradation or fault tolerance

Asymmetric Multiprocessing

Each processor is assigned a specific task.

Symmetric Processing

Each processor performs all tasks