Os memphis Day one notes 1/18/2005 Bob Bradley

Download 18.85 Kb.
Date conversion29.07.2017
Size18.85 Kb.
OS – Memphis – Day one notes 1/18/2005 – Bob Bradley

Dr. Stuart’s OS Class COMP 4270/6270 at the University of Memphis

What is an Operating System?

Not everything that comes on the machine. Not word processor browser.

Other end. Single program. Kernel. Core thing this class will be compiling and building after modifying.

A program that runs directly on the hardware.

The OS is the kernel plus the support apps that provide the OS services.


n OS:

  1. I/O Interface. Interface between applications and the hardware

  2. M
    anager (eg. Memory) Resource Manager

  3. Service Provider through API. (open files, kill/start a process)

  4. Virtual Machine

OS Responsibilities

  1. Memory

  2. CPU / Processor Time

  3. I/O devices

  4. File Systems

  5. Security (aspects of security in all of these)

  6. Networking

  7. User Interface?


Bare Hardware

1 machine / 1 program / 1 user

Sign-up / Timeshare

Batch OS – Lost immediacy – hard to debug program


OS notes 1/20/2005


  1. Bare Metal / No OSs
    (Library of code you can reuse/code reuse)

  2. Sign-up / “Timeshare”

  3. Batch OS
    Made use of the computer more efficient (CPU did more work)
    Made programmers time inefficient – had to wait hours for an error report

  4. Timesharing / Multiprogramming – late 1950’s / 1960’s
    IBM and the 7 dwarves –
    BUNCH: Burris, Univac/Unisys, NCR, Control Data Corp, Honeywell & GE
    Digital – PDP8 (1975?) Cheap and small – sit on a desk – CPU – 4K - $18,000.00
    Cheap computers – mini computer - back to 1 computer / 1 user / 1 program

    Unix written 1969 for PDP 7.

    1969 first unix, Apollo 11 on the moon, Woodstock, sesame street, first Arpanet / internet computers and some timesharing
    1970’s Altair - $700.00 Popular Electronics – Box, CPU, Lights, Switches – a Personal Computer – 1 user/ 1 CPU / 1 program

    PDA’s - at first - 1 user/1CPU/1 program

  5. Distributed Operating System
    Breaks the third leg of the triangle (1 user/1program/1cpu)
    Need to plan the structure of the system, so that multiple machines are doing multiple jobs for multiple people

    MULTICS – Designed for computer utility grid – 40 years ago

    an interesting test bed for ideas – how to protect one user from another – how to store files – interact with users – gathering point for some of the best minds in CS.
    Developed into an extremely wide specified system – late 1960’s bell labs pulled out of MULTICS. Look in 3.1 Inferno Origins in PDF.

    MULTICS language (BCPL)

    UNIX language (B) extend B add arrays and typing -> C
    History of Programming Languages – Paper HOPL#2
    History of C

    Unix and Bell Labs

    Bell Labs was AT&T Phone Company, and could not sell computer stuff, so they gave it away.
    Berkley versions of Unix – Various BSDs, Free BSD, Open BSD, Dragon Fly BSD

    Plan 9 – Bell Labs – Now Lucent

    Inferno (Limbo)
    Lucent sold to Vita Nuova


Now Open Source
Can be hosted or native
Google is now becoming the largest and best CS research institute. Some of the plan 9 and inferno people are there now.

System Calls (1.5)

  • The interface between apps and the OS

  • Usually implemented with some form of software interrupt or trap

  • Transfers control to the OS

  • OS processes request and ends result back

New memory, new process

The C programming lang doesn’t know about interrupts or I/O or system calls

Compiler uses stub functions to do interrupt/system calls

OS Structure

  1. Monolithic

  2. Layered Design
    Code in lower layers does not call or reference code/data in upper layers

  3. Virtual Machine Design
    The OS provides apps w/ the illusion that they’re alone on the HW

  4. Microkernel Design – Minux, Mach, etc.

Tue 1/25/2005

OS – Hardware






Direct Memory Access

CPU: ALU (Mostly addition and subtraction and setting flags to indicate something about the results)
CPU “Algorithm”

  1. Put PC onto address bus and read an instruction from memory.

  2. Decode the instruction
    2a) Increment the program counter (PC) by the size of the instruction

  3. Move data according to the decoded instruction

  4. Goto 1

Next memory:

At Top: faster – smaller – more expensive

At bottom: slower, bigger, cheaper
Regs < 1ns
Cache < 5-10 ns

Main Memory - Primary Storage < 50 ns

Swap Space - Secondary (Backing) Storage < 5 ms (factor of 100,000 x slower)

maybe million

Archival storage < 5 s m hrs

Punch cards

Paper Rolls

Tape Drives

Floppy Disks

How Disk Drives Work…

Head flying above disk on a cushion of air. And related sizes. Head, fingerprint, hair

    • head crashes

    • … thus ends computer hardware

    • Next time what we do in the OS in terms of process management

1/21/05 TH – OS

Process Management


    • scheduling who gets to run next

    • context switching – giving the cpu to another process

    • create process

    • terminate process

    • control and query permissions and other meta data

    • IPC – Inter-process communication


    • batch os

    • FCFS – queue

      1. 1, 2, 100, 1, 3
        turn around time, time from submission to completion
        1, 3, 103, 104, 107

    • SJF – shortest job first. Minimize the average turn around time

Timesharing OS

    • Round robin – circular queue

    • Priority scheduling, pick the one with the highest priority

      1. Administrative – static

      2. Dynamic eg prioritize interactive processes

    • Multiple queues

      1. Eg. of different quantums
        prioritize interactive processes
        move long jobs down to longer quantums, but less priority

    • Two Level Scheduler (when mem was expensive)

      1. First level – decide what processes are in memory at any given time – runs slowly (maybe every sec)

      2. Second level – usual scheduling – among those in memory, which runs next – runs faster (maybe every 10th of a sec)

    • Real-time scheduling

      1. Apollo 11 – 1201 and 1202 alarms – stuff not getting done
        but we do the high priority stuff first, at the first of each cycle

The Process State

Proc preempted

The database is protected by copyright ©ininet.org 2016
send message

    Main page