Classic Systems: Unix and THE Presented by Hakim Weatherspoon.

Slides:



Advertisements
Similar presentations
Operating System.
Advertisements

Classic Systems: Unix and THE Presented by Hakim Weatherspoon.
File Systems.
EEE 435 Principles of Operating Systems Operating System Concepts (Modern Operating Systems 1.5)
CLASSIC SYSTEMS: UNIX AND MACH Ken Birman CS6410.
Classic Systems: Unix and THE Presented by Hakim Weatherspoon.
CMPT 300: Final Review Chapters 8 – Memory Management: Ch. 8, 9 Address spaces Logical (virtual): generated by the CPU Physical: seen by the memory.
1 UNIX 1 History of UNIX 2 Overview of UNIX 3 Processes in UNIX 4 Memory management in UNIX 5 The UNIX file system 6 Input/output in UNIX.
1 CS 333 Introduction to Operating Systems Class 2 – OS-Related Hardware & Software The Process Concept Jonathan Walpole Computer Science Portland State.
CMPT 300: Final Review Chapters 8 – Memory Management: Ch. 8, 9 Address spaces Logical (virtual): generated by the CPU Physical: seen by the memory.
JMS 1 CSE 350, Spring 2001 The Unix Time-sharing System Chuck Davin Software Design & Engineering CSE 350 Spring 2001.
CS533 - Concepts of Operating Systems
Computer Organization and Architecture
OPERATING SYSTEMS Introduction
Silberschatz, Galvin and Gagne  Operating System Concepts Common OS Components Process Management Memory Management File Management I/O System.
1 Course Outline Processes & Threads CPU Scheduling Synchronization & Deadlock Memory Management File Systems & I/O Networks, Protection and Security.
7/15/2015B.RamamurthyPage 1 File System B. Ramamurthy.
Chapter 3.1:Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access.
System Calls 1.
Operating System It is the interface between user (application programs) and hardware. It is a program that controls the execution of application programs.
CSC 322 Operating Systems Concepts Lecture - 4: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
Segmentation & O/S Input/Output Chapter 4 & 5 Tuesday, April 3, 2007.
COMP 3438 – Part I - Lecture 4 Introduction to Device Drivers Dr. Zili Shao Department of Computing The Hong Kong Polytechnic Univ.
Classic Operating Systems: Unix and Mach
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Chapter 1 Introduction 1.1 What is an operating system
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
File Management Chapter 12. File Management File management system is considered part of the operating system Input to applications is by means of a file.
30 October Agenda for Today Introduction and purpose of the course Introduction and purpose of the course Organization of a computer system Organization.
Operating Systems David Goldschmidt, Ph.D. Computer Science The College of Saint Rose CIS 432.
OS, , Part I Operating - System Structures Department of Computer Engineering, PSUWannarat Suntiamorntut.
UNIX and Shell Programming
UNIX Unit 1- Architecture of Unix - By Pratima.
The Structure of the “THE”- Multiprogramming System Edsger W. Dijkstra Presented by: Jin Li.
UNIX & Windows NT Name: Jing Bai ID: Date:8/28/00.
CSC414 “Introduction to UNIX/ Linux” Lecture 2. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
Copyright © Curt Hill Operating Systems An Introductory Overview.
The UNIX Time-Sharing System Mosharaf Chowdhury EECS 582 – W1611/11/16.
CS533 Concepts of Operating Systems Jonathan Walpole.
What is an operating system? Tool to make programmer's job easy Resource allocator – Must be fair; not partial to any process – Must discriminate between.
Operating Systems: Summary INF1060: Introduction to Operating Systems and Data Communication.
Concepts and Structures. Main difficulties with OS design synchronization ensure a program waiting for an I/O device receives the signal mutual exclusion.
MINIX Presented by: Clinton Morse, Joseph Paetz, Theresa Sullivan, and Angela Volk.
WHY AN OPERATING SYSTEM (OS) OS interacts with hardware and manages programs. Programs not expected to know which hardware they will run on. Must be possible.
File System Department of Computer Science Southern Illinois University Edwardsville Spring, 2016 Dr. Hiroshi Fujinoki CS 314.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
CLASSIC SYSTEMS: UNIX AND THE Hakim Weatherspoon CS
Introduction to Operating Systems Concepts
Classic Systems: Unix and THE
Chapter 11: File System Implementation
FileSystems.
Chapter 9: Virtual Memory
CASE STUDY 1: Linux and Android
KERNEL ARCHITECTURE.
Review.
The UNIX Time-Sharing System
Introduction to Linux Week 0 - Thursday.
File System B. Ramamurthy B.Ramamurthy 11/27/2018.
Operating Systems.
Advanced UNIX progamming
Classic Systems: Unix and THE
Chapter 2: Operating-System Structures
Operating Systems Lecture 1.
Introduction to Operating Systems
LINUX System : Lecture 7 Lecture notes acknowledgement : The design of UNIX Operating System.
Outline Operating System Organization Operating System Examples
Chapter 2: Operating-System Structures
Department of Computer Science
Introduction to Operating Systems
The UNIX Time Sharing System
Presentation transcript:

Classic Systems: Unix and THE Presented by Hakim Weatherspoon

