2: OS Structures 1 Jerry Breecher OPERATING SYSTEMS STRUCTURES.

Slides:



Advertisements
Similar presentations
Operating-System Structures
Advertisements

Interactive lesson about operating system
Operating Systems (CSCI2413) Lecture 2 Overview phones off (please)
Operating System Structures
WHAT IS AN OPERATING SYSTEM? An interface between users and hardware - an environment "architecture ” Allows convenient usage; hides the tedious stuff.
Chap 2 System Structures.
SLC/Ver1.0/OS CONCEPTS/Oct'991INTRODUCTION What is an Operating System? Operating Structure -System Components -OS Services -System Calls & Programs -System.
Operating System Structure
3: OS Structures 1 OPERATING SYSTEM STRUCTURES PROCESS MANAGEMENT A process is a program in execution: (A program is passive, a process active.) A process.
Operating System - Overview Lecture 2. OPERATING SYSTEM STRUCTURES Main componants of an O/S Process Management Main Memory Management File Management.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
1: Operating Systems Overview
OPERATING SYSTEM OVERVIEW
ICS Principles of Operating Systems
Cs238 Lecture 3 Operating System Structures Dr. Alan R. Davis.
Common System Components
Os31 Chapter 3 Operating-System Structures. os32 Outlines System Components Operating System Services System Calls System Programs System Structure Virtual.
Lecture 1: Introduction CS170 Spring 2015 Chapter 1, the text book. T. Yang.
Silberschatz, Galvin and Gagne  Operating System Concepts Common System Components Process Management Main Memory Management File Management.
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 ©2009 Operating System Concepts – 8 th Edition, Chapter 2: Operating-System Structures.
Process Management A process is a program in execution. It is a unit of work within the system. Program is a passive entity, process is an active entity.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Silberschatz, Galvin and Gagne  Applied Operating System Concepts Chapter 3: Operating-System Structures System Components OS Services System.
CHAPTER 2 OPERATING SYSTEM OVERVIEW 1. Operating System Operating System Definition A program that controls the execution of application programs and.
OPERATING SYSTEM OVERVIEW. Contents Basic hardware elements.
Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System.
OS provide a user-friendly environment and manage resources of the computer system. Operating systems manage: –Processes –Memory –Storage –I/O subsystem.
3.1 Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure.
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 2: Operating-System Structures.
Silberschatz and Galvin  Operating System Concepts Module 3: Operating-System Structures System Components Operating System Services System Calls.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 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.
OSes: 3. OS Structs 1 Operating Systems v Objectives –summarise OSes from several perspectives Certificate Program in Software Development CSE-TC and CSIM,
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
OS, , Part I Operating - System Structures Department of Computer Engineering, PSUWannarat Suntiamorntut.
1 CSE Department MAITSandeep Tayal Operating-System Structures System Components Operating System Services System Calls System Programs System Structure.
1: Operating Systems Overview 1 Jerry Breecher Fall, 2004 CLARK UNIVERSITY CS215 OPERATING SYSTEMS OVERVIEW.
1 CS.217 Operating System By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 3 Operating-System Structures Slide 1 Chapter 3 Operating-System Structures.
BIT213,CISY Operating Systems 1
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: Operating-System Structures.
Copyright © Curt Hill Operating Systems An Introductory Overview.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 3: Operating-System Structures System Components Operating System Services.
Introduction to Operating System. 1.1 What is Operating System? An operating system is a program that manages the computer hardware. It also provides.
 PROCESS MANAGEMENT  A process is a program in execution: (A program is passive, a process active.)  A process has resources (CPU time, files) and.
Operating System (Reference : OS[Silberschatz] + Norton 6e book slides)
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Find – used to find files corresponding to a certain criteria find starting_dir matching_criteria [options] Examples: find /usr –name startx find /usr.
System Components Operating System Services System Calls.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Overview of today’s lecture Major components of an operating system Structure and internal architecture of an operating system Monolithic Vs Micro-kernels.
OPERATING SYSTEMS STRUCTURES Jerry Breecher 2: Operating System Structures 1.
Chapter 3: Operating-System Structures
Introduction to Operating Systems Concepts
Chapter 2:Operating System Structures
Chapter 2: Operating-System Structures
Module 3: Operating-System Structures
Operating System Structure
Chapter 3: Operating-System Structures
Chapter 1 Introduction to Operating System Part 5
Basic Concepts Protection: Security:
Chapter 2: Operating-System Structures
Introduction to Operating Systems
OPERATING SYSTEMS STRUCTURES
Chapter 2: Operating-System Structures
III. Operating System Structures
Presentation transcript:

2: OS Structures 1 Jerry Breecher OPERATING SYSTEMS STRUCTURES

2: OS Structures 2 What Is In This Chapter? System Components System Calls How Components Fit Together Virtual Machine OPERATING SYSTEM Structures

2: OS Structures 3 OPERATING SYSTEM STRUCTURES These are the pieces of the system we’ll be looking at: Process Management Main Memory Management File Management I/O System Management Secondary Management Networking Protection System Command-Interpreter System SYSTEM COMPONENTS

2: OS Structures 4 OPERATING SYSTEM STRUCTURES PROCESS MANAGEMENT A process is a program in execution: (A program is passive, a process active.) A process has resources (CPU time, files) and attributes that must be managed. Management of processes includes:  Process Scheduling (priority, time management,... )  Creation/termination  Block/Unblock (suspension/resumption )  Synchronization  Communication  Deadlock handling  Debugging SYSTEM COMPONENTS

