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



Similar documents
Kernel Types System Calls. Operating Systems. Autumn 2013 CS4023

Chapter 2 System Structures

Example of Standard API


System Structures. Services Interface Structure

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

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

Operating System Structures

Chapter 3 Operating-System Structures

Operating System Structure

Chapter 6, The Operating System Machine Level

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

CSE 120 Principles of Operating Systems. Modules, Interfaces, Structure

Tools Page 1 of 13 ON PROGRAM TRANSLATION. A priori, we have two translation mechanisms available:

Windows NT. Chapter 11 Case Study 2: Windows Windows 2000 (2) Windows 2000 (1) Different versions of Windows 2000

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

Components of a Computer System

OPERATING. William Stallings

CS420: Operating Systems OS Services & System Calls

windows maurizio pizzonia roma tre university

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

CPS221 Lecture: Operating System Structure; Virtual Machines

Operating System Organization. Purpose of an OS

Computer Organisation Operating Systems

Introduction to Virtual Machines

Operating System Components and Services

ReactOS is (not) Windows. Windows internals and why ReactOS couldn t just use a Linux kernel

FAME Operating Systems

OPERATING SYSTEMS Internais and Design Principles

OPERATING SYSTEM SERVICES

COS 318: Operating Systems

(Advanced Topics in) Operating Systems

Chapter 15 Windows Operating Systems

Software: Systems and Application Software

theguard! ApplicationManager System Windows Data Collector

Process Description and Control william stallings, maurizio pizzonia - sistemi operativi

Operating System Structures

OS Concepts and structure

Operating System Software

Overview of Operating Systems Instructor: Dr. Tongping Liu

OPERATING SYSTEMS STRUCTURES

CS 377: Operating Systems. Outline. A review of what you ve learned, and how it applies to a real operating system. Lecture 25 - Linux Case Study

Computers: Tools for an Information Age

CS222: Systems Programming

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

CS161: Operating Systems

Chapter 4. System Software. What You Will Learn... Computers Are Your Future. System Software. What You Will Learn... Starting the Computer

ELEC 377. Operating Systems. Week 1 Class 3

Virtualization. Types of Interfaces

4.1 Introduction 4.2 Explain the purpose of an operating system Describe characteristics of modern operating systems Control Hardware Access

Windows8 Internals, Sixth Edition, Part 1

Software design (Cont.)

Microkernels, virtualization, exokernels. Tutorial 1 CSC469

Operating Systems 4 th Class

Hypervisors. Introduction. Introduction. Introduction. Introduction. Introduction. Credits:

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

CHAPTER 15: Operating Systems: An Overview

Uses for Virtual Machines. Virtual Machines. There are several uses for virtual machines:

Processes and Non-Preemptive Scheduling. Otto J. Anshus

Operating System Overview. Otto J. Anshus

Tuning U2 Databases on Windows. Nik Kesic, Lead Technical Support

Page 1 of 5. IS 335: Information Technology in Business Lecture Outline Operating Systems

Full and Para Virtualization

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

Virtual Machine Security

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

CHAPTER 1: OPERATING SYSTEM FUNDAMENTALS

12. Introduction to Virtual Machines

Chapter 3: Operating-System Structures. Common System Components

Computer Science 4302 Operating Systems. Student Learning Outcomes

Lecture 25 Symbian OS

The PC Boot Process - Windows XP.

Operating System for the K computer

1 Organization of Operating Systems

3 - Introduction to Operating Systems

LSN 10 Linux Overview

Operating System Components

CSE 265: System and Network Administration

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

Operating System Impact on SMT Architecture

kvm: Kernel-based Virtual Machine for Linux

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

Kernel comparison of OpenSolaris, Windows Vista and. Linux 2.6

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

Chapter 5: System Software: Operating Systems and Utility Programs

Multi-core Programming System Overview

Comparing Virtualization Technologies

Module 20: The Linux System

Introduction to Operating Systems. Perspective of the Computer. System Software. Indiana University Chen Yu

APPLICATION VIRTUALIZATION TECHNOLOGIES WHITEPAPER

Computer Networks/DV2 Lab

Advanced Systems Security: Retrofitting Commercial Systems

Network operating systems typically are used to run computers that act as servers. They provide the capabilities required for network operation.

Virtualization. Pradipta De

Kernel. What is an Operating System? Systems Software and Application Software. The core of an OS is called kernel, which. Module 9: Operating Systems

Virtualization: What does it mean for SAS? Karl Fisher and Clarke Thacher, SAS Institute Inc., Cary, NC

Chapter 11 Distributed File Systems. Distributed File Systems

Chapter 14 Virtual Machines

Networking Operating Systems (CO32010)

Transcription:

(Advanced Topics in) Operating Systems Winter Term 2009 / 2010 Jun.-Prof. Dr.-Ing. André Brinkmann brinkman@upb.de Universität Paderborn PC 1

Overview Overview of chapter 3: Case Studies 3.1 Windows Architecture.....3 3.2 Unix and Linux Architecture......20

Windows Architecture Modular structure for flexibility All system functions are supported by just one OS component Key system data and all functions can only be accessed through the appropriate interfaces Executes on a variety of hardware platforms Intel x86 and AMD64 for desktop Windows Additionally Intel IA64 for Server OS Windows NT supported DEC Alpha Windows NT has been designed by Dave Cutler, who has also been responsible for DEC s VMS OS Many similarities between VMS and NT Microsoft and DEC handled lawsuit out of court Supports applications written for other operating systems / personalities 16 Bit applications written for MS-DOS or Windows 3.1 3

