MODERN OPERATING SYSTEMS Third Edition ANDREW S

Slides:



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

MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 3 Memory Management Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
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)
Process Management. External View of the OS Hardware fork() CreateProcess() CreateThread() close() CloseHandle() sleep() semctl() signal() SetWaitableTimer()
Operating Systems - Introduction S H Srinivasan
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.
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.
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.
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)
History of UNIX a short version CSCI 333 August 31, 2011.
1 Chapter 10 : Case Study - UNIX History Overview Processes Memory management Input/output in The unix file system Security Note: This case study covers.
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.
CSE 5343/7343UNIX Case Study1 CSE 5343/7343 Fall 2006 Case Studies UNIX.
CSE 5343/7343UNIX Case Study1 CSE 5343/7343 Fall 2006 Case Studies UNIX History/Processes.
1 Lecture 6 Introduction to Process Management COP 3353 Introduction to UNIX.
The UNIX File System (1) Some important directories found in most UNIX systems.
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
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.
MINIX 3 – Introduction Béat Hirsbrunner Lecture 1, 18 September 2012 Main reference Andrew S. Tanenbaum, Albert S. Woodhull Operating Systems : Design.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Overview of Linux Fall 2016 Dr. Donghyun Kim
A LECTURE NOTE.
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Unix Scripting Session 1 March 6, 2008.
CSE 5343/7343 Fall 2002 Case Studies UNIX CSE 5343/7343
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Case Study 1: UNIX and LINUX
CASE STUDY 1: Linux and Android
Operating Systems: A Modern Perspective, Chapter 6
Case Study : Linux In the previous chapters, we examined many operating system principles, abstractions, algorithms, and techniques in general. Now it.
10CS53 Operating Systems Unit VIII Engineered for Tomorrow
Processes in Unix, Linux, and Windows
OPERATING SYSTEMS DESIGN AND IMPLEMENTATION Third Edition ANDREW S
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Unix : Introduction and Commands
10CS53 Operating Systems Unit VIII Engineered for Tomorrow
Chapter 2: The Linux System Part 1
Operating Systems Case Study
UNIX Introduction.
Chapter 2: Operating-System Structures
Operating Systems Lecture 1.
Case Study : Linux In the previous chapters, we examined many operating system principles, abstractions, algorithms, and techniques in general. Now it.
Processes in Unix, Linux, and Windows
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.
System calls….. C-program->POSIX call
Chapter 2: Operating-System Structures
The UNIX Time Sharing System
Presentation transcript:

MODERN OPERATING SYSTEMS Third Edition ANDREW S 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. 0-13-6006639 1

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.

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.

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 10-1. The layers in a Linux system. Interfaces to Linux Figure 10-1. The layers in a Linux system. Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639

UNIX Shells sh (Bourne shell): The earliest major UNIX shell was written by Steve Bourne in 1979. 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 1986. 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. 0-13-6006639

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

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

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

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

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

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

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. 0-13-6006639

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

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

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) Note: Highest priority = 0 Lowest priority = 140 Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639

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

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

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

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

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

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. 0-13-6006639

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

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

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

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

Figure 10-19. The uses of sockets for networking. Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639

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. 0-13-6006639

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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