The UNIX Time-Sharing System Dennis Ritchie and Ken Thompson Background of authors at Bell Labs –Both won Turing Awards in 1983 Dennis Ritchie –Key developer of The C Programming Lanuage, Unix, and Multics Ken Thompson –Key developer of the B programming lanuage, Unix, Multics, and Plan 9 –Also QED, ed, UTF-8

The UNIX Time-Sharing System Dennis Ritchie and Ken Thompson

Classic system and paper –described almost entirely in 10 pages Key idea –elegant combination of a few concepts that fit together well –API deliberately small Instead of collection of specialized API’s for each device/abstraction

System features Time-sharing system Hierarchical file system Device-independent I/O Shell-based, tty user interface Filter-based, record-less processing paradigm Major early innovations: –“fork” system call for process creation, file I/O via a single subsystem, pipes, I/O redirection to support chains

Version 3 Unix 1969: Version 1 ran PDP : Version 3 Ran on PDP-11’s –Costing as little as $40k! < 50 KB 2 man-years to write Written in C PDP-7PDP-11

File System Ordinary files (uninterpreted) Directories (protected ordinary files) Special files (I/O)

Uniform I/O Model open, close, read, write, seek –Uniform calls eliminates differences between devices other system calls –close, status, chmod, mkdir, ln bytes, no records

Directories root directory path names rooted tree current working directory back link to parent multiple links to ordinary files

Special Files Uniform I/O model –Each device associated with at least one file –But read or write of file results in activation of device Advantage: Uniform naming and protection model –File and device I/O are as similar as possible –File and device names have the same syntax and meaning, can pass as arguments to programs –Same protection mechanism as regular files

Removable File System Tree-structured Mount’ed on an ordinary file –Mount replaces a leaf of the hierarchy tree (the ordinary file) by a whole new subtree (the hierarchy stored on the removable volume) –After mount, virtually no distinction between files on permanent media or removable media

Protection User-world, RWX bits set-user-id bit super user is just special user id

File System Implementation System table of i-numbers (i-list) i-nodes path name scanning mount table buffered data write-behind

I-node Table short, unique name that points at file info. allows simple & efficient fsck cannot handle accounting issues File nameInode# Inode

Many devices fit the block model Disks Drums Tape drives USB storage Early version of the ethernet interface was presented as a kind of block device (seek disabled) But many devices used IOCTL operations heavily

Processes and images text, data & stack segments process swapping pid = fork() pipes exec(file, arg1,..., argn) pid = wait() exit(status)

Easy to create pipelines A “pipe” is a process-to-process data stream, could be implemented via bounded buffers, TCP, etc One process can write on a connection that another reads, allowing chains of commands % cat *.txt | grep foo | wc In combination with an easily programmable shell scripting model, very powerful!

The Shell cmd arg1... argn stdio & I/O redirection filters & pipes multi-tasking from a single shell shell is just a program Trivial to implement in shell –Redirection, background processes, cmd files, etc

Traps Hardware interrupts Software signals Trap to system routine

Perspective Not designed to meet predefined objective Goal: create a comfortable environment to explore machine and operating system Other goals –Programmer convenience –Elegance of design –Self-maintaining

Perspective But had many problems too. Here are a few: –File names too short and file system damaged on crash –Didn’t plan for threads and never supported them well –“Select” system call and handling of “signals” was ugly and out of character w.r.t. other features –Hard to add dynamic libraries (poor handling of processes with lots of “segments”) –Shared memory and mapped files fit model poorly...in effect, the initial simplicity was at least partly because of some serious limitations!

“THE”-Multiprogramming System Edsger W. Dijkstra Received Turing Award in 1972 Contributions –Shortest Path Algorithm, Reverse Polish Notation, Bankers algorithm, semaphore’s, self-stabilization Known for disliking ‘goto’ statements and using computers!

“THE”-Multiprogramming System Edsger W. Dijkstra Never named “THE” system; instead, abbreviation for "Technische Hogeschool Eindhoven” Batch system (no human intervention) that supported multitasking (processes share CPU) –THE was not multiuser Introduced –software-based memory segmentation –Cooperating sequential processes –semaphores

Design Layered structure –Later Multics has layered structure, ring segmentation Layer 0 – the scheduler –Allocated CPU to processes, accounted for blocked proc’s Layer 1 – the pager Layer 2 – communication between OS and console Layer 3 – managed I/O Layer 4 – user programs Layer 5 – the user –“Not implemented by us”!

Perspective Layered approach –Design small, well defined layers –Higher layers dependent on lower ones Helps prove correctness Helps with debugging Sequential process and Semaphores

Next Time Read and write review: –SEDA: An Architecture for Well Conditioned, Scalable Internet Services, Matt Welsch, David Culler, and Eric Brewer. Proceedings of the Eighteenth ACM Symposium on Operating Systems Principles (Banff, Alberta, Canada, 2001), pages –On the duality of operating system structures, H. C. Lauer and R. M. Needham. ACM SIGOPS Operating Systems Review Volume 12, Issue 2 (April 1979), pages

Next Time Read and write review: Lab 0 – finish today Lab 1 – available later today and due next Friday Project Proposal due in two weeks –talk to me and other faculty and and talk to me Check website for updated schedule