System Structures. Services Interface Structure



Similar documents
Objectives. Chapter 2: Operating-System Structures. Operating System Services (Cont.) Operating System Services. Operating System Services (Cont.

Operating System Structures

Kernel Types System Calls. Operating Systems. Autumn 2013 CS4023

CS3600 SYSTEMS AND NETWORKS

Example of Standard API

CS420: Operating Systems OS Services & System Calls

Chapter 2 System Structures

OPERATING SYSTEM SERVICES

Chapter 3: Operating-System Structures. Common System Components

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

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

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

Chapter 3 Operating-System Structures

Operating System Structure

Chapter 3: Operating-System Structures. System Components Operating System Services System Calls System Programs System Structure Virtual Machines

How do Users and Processes interact with the Operating System? Services for Processes. OS Structure with Services. Services for the OS Itself

Operating System Components

ELEC 377. Operating Systems. Week 1 Class 3

Lecture 1 Operating System Overview

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson

Operating System Structures

How To Write A Windows Operating System (Windows) (For Linux) (Windows 2) (Programming) (Operating System) (Permanent) (Powerbook) (Unix) (Amd64) (Win2) (X

Operating System Components and Services

Operating Systems. Rafael Ramirez (T, S)

Operating- System Structures

Operating Systems and Networks

Virtual Machines.

Components of a Computer System

The Plan Today... System Calls and API's Basics of OS design Virtual Machines

OS Concepts and structure

Chapter 2: OS Overview

Overview of Operating Systems Instructor: Dr. Tongping Liu

Virtual Machine Security

Operating System Organization. Purpose of an OS

COS 318: Operating Systems

Review from last time. CS 537 Lecture 3 OS Structure. OS structure. What you should learn from this lecture

Characteristics of Java (Optional) Y. Daniel Liang Supplement for Introduction to Java Programming

Cloud Computing. Up until now

Introduction to Virtual Machines

General Introduction

Multi-core Programming System Overview


Operating Systems 4 th Class

CPS221 Lecture: Operating System Structure; Virtual Machines

Operating Systems OS Architecture Models

Effective Java Programming. efficient software development

A GENERIC PURPOSE, CROSS-PLATFORM, HIGH EXTENSIBLE VIRTUAL MACHINE. John Vlachoyiannis

12. Introduction to Virtual Machines

Project Adding a System Call to the Linux Kernel

Operating Systems PART -A

INTRODUCTION TO JAVA PROGRAMMING LANGUAGE

INTRODUCTION TO OPERATING SYSTEMS

Star System Deitel & Associates, Inc. All rights reserved.

The Art of Virtualization with Free Software

Multiprogramming. IT 3123 Hardware and Software Concepts. Program Dispatching. Multiprogramming. Program Dispatching. Program Dispatching

Week Overview. Installing Linux Linux on your Desktop Virtualization Basic Linux system administration

Virtualization. Types of Interfaces

Introduction. What is an Operating System?

OPERATING SYSTEMS STRUCTURES

Cloud Computing. Chapter 8 Virtualization

Building Applications Using Micro Focus COBOL

Computers: Tools for an Information Age

Restraining Execution Environments

Chapter 16: Virtual Machines. Operating System Concepts 9 th Edition

Basics in Energy Information (& Communication) Systems Virtualization / Virtual Machines

Software: Systems and Application Software

x86 ISA Modifications to support Virtual Machines

KVM: A Hypervisor for All Seasons. Avi Kivity avi@qumranet.com

Chapter 15 Windows Operating Systems

Real-Time Systems Prof. Dr. Rajib Mall Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Suh yun Ki m (KIS T) (KIS suhyunk@.com

Analysis of Virtualization Tools and Techniques

Overview of CS 282 & Android

Advanced compiler construction. General course information. Teacher & assistant. Course goals. Evaluation. Grading scheme. Michel Schinz

Virtualization. Pradipta De

Jonathan Worthington Scarborough Linux User Group

Fachbereich Informatik und Elektrotechnik SunSPOT. Ubiquitous Computing. Ubiquitous Computing, Helmut Dispert

Data Centers and Cloud Computing

International Engineering Journal For Research & Development

Section 1.4. Java s Magic: Bytecode, Java Virtual Machine, JIT,

Chapter 6, The Operating System Machine Level

Virtualization and the U2 Databases

3 - Introduction to Operating Systems

OPERATING SYSTEMS Software in the Background. Chapter 2

COS 318: Operating Systems. Virtual Machine Monitors

Computer Organisation Operating Systems

Virtual Hosting & Virtual Machines

Components of a Computing System. What is an Operating System? Resources. Abstract Resources. Goals of an OS. System Software

CHAPTER 15: Operating Systems: An Overview

Intel Application Software Development Tool Suite 2.2 for Intel Atom processor. In-Depth

FAME Operating Systems

Virtualization Technologies and Blackboard: The Future of Blackboard Software on Multi-Core Technologies

Java and Real Time Storage Applications

Online Recruitment System 1. INTRODUCTION

Java Garbage Collection Basics

Virtual Servers. Virtual machines. Virtualization. Design of IBM s VM. Virtual machine systems can give everyone the OS (and hardware) that they want.

Monitoring, Tracing, Debugging (Under Construction)

Operating System Tutorial

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives

Transcription:

System Structures Services Interface Structure

Operating system services (1)

Operating system services (2) Functions that are helpful to the user User interface Command line interpreter Batch interface Graphical user interface (GUI) Program execution I/O operations File-system manipulation Communications Shared memory or message passing Error detection Hardware and software errors

Operating system services (3) Functions for the efficient operation of the system Resource allocation Special or generic allocation code Accounting Protection and security Access control Security based on weakest link principle

OS user interface Command interpreter shells Implemented in kernel or as a system program Built-in commands versus external system programs GUI Desktop metaphor with icons Many systems include both!

System calls (1) An interface to the services of the OS Routines (methods) in C or C++ System call use: copy file

System calls (2) Application Programming Interface (API) Examples Win32 for Windows POSIX API for POSIX-based systems (Unix, Linux, Mac OS X) Java API for Java Virtual Machine Key advantages: portability and ease of use

System calls (3) System call handling: open()

System calls (4) C program invoking printf() library call, which calls write() system call

System calls (5) Parameter passing 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 E.g. 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 In Java it is not possible to directly make systems calls Java Native Interface (JNI)

Types of system calls (1) Process control File management Device management Information maintenance Communications Protection

Single-task OS MS-DOS Multi-task OS FreeBSD Types of system calls (2)

Types of system calls (3) Process control end, abort load, execute create/terminate process get/set process attributes wait for time/event, signal event allocate free memory File management create/delete file open, close read, write, reposition get/set file attributes Device management request/release device read, write, reposition get/set device attributes logically attach/detach devices Information maintenance get/set time or date get/set system data set process, file or device attributes Communications create/delete communication connection send/receive messages transfer status information attach/detach remote devices Protection get/set permission allow/deny user

System programs A convenient environment for program development and execution File management Status information (Registry) File modification Programming-language support Compilers, assemblers, debuggers, interpreters Program loading and execution (Loaders, linkage editors) Communications Web browsers, Email clients, Remote log in, File transfer Application programs These define the users view of the OS

OS Design & Implementation (1) No definitive answers Design goals User goals: convenient to use, easy to learn, reliable, safe and fast System goals: easy to design, implement, maintain, flexible, reliable, error free and efficient General software engineering principles help Separation of policy from mechanism Separate how (policy) from what (policy) Example: timer Separation is important for flexibility Policy decisions are important for all resource allocation

OS Design & Implementation (2) Implementation Mostly written in C or C++ with certain parts in assembly language Advantages Faster coding, more compact, easier to understand and debug Improvements in compilation will improve the code Easier to port Disadvantages Reduced speed, increased storage requirements Modern compiler are better than most developers at code optimisation Better data structure and algorithms are more likely to deliver performance improvements You can always identify and fix performance bottlenecks after correctness has been established

MS-DOS layers Traditional Unix OS Structure (1)

OS Structure (2) Layered approach Top-down approach & information hiding Open versus closed Advantages Simplicity of construction and debugging Disadvantages Difficulty in defining layers Less efficient Trend: fewer layers with more functionality

OS Structure (3) Micro-kernels Remove everything non-essential out of the kernel Module communication with message-passing through the kernel Advantages Ease of extension, easier to port, more secure and reliable Disadvantage Performance decrease

OS Structure (4) Modules Best current approach: use object-oriented techniques to create a modular kernel Module interfaces Dynamically loadable modules More flexible than layered More efficient than micro-kernel

Virtual machines (1) The logical conclusion of the layered approach Abstract single computer hardware into several execution different environments CPU scheduling and virtual memory techniques give the illusion of a processor and memory for its environment Host versus guest OS

Virtual machines (2) Benefits Share hardware between different execution environments Protect host from VMs and isolate VMs from each other Sharing either through shared file-system or over virtual communication network A perfect vehicle for OS research and development System development time reduction Rapid porting and testing of programs in multiple environments Key for Cloud Computing System consolidation Easier system management VM images Open Virtual Machine Format

Virtual machines (3) Implementation Challenging to provide an exact duplicate of the underlying machine Virtual user and virtual kernel mode Performance issues Virtual I/O spooled or interpreted Multiprogramming Requires hardware support

Virtual machines (4) Alternatives Simulation/emulation Para-virtualisation Container or zones

Java (1) Java technology Programming language specification Virtual machine specification Java language Object-oriented Each class compiled into bytecode High-level support for networking and distributed objects Multi-threaded language Secure Java standard edition API (micro-edition, enterprise edition) Java virtual machine Class loader and Java interpreter Garbage collection Just-in-time (JIT) compiler Java programs do not interact directly with the OS, the JVM does Java development kit Development tools (compiler, debugger) Runtime environment (JRE)

JDK.NET Java (2)

For contemplation What is the purpose of the command interpreter? Why is it usually separate from the kernel? What is the main advantage of the layered approach to system design? What are the disadvantages of using the layered approach? How could a system be designed to allow a choice of OS from which to boot? What would the bootstrap program need to do? Describe three general methods for passing parameters to the operating system. What are the advantages and disadvantages of using the same system call interface for manipulating both files and devices? Why is the separation of mechanism and policy desirable? What are the main advantages of the microkernel approach to system design? How do user programs and system services interact in a microkernel architecture? What are the disadvantages of using the microkernel approach? In what ways is the modular kernel approach similar to the layered approach? In what ways does it differ from the layered approach? What is the main advantage for an OS designer of using a virtual machine architecture? What is the main advantage for a user? What is the relationship between a guest operating system and a host operating system in a system like VMware? What factors need to be considered in choosing the host operating system? The experimental Synthesis operating system has an assembler incorporated within the kernel. To optimize system-call performance, the kernel assembles routines within kernel space to minimize the path that the system call must take through the kernel. This approach is the antithesis of the layered approach, in which the path through the kernel is extended to make building the operating system easier. Discuss the pros and cons of the Synthesis approach to kernel design and to systemperformance optimization.