Windows Architecture 4

Kernel-Mode Components Executive contains base operating system services Memory management (only architecture dependent executive) Process and thread management Security I/O Interprocess communication Kernel consists of the most used components Thread scheduling, trap handlers, interrupts, synchronization objects Division into kernel and executive is reflection of VAX/VMS roots VAX processor has 4 protection layers user, supervisor, executive, kernel Some of NT targets have less protection layers 5

Kernel-Mode Components Hardware abstraction layer (HAL) Abstraction from format of page-table entries, cache, word length, page sizes, in C would lead to severe performance penalties Some operations, like compare&swap, are impossible to port HAL isolates the operating system from platform-specific hardware differences Portability Some of the HW functions the HAL manages HAL does not provide drivers for individual I/O devices 6

Kernel-Mode Components Device drivers Translate user I/O function calls into specific hardware device I/O requests Uses functionalities provided by HAL (e.g. abstraction from accessing HW memory-mapped I/O or I/O ports) Includes DRM, file system, volume manager, TCP/IP stack, devices,... Drivers can be stacked Windowing and graphics systems Implements the graphical user interface (GUI) 7

Windows Executive Each component divided into internal and external data structures and interfaces ALL internal aspects only visible inside component External aspects visible to all components inside executive Drivers can link to external aspects via ntoskrnl.exe as library Runs in the context of calling thread Blocking in executive also blocks calling thread ok, if running for special task of calling thread unfair, if working on housekeeping functionality NT includes some dedicated kernel-mode threads for housekeeping 8

Windows Executive: Object Manager Encapsulation Object consists of one or more data items and one or more procedures Object class and instance Create specified instances of an object Inheritance Supported to some extent in the Executive Polymorphism Can be accessed by user mode processes through handles 9

Implementation of Objects I Structure of an object 10

Implementation of Objects II Some common executive object types managed by the object manager 11

Implementation of Objects III The relationship between handle tables, objects and type objects 12

The Object Name Space Some typical directories in the object name space Each object lives inside NT name space Name space is empty at boot time 13

The Registry I Registry is special file system for config info Organized in volumes called hives Each hive is a file Top level keys and selected subkeys Capitalization has no meaning but follows Microsoft practice. 14

The Registry II Some of the Win32 API calls for using the registry 15

Booting Windows 2000 Processes starting up during boot phase Those above the line are always started Those below are examples of services which could be started 16

Special system processes User-Mode Processes Ex: session manager, authentication subsystem, service manager logon process Service processes Environment subsystems User applications 17

Simplifies the Executive Client/Server Model Possible to construct a variety of APIs Improves reliability Each server runs outside the kernel, protected from other servers Provides a uniform means for applications to communicate via Remote Procedure Calls (RPCs) Provides base for distributed computing 18

Threads and SMP Operating system routines can run on any available processor Multiple threads of execution within a single process may execute on different processors simultaneously Server processes may use multiple threads Share data and resources between process 19

Unix Hardware is surrounded by the operating system software Comes with a number of user services and interfaces Shell Components of the C compiler 20

General UNIX Architecture 21

Traditional UNIX Kernel 22

Traditional UNIX Kernel User programs invoke OS services either directly or through library routines System call interface is boundary to user space Primitive routines that interact directly with the kernel at the other end Two main parts inside the kernel Process control subsystem File System Description valid for systems until 4.3BSD and System V release 3 Designed to run on a single processor Lacks ability to protect access to internal data structures from multiple processor Typically supports single file system, scheduler, executable file format, Code not designed for reuse Bloated and unmodular kernel 23

Modern UNIX Kernel 24

Modern UNIX Systems System V Release 4 (SVR4) Jointly developed by AT&T and Sun Microsystems Developed to provide a uniform platform for commercial Unix Solaris 10 is, e.g., SVR4 based Unix that provides full support for SMP, multi-threaded kernel, BSD Served as basis for many commercial Unix variants 4.4BSD has been the final version released by Berkley Afterwards developed under open source license as FreeBSD Success of FreeBSD has been hindered by lawsuit from AT&T MacOS X is based on FreeBSD 5.0 and Mach Kernel 3.0 25

Linux Does not use a microkernel approach Collection of loadable modules Dynamic linking Stackable modules 26

Linux Kernel Components 27

Linux Kernel Modules 28

Comparison MS Windows vs. Linux Windows / Linux Comparison Windows General Linux A commercial OS, with strong influences from VAX/VMS and requirements for compability with multiple OS personalities, such as DOS/Windows, POSIX, and, originally, OS/2 An open-source implementation of UNIX focused on simplicity and efficiency. Runs on a very large range of processor architectures. Environment which influenced fundamental design decisions 32-Bit program address space 16-bit program address space Mbytes of physical memory Kbytes of physical memory Virtual memory Swapping system with memory mapping Multiprocessor (4-way) Uniprocessor Micro-controller based I/O devices State-machine based I/O devices Client/Server distributed computing Standalone interactive systems Large, diverse user populations Small number of friendly users Compare these with today s environment 64-bit addresses Gbytes of physical memory Virtual memory, Virtual Processors Multiprocessor (64-128) High-speed internet/intranet, Web- Services Single user, but vulnerable to hackers worldwide Although both Windows and Linux have adapted to changes in the environment, the original design environments (i.e. in 1989 and 1973) heavily influenced the design choices. Unit of concurrency: Threads vs. Processes Process creation: Create Process () vs. Fork () I/O: Async vs sync Security: Discretionary Access vs. uid/gid 29