CS 6560 Operating System Design Lecture 2. Overview OS Structure Case Study: Linux.

Slides:



Advertisements
Similar presentations
History of UNIX Fergus Toolan Intelligent Information Retrieval Group University College Dublin.
Advertisements

Unix Systems Administration 1Y. K. Chang UNIX History : Bell Lab joined with GEC and Project MAC of MIT to develop Multics: multi-user and data-sharing.
Operating System Introduction. Topics What is an OS? OS History OS Concepts OS Structures.
COMP5102/5122 Lecture 1 Operating Systems (OS) Introduction phones off (please)
Operating System I Introduction.
Operating Systems - Introduction S H Srinivasan
Operating Systems Introduction. Topics F What is an OS? F OS History F OS Concepts F OS Structures.
Silberschatz, Galvin and Gagne  Operating System Concepts Common OS Components Process Management Memory Management File Management I/O System.
Operating System Introduction. Topics F What is an OS? F OS History F OS Concepts F OS Structures.
Operating System Introduction. Topics What is an OS? OS History OS Concepts OS Structures.
Brief History of C and Unix Systems Programming Concepts.
UNIX/Linux System Programming Jordan University of Science and Technology History.
LINUX System : Lecture 2 OS and UNIX summary Bong-Soo Sohn Assistant Professor School of Computer Science and Engineering Chung-Ang University Acknowledgement.
Operating Systems Lecture 4. Agenda for Today Review of previous lecture Operating system structures Operating system design and implementation UNIX/Linux.
WEEK 1 COURSE INTRODUCTION INTRODUCTION TO OPERATING SYSTEMS OPERATING SYSTEM STRUCTURES Operating Systems CS3013 / CS502.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 14, 2005 Operating System.
Chapter 1: Welcome to Linux An intro to UNIX-related operating systems.
LIS508 background of GNU/Linux
Chapter 2 Operating System Overview
Unix Programming Environment Part 1 – An Introduction to This Course Dept. of CSE, BUAA.
Unix/Linux. What is Unix & Linux? Unix is a computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including.
Operating System Part II: Introduction to the Unix Operating System (The Evolution of Unix)
Ihr Logo Operating Systems Internals & Design Principles Fifth Edition William Stallings Chapter 2 (Part II) Operating System Overview.
CE Operating Systems Lecture 5 Overview of Unix/Linux operating systems.
LINUX System : Lecture 7 Bong-Soo Sohn Lecture notes acknowledgement : The design of UNIX Operating System.
History of UNIX a short version CSCI 333 August 31, 2011.
LIS508 lecture 6: looking at linux Thomas Krichel
Just Enough Unix, Chapter 1
UNIX Operating Systems and Kernels Presented By: Walter Haynes April 26, 2007.
Operating System Introduction. Topics What is an OS? OS History OS Concepts OS Structures.
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 10 Case Study 1: LINUX Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
CS2204: Introduction to Unix January 19 th, 2004 Class Meeting 1 * Notes adapted by Christian Allgood from previous work by other members of the CS faculty.
Linux Overview COMS W4118 Spring Slides based on Phil Hutto, Silberschatz 2 History Linux is a modern, free operating system based on UNIX standards.
CSNB334 Advanced Operating Systems 1. Introduction to Linux Lecturer: Abdul Rahim Ahmad.
Overview of Operating Systems Introduction to Operating Systems: Module 0.
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
CSCI 330 UNIX and Network Programming Unit I Introduction.
The UNIX Time-sharing system
Introduction 1 Chapter 1. Introduction History and Proliferation Mandate for Change What’s Good and Wrong Scope of this course.
UNIX & Windows NT Name: Jing Bai ID: Date:8/28/00.
Basic UNIX Concepts. Why We Need an Operating System (OS) OS interacts with hardware and manages programs. A safe environment for programs to run is required.
Background & History of UNIX & Linux Fort Collins, CO Copyright © XTR Systems, LLC The Background and Short History of UNIX & Linux Instructor: Joseph.
Operating-System Structures
Chapter 2 Operating System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 1.
Agenda UNX122_022_w1_p3 Overview of UNIX
CCSB234/CSNB234 Operating System Concepts Semester 2, Dec 2006 – Mar 2007 Abdul Rahim Ahmad.
MINIX 3 – Introduction Béat Hirsbrunner Lecture 1, 18 September 2012 Main reference Andrew S. Tanenbaum, Albert S. Woodhull Operating Systems : Design.
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.
By Collin Donaldson.  Origin of an OS: From UNIX to Kali Linux  Linux Architectures and Ubiquity  What is Kali and why should I use it?  Kali’s New.
OPS224 Operating Systems - Unix Instructor: MURRAY SAUL.
Fall 2011 Nassau Community College ITE153 – Operating Systems 1 Session 10 Let’s Bring Everything Together.
Reverse Engineered Architecture of the Linux Kernel Kristof De Vos.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
CIT 140: Introduction to ITSlide #1 CSC 140: Introduction to IT Operating Systems.
UDel CISC361 Study Operating System principles - processes, threads - scheduling - mutual exclusion - synchronization - deadlocks - memory management -
Computer System Structures
A LECTURE NOTE.
A Synopsis of Their History
A History of Linux Damian Gordon.
MODERN OPERATING SYSTEMS Third Edition ANDREW S
CASE STUDY 1: Linux and Android
Case Study : Linux In the previous chapters, we examined many operating system principles, abstractions, algorithms, and techniques in general. Now it.
Operating Systems Lecture 4.
Chapter 2: The Linux System Part 1
LINUX System : Lecture 7 Lecture notes acknowledgement : The design of UNIX Operating System.
Case Study : Linux In the previous chapters, we examined many operating system principles, abstractions, algorithms, and techniques in general. Now it.
OS Organization.
Outline Operating System Organization Operating System Examples
Case Study : Linux In the previous chapters, we examined many operating system principles, abstractions, algorithms, and techniques in general. Now it.
Presentation transcript:

CS 6560 Operating System Design Lecture 2

Overview OS Structure Case Study: Linux

Operating System Structure Some Alternatives –Monolithic Kernel – one big kernel program, not necessarily a mess as Tanenbaum characterizes it Example: Linux –Microkernel – run most of code in user mode, only a few functions reside in kernel, other modules do most of the work Example: Mach – Example: HURD – –Layered System Example: the THE system by E. W. Dijkstra and his students Example: MULTICS –Virtual Machines Examples: IBM VM/360, Java virtual machine (JVM), VMWare –Exokernels – get away from the idea of abstracting hardware, concentrate on multiplexing the computer’s resources, use libraries Example MIT : –Distributed Systems

Kernel-based Systems (Monolithic) System calls File Management Process Management Interprocess Communication Management Memory Management General Purpose FunctionsDevice tablesDevice Drivers Kernel Application Programs Device

Microkernal-based Systems

Layered Systems (THE)

Distributed Systems

Case Study: Linux Ritchie and Thompson Bowman, et al. Mehta, et al.

Case Study Unix &Linux 10.1 History Overview and Tour of Unix/Linux Help Program Development Proc file system

Unix & Linux History MULTICS = MULTiplexed Information and Computing Service Ken Thompson of AT&T Bell Labs began work on stripped down version of MULTICS on a PDP- 7 (used another computer to compile it) Brian Kernighan named it UNICS = UNIplexed Information and Computing Service Named UNIX when it could compile itself. Dennis Ritchie joined.

More UNIX History Moved to PDP-11/20, then PDP-11/45 (256 KB), then PDP-11/70 (768 KB), the Interdata 8/32 Language –First in assembly language (A) –Then in B (a derivative of BCPL) –Kernighan and Ritchie developed C and Thompson and Ritchie rewrote UNIX in C.

More History 1974, Ritchie and Thompson wrote an paper in Communications of ACM –available online as 1978 revised version –received ACM Turing award Spread to Universities, licensed by AT&T

AT&T Versions Thompson and Ritchie’s group (with complete source code) –Version 6 – 8200 lines of C code and 900 lines of assembly –Version 7 – 18,000 lines of C code and 2100 lines of assembly –Versions 8, 9, 10 AT&T commercial versions (after 1984 when AT&T was broken up) –System III –System V Release R2, R3, R4 License sold to Novell in 1993 which sold it it to Santa Cruz Operation in 1995

U C Berkeley Versions Funded by ARPA (= U S Department of Defense Advanced Projects Agency ) BSD = Berkeley Standard Distribution 1BSD, 2BSD, 3BSD, 4BSD 4BSD had virtual memory, long file names, faster file system, vi, csh

Standardization of Unix Late 1980s: Two main version: BSD4.3 and AT&T SVR3, plus many vendor versions, perhaps as many as 25 different versions AT&T: SVID (System V Interface Definition) IEEE: POSIX (Portable Operating System) – defined interface to kernel as a set of library functions ANSI and ISO: Standardized C OSF = Open Software Foundation The Open Group – The Single UNIX Specification, Version 3 –see:

MINIX Developed by Tanebaum as a teaching tool Microkernel design Size –Microkernel: 1600 lines of C and 800 lines of assembly, plus device drivers (2900 lines of C) –File system: 5100 lines of C –Memory: 2200 lines of C Version 2.0 in 1997 grew to 62,000 lines of C

