MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 10 Case Study 1: LINUX Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,

Slides:



Advertisements
Similar presentations
Bab 14 IMPLEMENTASI TEORI SISTEM OPERASI. SISTEM UNIX.
Advertisements

Slide 2-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 2 Using the Operating System 2.
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 3 Memory Management Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
14 Macintosh OS X Internals. © 2005 Pearson Addison-Wesley. All rights reserved The Macintosh Platform 1984 – first affordable GUI Based on Motorola 32-bit.
Chap 2 System Structures.
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 Case Study 1: UNIX and LINUX Chapter History of unix 10.2 Overview of unix 10.3 Processes in unix 10.4 Memory management in unix 10.5 Input/output.
Ceng Operating Systems 10-1 Chapter 10 : Case Study - UNIX History of unix Overview of unix Processes in unix Memory management in unix Input/output.
Chapter 1 Introduction
COMP5102/5122 Lecture 1 Operating Systems (OS) Introduction phones off (please)
Operating Systems - Introduction S H Srinivasan
Common System Components
File System Implementation
Silberschatz, Galvin and Gagne  Operating System Concepts Common OS Components Process Management Memory Management File Management I/O System.
Linux Operating System
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 2: Operating-System Structures Modified from the text book.
Linux Shells Dr. Michael L. Collard 1.
Unix Background / History CSE 4251, Sp 2014, Bolz 422 Dr. Bob Mathis,
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 4 File Systems Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc.
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 11 Case Study 2: Windows Vista Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
Overview of Linux CS3530 Spring 2014 Dr. José M. Garrido Department of Computer Science.
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,
CASE STUDY 1: Linux and Android Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Cs431 - cotter 1 Linux References Running Linux – Ch 1, etc. Tanenbaum – Ch 10.1,10.2 Linux man pages (man xxx)
Introduction to Operating Systems Chapter 1. cs431 -cotter2 Lecture Objectives Understand the relationship between computing hardware, operating system,
LIS508 background of GNU/Linux
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 1 Introduction Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Chapter 7 UNIX and LINUX. 2 Outline Overview Processes in UNIX Memory management in UNIX I/O in UNIX UNIX file system.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Operating System Part II: Introduction to the Unix Operating System (The Evolution of Unix)
30 October Agenda for Today Introduction and purpose of the course Introduction and purpose of the course Organization of a computer system Organization.
History of UNIX a short version CSCI 333 August 31, 2011.
LIS508 lecture 6: looking at linux Thomas Krichel
1 Chapter 10 : Case Study - UNIX History Overview Processes Memory management Input/output in The unix file system Security Note: This case study covers.
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.
CSE 5343/7343UNIX Case Study1 CSE 5343/7343 Fall 2006 Case Studies UNIX.
1 Lecture 1 Introduction & Getting Started COP 3353 Introduction to UNIX.
CSE 5343/7343UNIX Case Study1 CSE 5343/7343 Fall 2006 Case Studies UNIX History/Processes.
The UNIX File System (1) Some important directories found in most UNIX systems.
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.
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.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Introduction to UNIX CS 2204 Class meeting 1 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
Chapter 1 Basic Concepts of Operating Systems Introduction Software A program is a sequence of instructions that enables the computer to carry.
The UNIX Time-Sharing System Mosharaf Chowdhury EECS 582 – W1611/11/16.
Chapter 1 Introduction  What is an operating system  History of operating systems  The operating system zoo  Computer hardware review  Operating system.
What is a Process ? A program in execution.
MINIX 3 – Introduction Béat Hirsbrunner Lecture 1, 18 September 2012 Main reference Andrew S. Tanenbaum, Albert S. Woodhull Operating Systems : Design.
Operating Systems Case Study Linux 1. Objectives History of Linux Linux Architecture Threads and States 2.
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.
Fall 2011 Nassau Community College ITE153 – Operating Systems 1 Session 10 Let’s Bring Everything Together.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Operating System Structure Lecture: - Operating System Concepts Lecturer: - Pooja Sharma Computer Science Department, Punjabi University, Patiala.
Overview of Linux Fall 2016 Dr. Donghyun Kim
MODERN OPERATING SYSTEMS Third Edition ANDREW S
CSE 5343/7343 Fall 2002 Case Studies UNIX CSE 5343/7343
Case Study 1: UNIX and LINUX
CASE STUDY 1: Linux and Android
10CS53 Operating Systems Unit VIII Engineered for Tomorrow
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Unix : Introduction and Commands
10CS53 Operating Systems Unit VIII Engineered for Tomorrow
UNIX Introduction.
The UNIX Time Sharing System
Presentation transcript:

MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 10 Case Study 1: LINUX Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

2 HISTORY of Unix (1) MULTICS (M.I.T., Bell Labs, & GE) –MULTiplexed Information and Computing Service Bell Labs pulls out and Ken Thompson looks for something to do –Writes a stripped down version of MULTICS by himself for a PDP-7. Brian Kernighan names it UNICS –UNiplexed Information and Computing Service Dennis Ritchie joins the effort and UNIX is ported to PDP-11/45 and PDP-11/70 (dominate minicomputers of 1970’s) UNIX is rewritten in high-level language –B was simplified version of BCPL (Basic CPL), a descendent of CPL (Combined Programming Language). (Alternate version: B was derived from Bon an earlier language that Thompson wrote which, in turn, was named after his wife, Bonnie.) –Dennis Ritchie designed a successor to B and named it C.

