Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, 2005 4.1 Operating System Concepts Operating Systems Lecture 7 OS System Structure.

Slides:



Advertisements
Similar presentations
Operating Systems Components of OS
Advertisements

Processes Management.
3.1 Silberschatz, Galvin and Gagne ©2003 Operating System Concepts with Java Chapter 3: Operating-System Structures System Components Operating System.
Thursday, June 08, 2006 The number of UNIX installations has grown to 10, with more expected. The UNIX Programmer's Manual, 2nd Edition, June, 1972.
Operating Systems High Level View Chapter 1,2. Who is the User? End Users Application Programmers System Programmers Administrators.
1 Last Time: OS & Computer Architecture Modern OS Functionality (brief review) Architecture Basics Hardware Support for OS Features.
1/21/2008CSCI 315 Operating Systems Design1 Operating System Structures Notice: The slides for this lecture have been largely based on those accompanying.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
1/27/2010CSCI 315 Operating Systems Design1 Processes Notice: The slides for this lecture have been largely based on those accompanying an earlier version.
1/28/2004CSCI 315 Operating Systems Design1 Operating System Structures & Processes Notice: The slides for this lecture have been largely based on those.
1/26/2004CSCI 315 Operating Systems Design1 Operating System Structures Notice: The slides for this lecture have been largely based on those accompanying.
1/23/2008CSCI 315 Operating Systems Design1 Processes Notice: The slides for this lecture have been largely based on those accompanying the textbook Operating.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
Process Concept An operating system executes a variety of programs
Silberschatz, Galvin and Gagne  Operating System Concepts Common OS Components Process Management Memory Management File Management I/O System.
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 2: Operating-System Structures Modified from the text book.
Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System.
Abhinav Kamra Computer Science, Columbia University 3.1 Operating System Concepts Silberschatz, Galvin and Gagne  2002 Chapter 3: Operating-System Structures.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 346, Royden, Operating System Concepts Operating Systems Lecture 4 System Calls OS System.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Process Management. Processes Process Concept Process Scheduling Operations on Processes Interprocess Communication Examples of IPC Systems Communication.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 14, 2005 Operating System.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 6 System Calls OS System.
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-1 Process Concepts Department of Computer Science and Software.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: Operating-System Structures.
Process by Dr. Amin Danial Asham. References Operating System Concepts ABRAHAM SILBERSCHATZ, PETER BAER GALVIN, and GREG GAGNE.
Multiprogramming. Readings r Silberschatz, Galvin, Gagne, “Operating System Concepts”, 8 th edition: Chapter 3.1, 3.2.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
3.1 Silberschatz, Galvin and Gagne ©2003 Operating System Concepts with Java Chapter 3: Operating-System Structures System Components Operating System.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
3.1 Operating System Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Processes Process Concept Process Scheduling Operations on Processes Cooperating.
Computer Studies (AL) Operating System Process Management - Process.
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 Introduction to Operating Systems: Module 3.
11/13/20151 Processes ICS 240: Operating Systems –William Albritton Information and Computer Sciences Department at Leeward Community College –Original.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
Silberschatz, Galvin and Gagne  Operating System Concepts Process Concept An operating system executes a variety of programs:  Batch system.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Process-Concept.
Silberschatz, Galvin and Gagne  Operating System Concepts UNIT II Operating System Services.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Process-Concept.
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
1.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Lecture 2: OS Structures (Chapter 2.7)
Operating Systems (CS 340 D) Dr. Abeer Mahmoud Princess Nora University Faculty of Computer & Information Systems Computer science Department.
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.
2.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition System Programs (p73) System programs provide a convenient environment.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
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 3: Operating-System Structures System Components Operating System Services.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 4: Processes Process Concept Process Scheduling Types of shedulars Process.
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  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 8 Processes II Read Ch.
1 Module 3: Processes Reading: Chapter Next Module: –Inter-process Communication –Process Scheduling –Reading: Chapter 4.5, 6.1 – 6.3.
Operating System Components) These components reflect the services made available by the O.S. Process Management Memory Management I/O Device Management.
Introduction to Operating Systems Concepts
Operating Systems (CS 340 D)
Process Management Presented By Aditya Gupta Assistant Professor
Intro to Processes CSSE 332 Operating Systems
Operating Systems (CS 340 D)
Process Virtualization. Process Process is a program that has initiated its execution. A program is a passive entity; whereas a process is an active entity.
Chapter 3: Operating-System Structures
Mid Term review CSC345.
Lecture Topics: 11/1 General Operating System Concepts Processes
Chapter 3: Processes.
System calls….. C-program->POSIX call
Outline Chapter 2 (cont) Chapter 3: Processes Virtual machines
Presentation transcript:

Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 7 OS System Structure Processes

Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Types of OS structure The design of operating systems has evolved over time. We can roughly divide them into the following categories: 1. Monolithic systems (1st operating systems). 2. Modular systems (E.g. early UNIX) 3. Hierarchical layered systems (e.g. OS/2) 4. Microkernel systems (e.g. Mach) 5. Virtual Machines

Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts From monolithic to modular Monolithic systems:  No structure to speak of.  As the OS grows, the complexity becomes overwhelming.  Example: OS/360 version 1  created by 5000 programmers over 5 years.  In 1964, had over 1 million lines of code. Modular systems:  Divide OS into modules.  Example: Original UNIX had 2 modules.  System programs (e.g. emacs, compiler)  The kernel (HUGE!)--file system, CPU scheduling, memory management, etc.  Problem: Kernel so big and complex that it was hard to work with and extend.

Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Layered Systems Hierarchical Layered Systems:  Bottom layer: Hardware  Top layer: User interface  Easier to debug (can work on single layer)  Goal: Allow one layer to change without needing to change other layers.  Example: OS/2, some newer versions of UNIX  Problems:  Division of layers can be difficult to define.  Efficiency: Each layer adds overhead.  Modification still proved difficult. Many interfaces exist between two layers.

Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Microkernels Microkernels:  Define kernel as small as possible.  Kernel is the ONLY code that is machine/device dependent.  Implement the rest of the OS as user processes.  Uses client-server communication model (message passing).  Advantages: (will discuss in class)  Modularity (Easy to modify modules)  Extensibility (Can easily add new functions--user processes)  Flexibility (Can remove functions that are not needed)  Portability (Only the small kernel has hardware specific code)  Distributed System support (Message passing can generalize to network communications)  Object oriented (A good design).  Disadvantages: (will discuss in class)  Performance: create/send receive message takes longer than a system call. Efficiency still a problem.

Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Virtual Machines Virtual Machines:  Provides software interface identical to underlying bare hardware.  Virtual CPU, Virtual Device drivers, Virtual memory, etc.  Each process has its own virtual machine  Implementation provides interface between virtual machine and real machine.  Physical resources divided up between the virtual machines (e.g. minidisks).  Advantages: (will discuss in class)  Security (no process has direct access to system resources.)  System development (Can use virtual machine to test new OS)  System compatibility. Can run Windows on Virtual PC on Mac.  Java runs on Java virtual machine--cross platform.  Disadvantage: (will discuss in class)  Speed: Each instruction is interpreted. This is slower than a direct system call.

Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Virtual Machine Diagram Non-virtual Machine Virtual Machine

Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Java Virtual Machine Compiled Java programs are platform-neutral bytecodes executed by a Java Virtual Machine (JVM). JVM consists of - class loader - class verifier - runtime interpreter Just-In-Time (JIT) compilers increase performance

Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Processes Process – a program in execution; A process includes: (will discuss in class)  program code (text section)  program counter  contents of registers  Process stack (temporary data, e.g. method parameters, etc.)  data section (eg. global variables).

Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Process State As a process executes, it changes state  new: The process is being created.  running: Instructions are being executed.  waiting: The process is waiting for some event to occur.  ready: The process is waiting to be assigned to a process.  terminated: The process has finished execution.

Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Diagram of Process State We will create this in class.

Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Process Control Block (PCB) Information associated with each process is stored in PCB. Process state  new, running, etc. Program counter  address of next instruction to be executed CPU registers  E.g. accumulator, stack pointers, general purpose registers. CPU scheduling information  Process priority, elapsed time, etc. Memory-management information  E.g. base and limit registers Accounting information  E.g. amount of CPU time used, account number, etc. I/O status information  I/O devices allocated, list of open files, etc.

Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Process Control Block (PCB) The PCB is constructed at process creation. PCB includes a pointer to be used in lists (queues) of PCBs. The PCB is used to save information about a process when switched out of CPU.

Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts CPU Switch From Process to Process We will diagram this in class.

Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Process Scheduling Queues As processes move between states, they join other processes waiting for particular resources (e.g. CPU time, I/O device, etc.) The Operating System keeps lists of processes in queues (linked lists).  Job queue – set of all processes in the system.  Ready queue – set of all processes residing in main memory, ready and waiting to execute.  Device queues – set of processes waiting for an I/O device.  Process state list -- list of processes in each state  Event queues -- list of processes waiting for an event.

Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Ready Queue And Various I/O Device Queues

Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Representation of Process Scheduling