LINUX Linus Torvalds – Finnish CS Student Borrowed ideas from MINIX: structure of source code, layout of filesystem Monolithic kernel rather than Microkernel Sizes –Version 0.01 (1991) 9,300 lines of C and 950 lines of assembly –Version 1.0 (1994) 165,000 lines of C –Version 2.0 (1996) 470,000 lines of C and 8000 lines of assembly

More on LINUX Free software –Uses GNU Public License (GPL) Just the kernel – other parts of the system mainly from the GNU project: Some Web Sites: –The Linux Kernel Archives –The Linux Documentation Project –Linux Online

Linux Versions Three numbers separated by periods –First, the major version number (currently 2) –Next, the minor version number (currently 6) –Third, the release number Even minor numbers are stable releases and odd minor numbers are developmental (beta) releases. Example: is the current stable release of the current stable kernel.

Unix Design Goals Unix Design Goals and Principles –timesharing –simplicity –multiple processes –construction set approach: pipes and filters –designed by programmer for programmers –flexibility –unity –written in HLL (C) –on-line documentation –local maintenance

Some More Books Stones and Mathew, Beginning Linux Programming, Wrox. Stevens, Advanced Programming in the UNIX Environment. Keith Haviland, Dina Gray, Ben Salama, UNIX System Programming, Addison Wesley, Maurice J. Bach, The Design of the UNIX Operating System, Prentice- Hall, Brian W. Kernighan and and Dennis M. Ritchie, The C Programming Language, Prentice-Hall, 2nd Edition, S. Leffler, M. McKusick, M. Karels, J. Quarterman, The Design and Implementation of the 4.3BSD UNIX Operating System, Addison- Wesley, Evi Nemeth, Garth Snyder, and Scott Seebas, UNIX System Administration Handbook, Prentice-Hall, latest edition.

Software Architecture of Linux References: –Bowman, Holt, Brewster, Linux as a Case Study, ICSE –Nikunj R. Mehta, Nenad Medvidovic, Sandeep Phadke, Towards a Taxonimy of Software Connectors, ICSE Levels of analysis –Conceptual – high level based on documentation and discussions –Concrete – lower level, based on computation of software connections Application to Linux –Open source – entire source code can be examined electronically

Bowman: Methodology Conceptual –Consult Linux documentation –Consult descriptions of related operating systems Concrete –Use conceptual architecture as starting point –Group source files into subsystems –Use software tools to extract procedure calls, variable references –Determine relationships between source files –Use relationships between source files and clustering of files to determine relationships between subsystems

Source Code Organization linux-2.4 kernel arch fs include lib drivers abiinit netipc scriptsDocumentation crypto configs mm

Results of Bowman Study Subsystems –Process Scheduler –Memory management –File System –Interprocess Communications –Network Interface –Library –Initialization Connections More connections at concrete model – nearly a complete graph

Comments by Mehta, et al. Procedure calls and data references don’t give a clear picture of a system’s architecture Higher level constructs called connectors are more valuable

From Bowman’s Linux Conceptual Arch Interprocess Communication Library Memory Manager File System Network Interface Initialization Process Scheduler

Bowman’s Kernel Subsystems Process Scheduler –Provides dynamic priority-based multitasking for user and kernel processes –Provides primitives for creating and terminating processes Memory Manager (mm) –Provides separate virtual memory addressing space for each user process –Uses swapping to support memory overbooked sharing –Provides physically and logically contiguous memory for kernel –Provides object caching for kernel File System (fs) –Provides uniform access to hardware and virtual devices from multiple types of file systems –Provides a dynamic tree-structured directory system for files Network Interface (net) –Provides access to network devices Interprocess Communication (IPC) –Provides communication facilities among processes on the same system Initialization –Initializes the Linux kernel on start up. Library –Provides routines that are used throughout the kernel.

Bowman’s FS Conceptual Arch Device Drivers –Performs all communications with supported hardware devices Logical File Systems –Implements a variety logical file systems that can be placed on physical devices Executable File Formats –Supports a variety of executable formats File Quota –Allows system administrators to limit the amount of file storage that individual users may use Buffer Cache –Optimizes access to block devices by using virtual memory buffers System Call Interface –Provides uniform user program interface to file system Virtual File System (VFS) –Provides uniform kernel interface to file system

Bowman’s Concrete Arch for FS Virtual File System File Quota Device Drivers Buffer Cache Executable File Formats System Call Interface Logical File Systems Memory Manager Network Interface Init Process Scheduler IPC