Often, more information is required when designing system call Information varies according to OS and types of system call

Similar documents
Chapter 2: Operating-System Structures

Chapter 2: Operating-System Structures. Chapter 2: Operating-System Structures. Objectives. Operating System Services

Chapter 2: Operating-System Structures

Chapter 2: Operating-System Structures

Chapter 2: Operating-System Structures. Operating System Concepts Essentials 8 th Edition

Chapter 2: Operating-System

Operating-System Structures

Chapter 2: Operating-System Structures

CSE 4/521 Introduction to Operating Systems

Objectives. Chapter 2: Operating-System Structures. 2.1 Operating System Services

Chapter 2. Operating-System Structures

Chapter 2: Operating-System Structures. Operating System Concepts 9 th Edition

Operating-System Structures

Chapter 2: System Structures. Operating System Concepts 9 th Edition

Chapter 2: Operating-System Structures. Operating System Concepts 9 th Edit9on

Chapter 2: System Structures

What are some common categories of system calls? What are common ways of structuring an OS? What are the principles behind OS design and

Chapter 2: Operating-System Structures. Operating System Concepts 9 th Edit9on

TDDI04, K. Arvidsson, IDA, Linköpings universitet Operating System Structures. Operating System Structures Overview. Operating System Services

Chapter 2: Operating-System Structures

CS307: Operating Systems

Chapter 2: System Structures. Operating System Concepts 9 th Edition

Chapter 2: System Structures

Operating System Structure

Chapter 3: Operating-System Structures

Operating-System Structures

CHAPTER 2: SYSTEM STRUCTURES. By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

OPERATING SYSTEMS. Prescribed Text Book Operating System Principles, Seventh Edition By Abraham Silberschatz, Peter Baer Galvin and Greg Gagne

Chapter 2 Operating-System Structures

Operating System Services. User Services. System Operation Services. User Operating System Interface - CLI. A View of Operating System Services

Module 3: Operating-System Structures

Chapter 3: Operating-System Structures

Lecture 2 Operating System Structures (chapter 2)

OS and Computer Architecture. Chapter 3: Operating-System Structures. Common System Components. Process Management

Last class: OS and Architecture. OS and Computer Architecture

Last class: OS and Architecture. Chapter 3: Operating-System Structures. OS and Computer Architecture. Common System Components

Lecture 2 - Fundamental Concepts

Module 3: Operating-System Structures. Common System Components

Chapter 3: Operating-System Structures

Operating Systems. Designed and Presented by Dr. Ayman Elshenawy Elsefy

Chapter 2 Operating System Structures

Kernel Types Simple OS Examples System Calls. Operating Systems. Autumn CS4023

Four Components of a Computer System

Introduction to PC Operating Systems

Chapter 2. Operating System Structures

CS370 Operating Systems

OS Design Approaches. Roadmap. OS Design Approaches. Tevfik Koşar. Operating System Design and Implementation

UNIT 2. OPERATING SYSTEM STRUCTURES

CS420: Operating Systems. OS Services & System Calls

CSC Operating Systems Fall Lecture - II OS Structures. Tevfik Ko!ar. Louisiana State University. August 27 th, 2009.

Announcements. Computer System Organization. Roadmap. Major OS Components. Processes. Tevfik Ko!ar. CSC Operating Systems Fall 2009

CSC Operating Systems Spring Lecture - II OS Structures. Tevfik Ko!ar. Louisiana State University. January 17 th, 2007.

Announcements. Operating System Structure. Roadmap. Operating System Structure. Multitasking Example. Tevfik Ko!ar

Full file at

CSE Opera+ng System Principles

Operating System: Chap2 OS Structure. National Tsing-Hua University 2016, Fall Semester

Introduction to Operating Systems (Part III)

Operating- System Structures

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

Chapter 2: OS Structures

Chapter 8: Memory Management. Operating System Concepts with Java 8 th Edition

Operating System Architecture. CS3026 Operating Systems Lecture 03

Chapter 2: Operating-System Structures. Operating System Concepts 8 th Edition

NON SCHOLAE, SED VITAE

The Slide does not contain all the information and cannot be treated as a study material for Operating System. Please refer the text book for exams.

