Operating System Overview. Otto J. Anshus



Similar documents
Processes and Non-Preemptive Scheduling. Otto J. Anshus

Introduction. What is an Operating System?

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

Example of Standard API

CSC 2405: Computer Systems II

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

Operating Systems 4 th Class

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

Chapter 3: Operating-System Structures. Common System Components

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

Chapter 3 Operating-System Structures

COS 318: Operating Systems

Chapter 6, The Operating System Machine Level

Lesson Objectives. To provide a grand tour of the major operating systems components To provide coverage of basic computer system organization

OPERATING SYSTEMS STRUCTURES

An Implementation Of Multiprocessor Linux

Chapter 2 System Structures

Building Applications Using Micro Focus COBOL

ELEC 377. Operating Systems. Week 1 Class 3

CS5460: Operating Systems

Processor Architectures

Operating System Structures

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

Machine Architecture and Number Systems. Major Computer Components. Schematic Diagram of a Computer. The CPU. The Bus. Main Memory.

I/O. Input/Output. Types of devices. Interface. Computer hardware

Lesson 06: Basics of Software Development (W02D2

Introduction to Virtual Machines

Operating System Components and Services

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

Fall Lecture 1. Operating Systems: Configuration & Use CIS345. Introduction to Operating Systems. Mostafa Z. Ali. mzali@just.edu.

Operating System Structures

Embedded Software development Process and Tools: Lesson-4 Linking and Locating Software

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

Outline: Operating Systems

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

Overview of Operating Systems Instructor: Dr. Tongping Liu

Operating Systems. Lecture 03. February 11, 2013

Operating Systems Introduction and Overview. Otto J. Anshus

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

Virtualization. Pradipta De

Operating Systems Overview

Operating Systems: Basic Concepts and History

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

Chapter 1 Lesson 3 Hardware Elements in the Embedded Systems Chapter-1L03: "Embedded Systems - ", Raj Kamal, Publs.: McGraw-Hill Education

Republic Polytechnic School of Information and Communications Technology C226 Operating System Concepts. Module Curriculum

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

Computer System: User s View. Computer System Components: High Level View. Input. Output. Computer. Computer System: Motherboard Level

System Structures. Services Interface Structure

OS Concepts and structure

Introducción. Diseño de sistemas digitales.1

OPERATING SYSTEM SERVICES

VMware and CPU Virtualization Technology. Jack Lo Sr. Director, R&D

Virtualization for Cloud Computing

Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University

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

COS 318: Operating Systems. Virtual Machine Monitors

Chapter 6. Inside the System Unit. What You Will Learn... Computers Are Your Future. What You Will Learn... Describing Hardware Performance

Kernel Types System Calls. Operating Systems. Autumn 2013 CS4023

Virtualization Technologies

Fastboot Techniques for x86 Architectures. Marcus Bortel Field Application Engineer QNX Software Systems

x86 ISA Modifications to support Virtual Machines

Logical Operations. Control Unit. Contents. Arithmetic Operations. Objectives. The Central Processing Unit: Arithmetic / Logic Unit.

Chapter 3. Operating Systems

The Central Processing Unit:

1. Computer System Structure and Components

what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored?

The Bus (PCI and PCI-Express)

Operating System Organization. Purpose of an OS

Learning Outcomes. Simple CPU Operation and Buses. Composition of a CPU. A simple CPU design

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

Lecture 6: Interrupts. CSC 469H1F Fall 2006 Angela Demke Brown

Computer Systems Structure Input/Output

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

Management Challenge. Managing Hardware Assets. Central Processing Unit. What is a Computer System?

W4118: segmentation and paging. Instructor: Junfeng Yang

Here is a diagram of a simple computer system: (this diagram will be the one needed for exams) CPU. cache

Computers. Hardware. The Central Processing Unit (CPU) CMPT 125: Lecture 1: Understanding the Computer

Outline. Outline. Why virtualization? Why not virtualize? Today s data center. Cloud computing. Virtual resource pool

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

Operating System Structure

12. Introduction to Virtual Machines

An Introduction to Computer Science and Computer Organization Comp 150 Fall 2008

(Refer Slide Time: 02:39)

CS161: Operating Systems

Virtualization. Dr. Yingwu Zhu

A Unified View of Virtual Machines

Chapter 11 I/O Management and Disk Scheduling

Lecture 25 Symbian OS

Operating System Components

CS3600 SYSTEMS AND NETWORKS

EMBEDDED SYSTEM BASICS AND APPLICATION

Cloud Computing. Up until now

Computer Performance. Topic 3. Contents. Prerequisite knowledge Before studying this topic you should be able to:

picojava TM : A Hardware Implementation of the Java Virtual Machine

MICROPROCESSOR BCA IV Sem MULTIPLE CHOICE QUESTIONS

Virtual machines and operating systems

LSN 10 Linux Overview

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-12: ARM

Chapter Introduction. Storage and Other I/O Topics. p. 570( 頁 585) Fig I/O devices can be characterized by. I/O bus connections

Embedded Systems. 6. Real-Time Operating Systems

Transcription:

Operating System Overview Otto J. Anshus

A Typical Computer CPU... CPU Memory Chipset I/O bus ROM Keyboard Network

A Typical Computer System CPU. CPU Memory Application(s) Operating System ROM OS Apps Data Keyboard Network

Moving data around in the machine The processor has entry/exit points for moving data in and out of the processor. A bus is a set of wires upon which devices can connect and communicate over. The conceptually simplest way of connecting everything together would be to extend the wires in/out of the processor, and have everything else hook onto that For our systems, that would be impractical and expensive

Buses In/out of processor should be very fast You can make it wide (more parallell wires) You can increase the rate on each wire while still making sure that corresponding bits on each line arrive at same time You can do other tricks For achieving this you will trade a combination of cost, distance, robustness, power, etc. Not needed nor practical for your diskette, keyboard, mouse and many other devices We need a range of bus es (or highways) from the super-wide, super-fast bus between CPU, Memory and cache, to narrow but robust footpaths to legacy devices

Chip-set Commercially standardized circuitry that surround the processor and provides a set of buses and some other functionality Also has a programmable timer that you will set to interrupt the processor regularly PC chip-sets traditionally have two exit/entry areas North-bridge (fast and furios) CPU, Memory, AGP-port (?), now also Gb Ethernet South-bridge Everything else, including legacy buses Used to be limited by PCI-bus speed, now is much faster

Wrap-up: The Processor Von Neumann architecture, stored program, instruction pointer, sequential execution one-at-a-time Control section Decodes intructions and controls the datapath Datapath including ALU Register file, paths for moving data around internally and out/in of processor, operational units (ALU)

Wrap-up: OS-HW agreement We agreed with processor architect that whenever processor couldn t proceed meaningfully, it should note the exception and proceed fetching instructions from a predermined location in memory. We, the OS-writers, will make sure appropriate code resides at that location in memory To allow other HW to request the attention of the OS, the processor architect provides the processor with an interupt line. The processor checks the line once every instructioncycle. Whenever the line is set, the processor faults and gets it s next instruction at a predetermined location, where we, the OSwriters, will make sure

Interrupts Raised by external events CPU can resume from the interrupt handler iret instruction: returns by popping return address from stack, and enable interrupts (IA32 instruction set) Traps Internal events System calls (syscalls) Also return by iret Interrupts and Traps

User level vs. Kernel level Kernel (a.k.a. supervisory or privileged) level User level All instructions are available Total control possible so OS must say Mine, all mine (Daffy Duck) Some instructions are not available any more Programs can be modified and substituted by user In theory, but not always in practice

Typical Unix OS Structure

Typical Unix OS Structure Application Libraries Portable OS Layer Machine-dependent layer System Call Interface C Assembler Low-level system initialization and bootstrap Fault, trap, interrupt and exception handling Memory management: hardware address translation Low-level kernel/user-mode process context switching I/O device driver and device initialization code...have to Performance

Software Onion

Linux Kernel version 2.0 500,000 lines of C code and 8000 lines of assembler Micro kernel (process & memory management): 5% Device drivers: 90% Network, file systems, initialization, etc.: 5%

The Application: A process Four segments Code/text: instructions Data: variables Stack Heap Why? Separate code and data Stack and heap grow toward each other

The Application Stack Layout by compiler Allocate at process creation (fork) Deallocate at process termination Heap Linker and loader specify the starting address Allocate/deallocate by library calls such as malloc() and free() called by application Data Compiler allocate statically Compiler specify names and symbolic references Linker translate refs and relocate addresses Loader finally lay them out in memory

OS Service Examples Examples of services not provided at user level System calls File open, close, read and write Control the CPU so that users can t take over by doing while ( 1 ) ; Protection: Keep user programs from crashing OS Keep user programs from crashing each other Examples of services running at user level Read time of the day Protected user level stuff

Processor Management Goals Overlap between I/O and computation Time sharing Multiple CPU allocations Issues Do not waste CPU resources Synchronization and mutual exclusion Fairness and deadlock free CPU I/O CPU CPU CPU I/O CPU CPU I/O CPU CPU

Memory Management Goals Support programs to run Allocation and management Transfers from and to secondary storage Issues Efficiency & convenience Fairness Protection

IA32 Architecture Registers

Intel architecture is little endian : little end in first Power PC (and Sun SPARC) is biendian, but Apple is using it as a big endian Java: big endian (most significant byte) Memory Address 0-255 byte byte Instructions Data word

IA32 Memory

Hexadecimal 16 decimal is base 0, 1, 2,,9, A, B, C, D, E, F C4AFh=50351d C*16 3 + 4*16 2 +A*16 1+ F*16 0 12*16 3 + 4*16 2 +10*16 1+ 15*16 0 = 50351d 2 8-1=11111111b =255d =FFh 2 16-1=1111111111111111b =65535d =FFFFh 2 32-1=1111111111111111 1b =4294967295d =FFFFFFFFh

I/O Device Management Goals Interactions between devices and applications Ability to plug in new devices Issues Efficiency Fairness Protection and sharing User 1 Driver I/O device... Library support... User n Driver I/O device

Window Systems All in the kernel (Windows) Pro: efficient Con: difficult to develop new services All at user level Pro: easy to develop new services Con: protection Split between user and kernel (Unix) Kernel: display driver and mouse driver User: the rest

File System A typical file system Open a file with authentication Read/write data in files Close a file Can the services be moved to user level? User 1... User n File system services File... File

User level FS? Yes: Minix FS as a server at user level almost a user process......but booted together with OS and never terminates and gets higher CPU priority and a new server means recompiling the kernel disk drivers at Kernel level NO: Unix and Windows NT File system at Kernel level