2: OS Structures 5 MAIN MEMORY MANAGEMENT  Allocation/de-allocation for processes, files, I/O.  Maintenance of several processes at a time  Keep track of who's using what memory  Movement of process memory to/from secondary storage. FILE MANAGEMENT A file is a collection of related information defined by its creator. Commonly, files represent programs (both source and object forms) and data. The operating system is responsible for the following activities in connections with file management: File creation and deletion. Directory creation and deletion. Support of primitives for manipulating files and directories. Mapping files onto secondary storage. File backup on stable (nonvolatile) storage media. OPERATING SYSTEM STRUCTURES System Components

2: OS Structures 6 I/O MANAGEMENT  Buffer caching system  Generic device driver code  Drivers for each device - translate read/write requests into disk position commands. SECONDARY STORAGE MANAGEMENT  Disks, tapes, optical,...  Free space management ( paging/swapping )  Storage allocation ( what data goes where on disk )  Disk scheduling OPERATING SYSTEM STRUCTURES System Components

2: OS Structures 7 NETWORKING  Communication system between distributed processors.  Getting information about files/processes/etc. on a remote machine.  Can use either a message passing or a shared memory model. PROTECTION  Of files, memory, CPU, etc.  Means controlling of access  Depends on the attributes of the file and user SYSTEM PROGRAMS  Command Interpreters -- Program that accepts control statements (shell, GUI interface, etc.)  Compilers/linkers  Communications (ftp, telnet, etc.) OPERATING SYSTEM STRUCTURES System Components How Do These All Fit Together? In essence, they all provide services for each other.

2: OS Structures 8 Modifying the Operating System program for a particular machine. The goal is to include all the necessary pieces, but not too many extra ones.  Typically a System can support many possible devices, but any one installation has only a few of these possibilities.  Plug and play allows for detection of devices and automatic inclusion of the code (drivers) necessary to drive these devices.  A sysgen is usually a link of many OS routines/modules in order to produce an executable containing the code to run the drivers. OPERATING SYSTEM STRUCTURES System Tailoring

2: OS Structures 9 A System Call is the main way a user program interacts with the Operating System. Figure 3.1 Figure 2.8 OPERATING SYSTEM STRUCTURES System Calls Check out the Linux system command strace!

2: OS Structures 10 HOW A SYSTEM CALL WORKS  Obtain access to system space  Do parameter validation  System resource collection ( locks on structures )  Ask device/system for requested item  Suspend waiting for device  Interrupt makes this thread ready to run  Wrap-up  Return to user There are 11 (or more) steps in making the system call read (fd, buffer, nbytes) OPERATING SYSTEM STRUCTURES System Calls Linux API

2: OS Structures 11 Consider the ReadFile() function in the Win32 API—a function for reading from a file. A description of the parameters passed to ReadFile() HANDLE file—the file to be read LPVOID buffer—a buffer where the data will be read into and written from DWORD bytesToRead—the number of bytes to be read into the buffer LPDWORD bytesRead—the number of bytes read during the last read LPOVERLAPPED ovl—indicates if overlapped I/O is being used OPERATING SYSTEM STRUCTURES System Calls Example of Windows API

2: OS Structures 12 OPERATING SYSTEM STRUCTURES System Calls Msg Passing Shared Memory Two ways of passing data between programs.

2: OS Structures 13 OPERATING SYSTEM STRUCTURES System Calls These are examples of various system calls.

2: OS Structures 14 A SIMPLE STRUCTURE: Example of MS-DOS. Application Programming Resident System Programming MS-DOS Drivers ROM - BIOS Device Drivers Note how all layers can touch the hardware. Bad News!! OPERATING SYSTEM STRUCTURES How An Operating System Is Put Together

2: OS Structures 15 A LAYERED STRUCTURE: Example of Windows System Services Windows MGR & GDI Windows 2000 Kernel Hardware Abstraction Layer (HAL) IO Manager Graphics Device Drivers VM Manager Security Reference Monitor Process Manager OPERATING SYSTEM STRUCTURES How An Operating System Is Put Together

2: OS Structures 16 A LAYERED STRUCTURE: Example of UNIX. OPERATING SYSTEM STRUCTURES How An Operating System Is Put Together

2: OS Structures 17 In a Virtual Machine - each process "seems" to execute on its own processor with its own memory, devices, etc.  The resources of the physical machine are shared. Virtual devices are sliced out of the physical ones. Virtual disks are subsets of physical ones.  Useful for running different OS simultaneously on the same machine.  Protection is excellent, but no sharing possible.  Virtual privileged instructions are trapped. Virtual User Virtual Machine Monitor Mode Physical User Physical Machine OPERATING SYSTEM STRUCTURES Virtual Machine

2: OS Structures 18 OPERATING SYSTEM STRUCTURES Virtual Machine

2: OS Structures 19 Example of MS-DOS on top of Windows XP. DOS APPLICATION BIOS DRIVERS Windows XP Physical User Physical Machine OPERATING SYSTEM STRUCTURES Virtual Machine

2: OS Structures 20 Example of Java Virtual Machine The Java Virtual Machine allows Java code to be portable between various hardware and OS platforms. OPERATING SYSTEM STRUCTURES Virtual Machine

2: OS Structures 21 OPERATING SYSTEM STRUCTURES WRAPUP We’ve completed our second overview of an Operating System – this at the level of a high flying plane. We’ve looked at the basic building blocks of an operating system – processes, memory management, file systems, and seen how they all connect together. Now we’ll get into the nitty-gritty, spending considerable time on each of these pieces.