Chap 2 System Structures.

Slides:



Advertisements
Similar presentations
Operating Systems Components of OS
Advertisements

Operating-System Structures
Dr. Kalpakis CMSC 421, Operating Systems Operating-System Structures.
Operating-System Structures
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 2: Operating-System Structures.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: Operating-System Structures.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Operating.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 14, 2005 Chapter 2: Operating-System.
Silberschatz, Galvin and Gagne ©2007 Operating System Concepts with Java – 7 th Edition, Nov 15, 2006 Chapter 2: Operating-System Structures.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Operating.
1/21/2008CSCI 315 Operating Systems Design1 Operating System Structures Notice: The slides for this lecture have been largely based on those accompanying.
Chapter 2: Operating-System Structures
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 14, 2005 Chapter 2 Outline.
1/28/2004CSCI 315 Operating Systems Design1 Operating System Structures & Processes Notice: The slides for this lecture have been largely based on those.
Common System Components
Operating-System Structures Chapter 2 : Operating-System Structures.
Silberschatz, Galvin and Gagne ©2007 Operating System Concepts with Java – 7 th Edition, Nov 15, 2006 Chapter 2: Operating-System Structures.
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.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: Operating-System Structures.
2.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 2: Operating-System Structures.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 2: Operating-System Structures.
OS provide a user-friendly environment and manage resources of the computer system. Operating systems manage: –Processes –Memory –Storage –I/O subsystem.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Operating.
Chapter 2: Operating-System Structures Adapted to COP4610 by Robert van Engelen.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Operating.
Chapter 2: System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Principles Chapter 2: System Structures Operating System Services.
2.1 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Overview of topics covered Operating System Services.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Operating System Services One set of operating-system.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 6 System Calls OS System.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 14, 2005 Chapter 2: Operating-System.
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.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 2: Operating-System Structures.
Operating-System Structures. Operating System Services Operating systems provide an environment for execution of programs and services to programs and.
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.
1 CSE Department MAITSandeep Tayal Operating-System Structures System Components Operating System Services System Calls System Programs System Structure.
Shan Gao Fall 2007 Department of Computer Science Georgia State University.
Silberschatz, Galvin and Gagne  Operating System Concepts UNIT II Operating System Services.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 14, 2005 Chapter 2: Operating-System.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Operating.
CS307 Operating Systems Operating-System Structures Fan Wu Department of Computer Science and Engineering Shanghai Jiao Tong University Spring 2012.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: Operating-System Structures.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: System Structures.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 3: Operating-System Structures System Components Operating System Services.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Operating.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Operating.
2.1 Silberschatz, Galvin and Gagne ©2005 Operating System Principles Chapter 2: System Structures To describe the services an operating system provides.
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.
Chapter 2: Operating-System Structures
Chapter 2:Operating System Structures
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
Lecture 4: Operating System Structures
Chapter 2: System Structures
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
Chapter 2: System Structures
Chapter 1 Introduction to Operating System Part 5
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
Chapter 2: Operating-System Structures
Presentation transcript:

Chap 2 System Structures

Operating System Services One set of operating-system services provides functions that are helpful to the user: User interface Varies between Command-Line (CLI), Graphics User Interface (GUI), Batch Program execution I/O operations File-system Communications – Processes may exchange information, on the same computer or between computers over a network Error detection

Operating System Services (Cont.) Another set of OS functions exists for ensuring the efficient operation of the system itself via resource sharing Resource allocation - When multiple users or multiple jobs running concurrently, resources must be allocated to each of them Accounting - To keep track of which users use how much and what kinds of computer resources Protection and security - The owners of information stored in a multiuser or networked computer system may want to control use of that information, concurrent processes should not interfere with each other

User Operating System Interface Command interpreter allows direct command entry Sometimes implemented in kernel, sometimes by systems program Sometimes multiple flavors implemented – shells Primarily fetches a command from user and executes it Graphical user interface User-friendly desktop metaphor interface Many systems now include both CLI and GUI interfaces

System Calls Programming interface to the services provided by the OS Mostly accessed by programs via a high-level Application Program Interface (API) rather than direct system call use Three most common APIs are Win32 API for Windows, POSIX API for POSIX-based systems (including UNIX, Linux, and Mac OS X), and Java API for the Java virtual machine (JVM)

Example of System Calls System call sequence to copy the contents of one file to another file

Example of Standard API Consider the ReadFile() function in the Win32 API—a function for reading from a file

System Call Implementation Typically, a number associated with each system call System-call interface maintains a table indexed according to these numbers The system call interface invokes intended system call in OS kernel and returns status of the system call and any return values The caller need know nothing about how the system call is implemented Just needs to obey API and understand what OS will do as a result call

API – System Call – OS Relationship

Standard C Library Example C program invoking printf() library call, which calls write() system call

System Call Parameter Passing Three general methods used to pass parameters to the OS Simplest: pass the parameters in registers Parameters stored in a block, or table, in memory, and address of block passed as a parameter in a register This approach taken by Linux and Solaris Parameters placed, or pushed, onto the stack by the program and popped off the stack by the operating system Block and stack methods do not limit the number or length of parameters being passed

Parameter Passing via Table

Types of System Calls Process control File management end, abort load, execute create process, terminate process get process attributes,set process attributes wait for time wait event, signal event allocate and free memory File management create file, delete file, open,Close read, write, reposition get file attributes, set file attributes

Types of System Calls Device management Information maintenance request device, release device read, write, reposition get device attributes, set device attributes logically attach or detach devices Information maintenance Communications may be via shared memory or through message passing (using mailbox) get time or date, set time or date get system data, set system data get process, file, or device attributes set process, file, or device attributes

Types of System Calls Communications create, delete communication connection send, receive messages transfer status information attach or detach remote devices

System Programs System programs provide a convenient environment for program development and execution. The can be divided into: File manipulation Status information File modification Programming language support Program loading and execution Communications Application programs

Operating System Structure MS-DOS – written to provide the most functionality in the least space

Operating System Structure Layered Approach The operating system is divided into a number of layers (levels). The bottom layer (layer 0), is the hardware; the highest (layer N) is the user interface. With modularity, layers are selected such that each uses functions and services of only lower-level layers

Operating System Structure UNIX – limited by hardware functionality, the original UNIX operating system had limited structuring. The UNIX OS consists of two separable parts Systems programs The kernel Consists of everything below the system-call interface and above the physical hardware Provides the file system, CPU scheduling, memory management, and other operating-system functions; a large number of functions for one level

Operating System Structure UNIX System Structure

Operating System Structure Solaris Modular Approach

Virtual Machines A virtual machine takes the layered approach to its logical conclusion. It treats hardware and the operating system kernel as though they were all hardware A virtual machine provides an interface identical to the underlying bare hardware The operating system creates the illusion of multiple processes, each executing on its own processor with its own (virtual) memory

Virtual Machines (Cont.) The resources of the physical computer are shared to create the virtual machines CPU scheduling can create the appearance that users have their own processor Spooling and a file system can provide virtual card readers and virtual line printers A normal user time-sharing terminal serves as the virtual machine operator’s console

Virtual Machines (Cont.) (a) Nonvirtual machine (b) virtual machine