Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 2.

Slides:



Advertisements
Similar presentations
3.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Process An operating system executes a variety of programs: Batch system.
Advertisements

Processes Management.
 2004 Deitel & Associates, Inc. All rights reserved. 1 Chapter 3 – Process Concepts Outline 3.1 Introduction 3.1.1Definition of Process 3.2Process States:
Modified from Silberschatz, Galvin and Gagne ©2009 Lecture 7 Chapter 4: Threads (cont)
Introduction to Kernel
Advanced OS Chapter 3p2 Sections 3.4 / 3.5. Interrupts These enable software to respond to signals from hardware. The set of instructions to be executed.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
History n Linux is a modern, free operating system based on UNIX standards. n First developed as a small, but self- contained, kernel in 1991 by Linus.
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 2: Operating-System Structures Modified from the text book.
Processes in Unix, Linux, and Windows CS-502 Fall Processes in Unix, Linux, and Windows CS502 Operating Systems (Slides include materials from Operating.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 4: Multithreaded Programming.
CSE 451: Operating Systems Autumn 2013 Module 6 Review of Processes, Kernel Threads, User-Level Threads Ed Lazowska 570 Allen.
Chapter 4: Threads. From Processes to Threads 4.3 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th edition, Jan 23, 2005 Threads.
Silberschatz, Galvin and Gagne ©2011Operating System Concepts Essentials – 8 th Edition Chapter 4: Threads.
21.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 21: The Linux System Linux History Design Principles Kernel.
CSC 322 Operating Systems Concepts Lecture - 4: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 14, 2005 Operating System.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Operating.
Chapter 41 Processes Chapter 4. 2 Processes  Multiprogramming operating systems are built around the concept of process (also called task).  A process.
Chapter 10: File-System Interface 10.1 Silberschatz, Galvin and Gagne ©2011 Operating System Concepts – 8 th Edition 2014.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Chapter 1 : The Linux System Part 1 Lecture 1 10/21/
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.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
CE Operating Systems Lecture 10 Processes and process management in Linux.
4P13 Week 3 Talking Points 1. Process State 2 Process Structure Catagories – Process identification: the PID and the parent PID – Signal state: signals.
Processes – Part I Processes – Part I. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Review on OSs Upon brief introduction of OSs,
Processes CS 6560: Operating Systems Design. 2 Von Neuman Model Both text (program) and data reside in memory Execution cycle Fetch instruction Decode.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 4: Threads Modified from the slides of the text book. TY, Sept 2010.
Chapter 4: Multithreaded Programming. 4.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts What is Thread “Thread is a part of a program.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 4: Threads.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 4: Threads.
CSC414 “Introduction to UNIX/ Linux” Lecture 2. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
Threads, Thread management & Resource Management.
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.
Chapter 2 Process Management. 2 Objectives After finish this chapter, you will understand: the concept of a process. the process life cycle. process states.
1 Process Description and Control Chapter 3. 2 Process A program in execution An instance of a program running on a computer The entity that can be assigned.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 1.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 3.
What is a Process ? A program in execution.
Chapter 3: Processes. 3.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 3: Processes Process Concept Process Scheduling Operations.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 12: I/O Systems I/O hardwared Application I/O Interface Kernel I/O.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 5.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 4.
Threads, SMP, and Microkernels Chapter 4. Processes and Threads Operating systems use processes for two purposes - Resource allocation and resource ownership.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
Introduction to Operating Systems Concepts
The Linux System.
Introduction to Kernel
Chapter 2: The Linux System Part 4
Chapter 18: The Linux System
KERNEL ARCHITECTURE.
Chapter 21: The Linux System
10CS53 Operating Systems Unit VIII Engineered for Tomorrow
Processes in Unix, Linux, and Windows
Chapter 21: The Linux System
Chapter 2: The Linux System Part 2
10CS53 Operating Systems Unit VIII Engineered for Tomorrow
Chapter 21: The Linux System
Chapter 2: The Linux System Part 5
Chapter 15: The Linux System
Processes in Unix, Linux, and Windows
Chapter 21: The Linux System
Chapter 21: The Linux System
Components of a Linux System
Presentation transcript:

Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 2

15.2 Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials– 8 th Edition Chapter 2: The Linux System Linux History Design Principles Kernel Modules Process Management Scheduling Memory Management File Systems Input and Output Interprocess Communication Network Structure Security

Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Kernel Modules

15.4 Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials– 8 th Edition Kernel Modules Sections of kernel code that can be compiled, loaded, and unloaded independent of the rest of the kernel. A kernel module may typically implement a device driver, a file system, or a networking protocol. The module interface allows third parties to write and distribute, on their own terms, device drivers or file systems that could not be distributed under the GPL. Kernel modules allow a Linux system to be set up with a standard, minimal kernel, without any extra device drivers built in.

15.5 Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials– 8 th Edition Kernel Modules Three components to Linux module support: module management driver registration conflict resolution

15.6 Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials– 8 th Edition Module Management Supports loading modules into memory and letting them talk to the rest of the kernel The module requestor manages loading requested, but currently unloaded, modules; it also regularly queries the kernel to see whether a dynamically loaded module is still in use, and will unload it when it is no longer actively needed

15.7 Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials– 8 th Edition Driver Registration Allows modules to tell the rest of the kernel that a new driver has become available The kernel maintains dynamic tables of all known drivers, and provides a set of routines to allow drivers to be added to or removed from these tables at any time

15.8 Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials– 8 th Edition Driver Registration Registration tables include the following items: Device drivers. These drivers include character devices (such as printers, terminals, and mice), block devices (including all disk drives), and network interface devices. File systems. The file system may be anything that implements Linux’s virtual-file-system calling routines. It might implement a format for storing files on a disk, but it might equally well be a network file system, such as NFS, or a virtual file system whose contents are generated on demand, such as Linux’s /proc file system.

15.9 Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials– 8 th Edition Driver Registration Registration tables include the following items: Network protocols. A module may implement an entire networking protocol, such as IPX, or simply a new set of packet-filtering rules for a network firewall. Binary format. This format specifies a way of recognizing, and loading, a new type of executable file.

15.10 Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials– 8 th Edition Conflict Resolution A mechanism that allows different device drivers to reserve hardware resources and to protect those resources from accidental use by another driver. The conflict resolution module aims to: Prevent modules from clashing over access to hardware resources Prevent autoprobes from interfering with existing device drivers Resolve conflicts with multiple drivers trying to access the same hardware

Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Process Management

15.12 Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials– 8 th Edition Process Management The basic principle of UNIX process management is to separate two operations: the creation of a process and the running of a new program. The fork system call creates a new process A new program is run after a call to execve Under UNIX, a process encompasses all the information that the operating system must maintain to track the context of a single execution of a single program Under Linux, process properties fall into three groups: The process’s identity Environment Context

15.13 Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials– 8 th Edition Process Identity Process ID (PID). The unique identifier for the process; used to specify processes to the operating system when an application makes a system call to signal, modify, or wait for another process. Credentials. Each process must have an associated user ID and one or more group IDs that determine the process’s rights to access system resources and files. Personality. Not traditionally found on UNIX systems, but under Linux each process has an associated personality identifier that can slightly modify the semantics of certain system calls. Used primarily by emulation libraries to request that system calls be compatible with certain specific flavors of UNIX

15.14 Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials– 8 th Edition Process Environment The process’s environment is inherited from its parent, and is composed of two null-terminated vectors: The argument vector lists the command-line arguments used to invoke the running program; conventionally starts with the name of the program itself. The environment vector is a list of “NAME=VALUE” pairs that associates named environment variables with arbitrary textual values.

15.15 Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials– 8 th Edition Process Context The (constantly changing) state of a running program at any point in time. Process context includes the following parts: The scheduling context is the most important part of the process context; it is the information that the scheduler needs to suspend and restart the process. The kernel maintains accounting information about the resources currently being consumed by each process, and the total resources consumed by the process in its lifetime so far. The file table is an array of pointers to kernel file structures. When making file I/O system calls, processes refer to files by their index into this table.

15.16 Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials– 8 th Edition Process Context (Cont.) Whereas the file table lists the existing open files, the file-system context applies to requests to open new files.  The current root and default directories to be used for new file searches are stored here. The signal-handler table defines the routine in the process’s address space to be called when specific signals arrive. The virtual-memory context of a process describes the full contents of the its private address space.

15.17 Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials– 8 th Edition Processes and Threads Linux uses the same internal representation for processes and threads; a thread is simply a new process that happens to share the same address space as its parent. A distinction is only made when a new thread is created by the clone system call. fork creates a new process with its own entirely new process context clone creates a new process with its own identity, but that is allowed to share the data structures of its parent Using clone gives an application fine-grained control over exactly what is shared between two threads.

15.18 Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials– 8 th Edition Processes and Threads When clone() is invoked, it is passed a set of flags that determine how much sharing is to take place between the parent and child tasks. Some of these flags are: