CSE350 Software Design and Engineering University of Pennsylvania Professor Jonathan M. Smith Office: 254 Moore GRW, Phone:

Slides:



Advertisements
Similar presentations
Slide 2-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 2 Using the Operating System 2.
Advertisements

Classic Systems: Unix and THE Presented by Hakim Weatherspoon.
EEE 435 Principles of Operating Systems Operating System Concepts (Modern Operating Systems 1.5)
Enrique Blanco García © 2004 Introduction to the UNIX environment Enrique Blanco Cover from the book Modern operating systems. A. Tanenbaum.
Unix Systems Administration 1Y. K. Chang Reasons for UNIX’s success 4 Written in high level language –easy to read, understand, change, and move to other.
1 Processes Professor Jennifer Rexford
Contiki A Lightweight and Flexible Operating System for Tiny Networked Sensors Presented by: Jeremy Schiff.
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.
INTRODUCTION OS/2 was initially designed to extend the capabilities of DOS by IBM and Microsoft Corporations. To create a single industry-standard operating.
Introduction to Kernel
Home: Phones OFF Please Unix Kernel Parminder Singh Kang Home:
6/24/2015B.RamamurthyPage 1 File System B. Ramamurthy.
1 File Management in Representative Operating Systems.
Cs238 Lecture 3 Operating System Structures Dr. Alan R. Davis.
JMS 1 CSE 350, Spring 2001 The Unix Time-sharing System Chuck Davin Software Design & Engineering CSE 350 Spring 2001.
1 I/O Management in Representative Operating Systems.
Rensselaer Polytechnic Institute CSC 432 – Operating Systems David Goldschmidt, Ph.D.
Processes in Unix, Linux, and Windows CS-502 Fall Processes in Unix, Linux, and Windows CS502 Operating Systems (Slides include materials from Operating.
7/15/2015B.RamamurthyPage 1 File System B. Ramamurthy.
Copyright Arshi Khan1 System Programming Instructor Arshi Khan.
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 memory.
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.
1 COMPSCI 110 Operating Systems Who - Introductions How - Policies and Administrative Details Why - Objectives and Expectations What - Our Topic: Operating.
OPERATING SYSTEM OVERVIEW. Contents Basic hardware elements.
UNIX and Shell Programming (06CS36)
LINUX System : Lecture 2 OS and UNIX summary Bong-Soo Sohn Assistant Professor School of Computer Science and Engineering Chung-Ang University Acknowledgement.
OS provide a user-friendly environment and manage resources of the computer system. Operating systems manage: –Processes –Memory –Storage –I/O subsystem.
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment.
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems CSCI-6140 – Computer Operating Systems David Goldschmidt, Ph.D.
CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.
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.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Background: Operating Systems Brad Karp UCL Computer Science CS GZ03 / M th November, 2008.
UNIX Files File organization and a few primitives.
Operating Systems David Goldschmidt, Ph.D. Computer Science The College of Saint Rose CIS 432.
LINUX System : Lecture 7 Bong-Soo Sohn Lecture notes acknowledgement : The design of UNIX Operating System.
OSes: 3. OS Structs 1 Operating Systems v Objectives –summarise OSes from several perspectives Certificate Program in Software Development CSE-TC and CSIM,
File System Implementation
UNIX and Shell Programming
Files & File system. A Possible File System Layout Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved
Processes CS 6560: Operating Systems Design. 2 Von Neuman Model Both text (program) and data reside in memory Execution cycle Fetch instruction Decode.
We will focus on operating system concepts What does it do? How is it implemented? Apply to Windows, Linux, Unix, Solaris, Mac OS X. Will discuss differences.
UNIX Unit 1- Architecture of Unix - By Pratima.
Chapter 13 – I/O Systems (Pgs ). Devices  Two conflicting properties A. Growing uniformity in interfaces (both h/w and s/w): e.g., USB, TWAIN.
Linux File system Implementations
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.
Operating Systems, Spring 2003 Local File Systems in UNIX Ittai Abraham Zinovi Rabinovich (recitation)
Copyright © Curt Hill Operating Systems An Introductory Overview.
The UNIX Time-Sharing System Mosharaf Chowdhury EECS 582 – W1611/11/16.
Concepts and Structures. Main difficulties with OS design synchronization ensure a program waiting for an I/O device receives the signal mutual exclusion.
I/O Software CS 537 – Introduction to Operating Systems.
ECE 456 Computer Architecture Lecture #9 – Input/Output Instructor: Dr. Honggang Wang Fall 2013.
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.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
Introduction to Operating Systems Concepts
Introduction to Kernel
Introduction to Operating Systems
CASE STUDY 1: Linux and Android
Chapter 2: System Structures
CS490 Windows Internals Quiz 2 09/27/2013.
Introduction to Operating Systems
File System B. Ramamurthy B.Ramamurthy 11/27/2018.
Operating Systems Chapter 5: Input/Output Management
Advanced UNIX progamming
LINUX System : Lecture 7 Lecture notes acknowledgement : The design of UNIX Operating System.
Chapter 1: Introduction CSS503 Systems Programming
Mr. M. D. Jamadar Assistant Professor
Introduction to Operating Systems
The UNIX Time Sharing System
Presentation transcript:

CSE350 Software Design and Engineering University of Pennsylvania Professor Jonathan M. Smith Office: 254 Moore GRW, Phone: January 9th, 2001

Administrative lFirst group assignment Tuesday, 1/15 lGroups will be formed today lWe will use as the class web site lIt’s currently outdated – will fix

What is an operating system? lAn operating system manages hardware resources lTypically, for multiple users lProtection, services such as file systems (structure), concurrent execution, buffering, etc. lIn UNIX (for example), OS functions are privileged – behind a protection boundary

The Unix Time-sharing System (slides from J.R. Davin) lD. M. Ritchie and K. Thompson. The Unix time-sharing system. BSTJ, 57:6 (July-August, 1978), lK. Thompson. Unix implementation. BSTJ, 57:6 (July-August, 1978),

Features lA hierarchical filesystem incorporating demountable volumes lCompatible file, device, interprocess communication lThe ability to initiate asynchronous processes lSystem command language selectable on a per-user basis lOver 100 subsystems including a dozen languages lHigh degree of portability

Economics of the 1970s lHardware cost: $40,000 lSoftware cost: two man-years lCost recovery for disk space

PDP-11/70 Platform l16-bit word (8-bit byte) l768 KBytes core memory lSystem kernel 90 KBytes lMinimal system 96 Kbytes lTwo 200 MByte moving-head disks l20 variable speed (300 to 1200 baud) communication interfaces l12 communication lines (9600 baud) lSynchronous interfaces (2400 and 4800 baud) for inter-machine file transfer lNine-track tape, line printer, phototypesetter lVoice synthesizer, digital switching network, chess machine

A Unix System in 1978 lUser population: 125 lMaximum simultaneous users: 33 lDirectories: 1630 lFiles: lDisk blocks (512-byte) used: 301,700 lDaily command invocations: lDaily (non-idle) CPU hours: 9.6 lDaily connect hours: 230

The C Programming Language lSystem re-coded in C in summer, 1973 l1/3 bigger than assembler language version

Observation "The most important role of the system is to provide a file system." (Page 1907)

Filesystem Properties lInternal file structure controlled by application programs lInternal file structure not imposed by system lHierarchy lDirectories as files l"." and ".." convention lLinks lRestrictions on namespace topology lMountable volumes

File Types lOrdinary lDirectory lSpecial Character Block

Filesystem Representation li-Number li-List li-Node

File Properties lOwner user-id lOwner group-id lProtection bits lPhysical disk (or tape) address of contents lSize lTime of creation lTime of last use lTime of last modification lNumber of links lFile type

File Protection lUser (owner) read, write, execute lGroup read, write, execute lOthers read, write, execute lSet-user-id --drwxwrxrwx l"Execute" permission on directories

Filesystem API lfilep = open (name, flag) lfilep = creat (name) ln = read (filep, buffer, count) ln = write (filep, buffer, count) llocation = lseek (filep, offset, base)

Why file descriptors? Consider open(“/home/jms/cse350.txt”) Consider read(“/home/jms/cse350.txt”) open() happens once, read() many times Pay cost of name lookup, permissions checks (existence!) at open(), reuse results, repetitively, at read() open() returns a descriptor, used by read()

Example: copy a file from one place to another main() { char c; int r_fd = 0, w_fd = 1; while( read(r_fd, &c, 1) > 0 ) write(w_fd, &c, 1); }

Crossing protection boundary lHow does a program access services? lIt does so through entry points called system calls These include read(), write(), open(), close() and creat() lAppear to be subroutines calls in “C”

File Space Management lBlocks 0 through 9 indicated in i-node lBlocks 10 through 137 indicated indirectly lBlocks 138 through indicated doubly indirectly lBlocks and higher indicated triply indirectly Performance Techniques: caching and read- ahead

Special File Naming Example Name: /dev/foo lMajor Device Number: selects driver code lMinor Device Number: selects device instance within class

File System Data Structure

Process Management API lprocessid = fork () lexecute (file, arg1,..., argN) lprocessid = wait (& status) lexit (status) lfilep = pipe () lTraps, Signals lMinimalist, integrated process synchronization

Process Control Data Structure

The Shell and Reusability lRedirection lStdin, stdout, stderr lPipes and filters lArgument parsing and globbing lMultitasking lBasic control structures

Perspective "The success of the Unix system is largely due to the fact that it was not designed to meet any predefined objectives.“ (Page 1926) Motivation: dissatisfaction with existing facilities.

Retrospective Design Considerations lEasy to write, test, run programs Interactive use lConstraints on size lSelf-maintenance Available source code

Easy Programming lDevice-independent file abstraction lNo "access methods" lFew system constraints on program

Influences lfork () from GENIE time-sharing system lI/O API from Multics lShell concept from Multics lImplementing "system" code as user primitives from Multics

Unix Implementation l10,000 lines of C code l1,000 lines of assembler code 800 lines not possible in C 200 lines for efficiency

Observation "Throughout, simplicity has been substituted for efficiency." (Page 1932)

Observation "The UNIX kernel is an I/O multiplexer more than a complete operating system. This is as it should be." (Page 1945)

Unsupported (unwanted?) features: lFile access methods lFile disposition lFile formats lFile maximum size lSpooling lCommand language lLogical records lPhysical records lLogical file names lMultiple character sets lOperator and operator console lLogin and logout