Course: Operating Systems Instructor: M Umair. M Umair

Roadmap. Tevfik Koşar. CSE 421/521 - Operating Systems Fall Lecture - II OS Structures. University at Buffalo. OS Design and Implementation

OS Design Approaches. Roadmap. System Calls. Tevfik Koşar. Operating System Design and Implementation. CSE 421/521 - Operating Systems Fall 2013

Memory Management. CSCI 315 Operating Systems Design Department of Computer Science

Module 1 Introduction/OS Overview

Chapter 3: Processes. Operating System Concepts 8 th Edition,

Chapter 4: Threads. Operating System Concepts. Silberschatz, Galvin and Gagne

Operating-System Structures

OPERATING SYSTEMS Lecture Notes. Prepared by K.Rohini, Assistant Professor, CSE Department, GVPCEW.

CSC 453 Operating Systems

3. Memory Management

Memory Management 9th Week

Chapter 9 Memory Management Main Memory Operating system concepts. Sixth Edition. Silberschatz, Galvin, and Gagne 8.1

Roadmap. Tevfik Ko!ar. CSC Operating Systems Spring Lecture - III Processes. Louisiana State University. Virtual Machines Processes

OPERATING SYSTEMS UNIT - 1

Chapter 10: File System. Operating System Concepts 9 th Edition

Chapter 11: File-System Interface

Operating Systems. Operating System Structure. Lecture 2 Michael O Boyle

Module 1: Introduction. What is an Operating System?

CS420: Operating Systems

Chapter 11: File-System Interface

CS 390 Chapter 2 Homework Solutions

Roadmap. Tevfik Ko!ar. CSC Operating Systems Fall Lecture - VII CPU Scheduling - II. Louisiana State University

Roadmap. Multilevel Queue Scheduling. Multilevel Queue. Example of Multilevel Feedback Queue. Multilevel Feedback Queue. Tevfik Ko!

CSE 4/521 Introduction to Operating Systems. Lecture 12 Main Memory I (Background, Swapping) Summer 2018

Chapter 4: Threads. Chapter 4: Threads

Processes & Threads. Recap of the Last Class. Microkernel System Architecture. Layered Structure

Chapters 9 & 10: Memory Management and Virtual Memory

Operating System Concepts Ch. 2: Operating System Structures

Unit 2 : Computer and Operating System Structure

Chapter 11: File System Implementation. Objectives

Spring It takes a really bad school to ruin a good student and a really fantastic school to rescue a bad student. Dennis J.

Chapter 2: Operating-System Structures

Architectural Support for Operating Systems. Jinkyu Jeong ( Computer Systems Laboratory Sungkyunkwan University

CSE 4/521 Introduction to Operating Systems

Transcription:

System Call Parameter Passing Often, more information is required when designing system call Information varies according to OS and types of system call Three general methods used to pass parameters to the OS Simplest: pass the parameters in registers In some cases, may be more parameters than registers Parameters placed, or pushed, onto the stack by the program and popped off the stack by the operating system Parameters are stored in other places, such as a block or table, in memory, and the address of block or table is passed as a parameter in a register (next slide) This approach taken by Linux and Solaris 2.16 Silberschatz, Galvin and Gagne 2009

Parameter Passing via Table X is not the actual value but the address. 2.17 Silberschatz, Galvin and Gagne 2009

Types of System Calls Categories are similar to categories of library functions Process control Create, terminate, allocate/free memory File management Create/delete, open/close, read/write Device management Request/release, read/write Information maintenance Get/set the time/date, get system data Communications Create/connect communication connection, send/receive 2.18 Silberschatz, Galvin and Gagne 2009

Types of System Calls 2.19 Silberschatz, Galvin and Gagne 2009

System Program Provides a convenient environment of program development and execution Some of them are simply user interfaces to system calls; others are considerably more complex The followings are six system program categories File management - Create, delete, copy, rename, print, dump, list, and generally manipulate files and directories Status information Some ask the system information - date, time, amount of available memory, disk space, number of users Others provide detailed performance, logging, and debugging information Typically, these programs provide formatted output and print the output to the terminal or other output t devices Some systems implement a registry - used to store and retrieve configuration information 2.20 Silberschatz, Galvin and Gagne 2009

System Program (cont d) File modification Text editors may be available to create and modify files Special commands to search contents of files or perform transformations of the text to other types Programming-language support - Compilers, assemblers, debuggers and interpreters are sometimes provided Program loading and execution- Absolute loaders, relocatable loaders, linkage editors, and overlay-loaders, debugging systems for higher-level and machine language Communications - Provide the mechanism for creating virtual connections among processes, users, and computer systems Allow users to send messages to another s screens, browse web pages, send electronic-mail messages, log in remotely, transfer files from one machine to another 2.21 Silberschatz, Galvin and Gagne 2009

Operating System Design and Implementation Design and Implementation of OS is not solvable, but some approaches have proven successful Internal structure of different Operating Systems can vary widely Start by defining goals and specifications Affected by the choice of hardware, type of system User goals and System goals User goals operating system should be convenient to use, easy to learn, reliable, safe, and fast System goals operating system should be easy to design, implement, and maintain, as well as efficient, flexible, reliable, and error-free 2.22 Silberschatz, Galvin and Gagne 2009

Operating System Design and Implementation (Cont.) Important principle to separate Policy: What will be done? Mechanism: How to do it? Flexibility! Mechanisms determine how to do something, policies decide what will be done The separation of policy from mechanism is a very important principle, it allows maximum flexibility. Example CPU timer construction Policy : How long is the timer to be set? Mechanism : Detailed various timer construction methods Priority Management Policy : Priority decision Mechanism : Detailed Control method for handling priority 2.23 Silberschatz, Galvin and Gagne 2009

Operating System Structure Simple Structure Layered Approach Microkernel Monolithic Module 2.24 Silberschatz, Galvin and Gagne 2009

Operating System Structure Simple Structure MS-DOS written to provide the most functionality in the least space Not divided id d into modules Although MS-DOS has some structure, its interfaces and levels of functionality are not well separated Layered Approach The operating system is divided into a number of layers (levels) Each is built on top of the nearest lower layers. The bottom layer (layer 0), is the hardware; the highest (layer N) is the user interface. 2.25 Silberschatz, Galvin and Gagne 2009

Layered Approach Example UNIX the original UNIX operating system had limited structuring. The UNIX OS consists of separable layers 2.26 Silberschatz, Galvin and Gagne 2009

Microkernel System Structure Moves as much as possible from kernel space into user space It only implements hardware dependent d functions or real-time facilities. Communication takes place between user modules using message passing Benefits: Easier to extend or modify a microkernel Easier to port the operating system to new architectures More reliable (less code is running in kernel mode) More secure Detriments: Communication overhead Example Mach Performance overhead of user space to kernel space communication 2.27 Silberschatz, Galvin and Gagne 2009

Microkernel System Structure 2.28 Silberschatz, Galvin and Gagne 2009

Monolithic System Structure Kernel controls all system functionalities Compared to microkernel structure, it is fast and efficient to manage resources. Detriments Size overhead All functionalities are resided in memory Recompile and rebooting is necessary when modified Example Unix (BSD Family), Solaris 2.29 Silberschatz, Galvin and Gagne 2009

Monolithic System Structure 2.30 Silberschatz, Galvin and Gagne 2009

Monolithic with Module Monolithic architecture with Module Kernel includes basic component Non-frequently used parts are implemented by Module and it is loaded dynamically y Module is also useful to implement new device drivers or system calls Example: Linux 2.31 Silberschatz, Galvin and Gagne 2009

Solaris Loadable Module 2.32 Silberschatz, Galvin and Gagne 2009

Virtual Machines A virtual machine takes the layered approach. It treats hardware and the operating system kernel as if they were all hardware A virtual machine provides an identical interface to the underlying bare hardware The operating system host creates the illusion that a process has its own processor and virtual memory Each guest is provided with a (virtual) copy of underlying computer Example JAVA virtual machine VMWare, VirtualBox, etc 2.33 Silberschatz, Galvin and Gagne 2009

VMware Architecture 2.34 Silberschatz, Galvin and Gagne 2009

The Java Virtual Machine 2.35 Silberschatz, Galvin and Gagne 2009

End of Chapter 2