3 HISTORY of Unix (2) AT&T (owner of Bell Labs) distributes UNIX to universities for a modest fee. University of California at Berkeley ports UNIX to the VAX (4BSD) and implements virtual memory, long filenames, a better file system, the network protocol TCP/IP, a new editor (vi), a new shell (csh), and new compilers (Pascal & Lisp). In 1987, Andrew Tanenbaum releases a new stripped-down version called MINIX that could be used by O.S. classes. In 1991, Finnish student, Linus Torvalds, added features to MINIX and releases a full- blown UNIX clone named Linux.

4 Unix / Linux Goals –Designed by programmers for programmers “What they want is a servant, not a nanny.” –Simple, elegant, and consistent design “Principle of least surprise” –Power and Flexibility Commands should do just one thing and do it well –Avoid useless redundancy use cp instead of copy

Figure The layers in a Linux system. Interfaces to Linux Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

UNIX Shells sh (Bourne shell): The earliest major UNIX shell was written by Steve Bourne in csh (C shell): Written by Bill Joy as a part of the Berkeley project. Adds C-like operators, and command-line recall. ksh (Korn shell): Combines features of sh and csh as well as some new features. Written by David Korn in bash (Bourne-again shell): Developed as part of the GNU project. It is a POSIX-conforming shell that includes some of the best features of csh and ksh as well as adding some of its own. This is the default shell used by TAZ.

Linux Utility Programs (1) Categories of utility programs: File and directory manipulation commands. Filters. Program development tools, such as editors and compilers. Text processing. System administration. Miscellaneous. Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure A few of the common Linux utility programs required by POSIX. Linux Utility Programs (2) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure Structure of the Linux kernel Kernel Structure Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure Process creation in Linux. Processes in Linux Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure The signals required by POSIX. Signals in Linux (1) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure Some system calls relating to processes. Process Management System Calls in Linux Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure A highly simplified shell. A Simple Linux Shell Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

14 Process Zombie States When a child process exits, it sends a message to its parent containing its exit status. If the parent isn’t waiting for this message (or if the parent is no longer present), the child enters the zombie state.

Implementation of Processes and Threads Categories of information in the process descriptor : Scheduling parameters Memory image Signals Machine registers System call state File descriptor table Accounting Kernel stack Miscellaneous Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure The steps in executing the command ls typed to the shell. Implementation of Exec Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure Bits in the sharing_flags bitmap. The Clone System Call Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Scheduling in Linux (1) Three classes of threads for scheduling purposes: Real-time FIFO. (Priorities 0 – 99; non-preemptive) Real-time round robin. (Priorities 0 – 99; preemptive) Timesharing. (priorites 100 – 139) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved Note:Highest priority = 0 Lowest priority = 140

Figure Illustration of Linux runqueue and priority arrays. Scheduling in Linux (2) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure The sequence of processes used to boot some Linux systems. Booting Linux Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure (a) Process A’s virtual address space. (b) Physical memory. (c) Process B’s virtual address space. Memory Management in Linux (1) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure Two processes can share a mapped file. Memory Management in Linux (2) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure Some system calls relating to memory management. Memory Management System Calls in Linux Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Physical Memory Management (1) Linux distinguishes between three memory zones: ZONE_DMA - pages that can be used for DMA operations. ZONE_NORMAL - normal, regularly mapped pages. ZONE_HIGHMEM - pages with high-memory addresses, which are not permanently mapped. Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure Linux main memory representation. Physical Memory Management (2) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure Linux uses four-level page tables. Physical Memory Management (3) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure Operation of the buddy algorithm. Memory Allocation Mechanisms Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure Page states considered in the page frame replacement algorithm. The Page Replacement Algorithm Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure The uses of sockets for networking. Networking (1) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Networking (2) Types of networking: Reliable connection-oriented byte stream. Reliable connection-oriented packet stream. Unreliable packet transmission. Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure The main POSIX calls for managing the terminal. Input/Output System Calls in Linux Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure Some of the file operations supported for typical character devices. The Major Device Table Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure The Linux I/O system showing one file system in detail. Implementation of Input/Output in Linux (2) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure Some important directories found in most Linux systems. The Linux File System (1) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure (a) Before linking. (b) After linking. The Linux File System (2) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure (a) Separate file systems. (b) After mounting. The Linux File System (3) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure (a) A file with one lock. (b) Addition of a second lock. (c) A third lock. The Linux File System (4) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure System calls relating to files. File System Calls in Linux (1) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure The fields returned by the stat system call. File System Calls in Linux (2) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure System calls relating to directories. File System Calls in Linux (3) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure File system abstractions supported by the VFS. The Linux Virtual File System Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure Disk layout of the Linux ext2 file system. The Linux Ext2 File System (1) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure (a) A Linux directory with three files. (b) The same directory after the file voluminous has been removed. The Linux Ext2 File System (2) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure Some fields in the i-node structure in Linux The Linux Ext2 File System (3) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure The relation between the file descriptor table, the open file description table, and the i-node table. The Linux Ext2 File System (4) Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure Examples of remote mounted file systems. Directories shown as squares, files shown as circles. NFS Protocols Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure The NFS layer structure NFS Implementation Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure Some example file protection modes. Security In Linux Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Figure system calls relating to security. Security System Calls in Linux Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved