Introduction to OS. Introduction MOS Mahmoud El-Gayyar. Mahmoud El-Gayyar / Introduction to OS 1

Similar documents
History, Hardware, OS Concepts

History. 3rd Generation- Integrated Circuits, Transistors (Integrated Circuit form) for Memory ( memory is now volatile), Terminal/Keyboard for I/O

Computer System Overview

EEE 435 Principles of Operating Systems

Reserves time on a paper sign-up sheet. Programmer runs his own program. Relays or vacuum tube hardware. Plug board or punch card input.

Introduction to Computer Systems and Operating Systems

Four Components of a Computer System

Principles of Operating Systems CS 446/646

x86 Architectures; Assembly Language Basics of Assembly language for the x86 and x86_64 architectures

Chapter 1 Computer System Overview

Operating Systems: Internals and Design Principles, 7/E William Stallings. Chapter 1 Computer System Overview

ECE 341. Lecture # 16

Introduction to OS Processes in Unix, Linux, and Windows MOS 2.1 Mahmoud El-Gayyar

Fundamental Concepts and History

COS 318: Operating Systems. Overview. Jaswinder Pal Singh Computer Science Department Princeton University

An Operating System History of Operating Systems. Operating Systems. Autumn CS4023

Pharmacy college.. Assist.Prof. Dr. Abdullah A. Abdullah

Introduction to Concurrency (Processes, Threads, Interrupts, etc.)

OS And Hardware. Computer Hardware Review PROCESSORS. CPU Registers. CPU Registers 02/04/2013

OPERATING SYSTEM. PREPARED BY : DHAVAL R. PATEL Page 1. Q.1 Explain Memory

Lecture 1 Introduction (Chapter 1 of Textbook)

UNIT:4 MEMORY ORGANIZATION

Operating Systems CS 571

Computer Organization ECE514. Chapter 5 Input/Output (9hrs)

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

Operating System Review

Memory memories memory

Introduction to Operating Systems. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Chapter 5 - Input / Output

Assembly Language. Lecture 2 x86 Processor Architecture

The Memory Hierarchy Part I

COSC 243. Input / Output. Lecture 13 Input/Output. COSC 243 (Computer Architecture)

Common Computer-System and OS Structures

EECS 678: Introduction to Operating Systems. Heechul Yun

CREATED BY M BILAL & Arslan Ahmad Shaad Visit:

OPERATING SYSTEMS: Lesson 1: Introduction to Operating Systems

Introduction to Operating. Chapter Chapter

Internal Memory. Computer Architecture. Outline. Memory Hierarchy. Semiconductor Memory Types. Copyright 2000 N. AYDIN. All rights reserved.

Introduction. What is an Operating System? A Modern Computer System. Computer System Components. What is an Operating System?

Introduction to Operating Systems. Chapter Chapter

Computer System Overview

Computer Organization

Last class: Today: Course administration OS definition, some history. Background on Computer Architecture

CS370 Operating Systems

Computer System Overview OPERATING SYSTEM TOP-LEVEL COMPONENTS. Simplified view: Operating Systems. Slide 1. Slide /S2. Slide 2.

Operating Systems. Introduction & Overview. Outline for today s lecture. Administrivia. ITS 225: Operating Systems. Lecture 1

Introduction to Operating Systems. Chapter Chapter

COMP3221: Microprocessors and. and Embedded Systems. Overview. Lecture 23: Memory Systems (I)

Andrew S. Tanenbaum, Operating Systems, Design and Implementation, (Second Edition), Prentice Hall.

Another fundamental component of the computer is the main memory.

OPERATING SYSTEMS CS136

Memory Study Material

CSC 553 Operating Systems

Operating Systems Concepts. CMPUT 379, Winter 2014 Section B1

EECS 3221 Operating System Fundamentals

EECS 3221 Operating System Fundamentals

Operating Systems: Internals and Design Principles. Chapter 2 Operating System Overview Seventh Edition By William Stallings

INTRODUCTION TO OPERATING SYSTEMS. Jo, Heeseung

Operating Systems. I. Introduction. Eurecom

Introduction to Operating Systems

Introduction to Operating Systems. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University


5.b Principles of I/O Hardware CPU-I/O communication

Misc. Third Generation Batch Multiprogramming. Fourth Generation Time Sharing. Last Time Evolution of OSs

Operating Systems, Fall

Introduction to Operating Systems. Jo, Heeseung

CS370 Operating Systems

Computer Organization and Assembly Language (CS-506)

Operating System. Operating System Overview. Structure of a Computer System. Structure of a Computer System. Structure of a Computer System

Large and Fast: Exploiting Memory Hierarchy

7/20/2008. What Operating Systems Do Computer-System Organization

Master level: Operating systems, distributed systems, networking,

Operating Systems: Overview and Introduction

Latches. IT 3123 Hardware and Software Concepts. Registers. The Little Man has Registers. Data Registers. Program Counter

Process Time. Steven M. Bellovin January 25,

MICROPROCESSOR MEMORY ORGANIZATION

Topic 18: Virtual Memory

EECS 678: Introduction to Operating Systems. Heechul Yun

Cute Tricks with Virtual Memory

Computer Fundamentals : Pradeep K. Sinha& Priti Sinha

Chapter 1: Introduction. Operating System Concepts 9 th Edit9on

Chapter 1 Computer System Overview

CS Basics 2) Architecture

machine cycle, the CPU: (a) Fetches an instruction, (b) Decodes the instruction, (c) Executes the instruction, and (d) Stores the result.

Cycle Time for Non-pipelined & Pipelined processors

Organization. 5.1 Semiconductor Main Memory. William Stallings Computer Organization and Architecture 6th Edition

Lecture 2 - Fundamental Concepts

Chapter 5 Internal Memory

William Stallings Computer Organization and Architecture 6th Edition. Chapter 5 Internal Memory

Chapter 1: Introduction

CPSC 341 OS & Networks. Introduction. Dr. Yingwu Zhu

-Device. -Physical or virtual thing that does something -Software + hardware to operate a device (Controller runs port, Bus, device)

+ Random-Access Memory (RAM)

Operating Systems. Antônio Augusto Fröhlich LISHA/UFSC. December 20, 2008

Chapter TEN. Memory and Memory Interfacing

Chapter 08: The Memory System. Lesson 01: Basic Concepts

Lecture Topics. Announcements. Today: Operating System Overview (Stallings, chapter , ) Next: Processes (Stallings, chapter

CS 153 Design of Operating Systems

SMD149 - Operating Systems

Roland Parviainen Phone: Office:? Web:

Transcription:

Introduction to OS Introduction MOS 1.1 1.3 Mahmoud El-Gayyar elgayyar@ci.suez.edu.eg Mahmoud El-Gayyar / Introduction to OS 1

Why an Operating Systems course? Understanding of inner workings of systems OS-related assignments you may see in real life: Design and develop an operating system to do THIS (not very likely) Select an operating system for an application that will do THAT (probable) Design and develop this application on THAT system to exploit its special features (likely) Mahmoud El-Gayyar / Introduction to OS 2

Outline What is an Operating System? History of OS? Computer Hardware Review Mahmoud El-Gayyar / Introduction to OS 3

What is an Operating System? Mahmoud El-Gayyar / Introduction to OS 4

Where is the software? Mahmoud El-Gayyar / Introduction to OS 5

OS It is a Control Program Provide the rules for the how the machine will operate: Control the operation of the I/O devices Ensure smooth running of the machine Mahmoud El-Gayyar / Introduction to OS 6

OS It s a Protection Layer Make the machine more robust less scope for a bug to have devastating consequences OS does everything programs can t be trusted to do OS makes programs play nice with others Mahmoud El-Gayyar / Introduction to OS 7

OS It s a Resource Manager Bottom-up View It manages physical resources: Processor Memory Storage devices Network devices etc... Example: Multiplexing (Sharing) Time!! Space!! Mahmoud El-Gayyar / Introduction to OS 8

OS It is a Abstraction Layer Make the machine nicer, easier to program, higher level... (top-down view) Hide some of the complications of the machine Mahmoud El-Gayyar / Introduction to OS 9

Abstraction The most important word in this course! Mahmoud El-Gayyar / Introduction to OS 10

Four fundamental Abstractions Processes & threads This Course (Tanenbaum, Chapter 2) Virtual memory This Course (Tanenbaum, Chapter 3) Files & persistent storage This Course (Tanenbaum, Chapter 4) Sockets & connections Computer Networks Course Mahmoud El-Gayyar / Introduction to OS 11

Outline What is an Operating System? History of OS? Computer Hardware Review Mahmoud El-Gayyar / Introduction to OS 12

History of Operating Systems The first true digital computer was designed by the English mathematician Charles Babbage (1792-1871). Generations: (1945 55) Vacuum Tubes (no OS, pure machine language) (1955 65) Transistors and Batch Systems (1965 1980) ICs and Multiprogramming (1980 Present) LSI Personal Computers, Tablets, Phones Mahmoud El-Gayyar / Introduction to OS 13

(2 nd ) Transistors and Batch Systems Mahmoud El-Gayyar / Introduction to OS 14

(3 rd ) ICs and Multiprogramming Time Sharing CTSS (Compatible time sharing system) MULTICS (MULTiplexed Information and Computing Service) Unix (Ken Thompson) Linux (Linus Torvalds, Finland Student) Mahmoud El-Gayyar / Introduction to OS 15

(4 th ) Large Scale Integrated Circuits PCs Network Operating Systems Distributed Operating Systems Mahmoud El-Gayyar / Introduction to OS 16

Outline What is an Operating System? History of OS? Computer Hardware Review Mahmoud El-Gayyar / Introduction to OS 17

Computer Hardware Mahmoud El-Gayyar / Introduction to OS 18

CPU Pipelining Need to perform computation! Memory contains program instructions and program data Processor registers maintain processor state. Registers include: General purpose (address & data) registers Instruction pointer (aka program counter) Stack pointer(s) Control and status registers Mahmoud El-Gayyar / Introduction to OS 19

Computer Program Four segments Code/Text instructions Data initialized global variables Stack Heap Why? Separate code and data Stack and heap go towards each other Stack Heap Initialized data Code Mahmoud El-Gayyar / Introduction to OS 20

Memory Hierarchy Mahmoud El-Gayyar / Introduction to OS 21

Cache Memory Main memory is divided into cache lines (64 bytes) 0-63 in line 0, 64-127 in line 1, The most heavily used cache lines are kept in a high-speed cache located inside or very close to the CPU. When program reads a word-cache hardware checks to see if in cache. If so, then have a cache hit (2 cycles). Otherwise, make request of main memory over the bus (expensive) Cache is expensive and is therefore limited in size Can have cache hierarchies two or even three levels of cache, each one slower and bigger than the one before it. Mahmoud El-Gayyar / Introduction to OS 22

Multithreaded and Multicore Chips Intel AMD Mahmoud El-Gayyar / Introduction to OS 23

RAM ROM Keeps bootstrap OS loader Memory EEPROM (Electrically Erasable PROM) and flash memory Can be re-written but slowly e.g: as disk in portable music players If it is erased too many times, it wears out. CMOS volatile. hold the current time and date. The CMOS memory and the clock circuit that increments the time in it are powered by a small battery. draws so little power that the original factory installed battery often lasts for several years. Mahmoud El-Gayyar / Introduction to OS 24

I/O Devices Controller runs a device-accepts commands from the OS and executes them Device Driver: OS software that talks to controllergives commands, accepts responses Driver runs in kernel mode Three modes of communication: Polling Interrupts DMA Mahmoud El-Gayyar / Introduction to OS 25

I/O by Polling Device Driver issues command to controller Driver polls device until it is ready e.g. Send character to printer controller and poll until it is ready to accept the next character Big use of CPU (Busy waiting) Called programmed I/O - not really used any more Mahmoud El-Gayyar / Introduction to OS 26

I/O by Interrupts Generate an interrupt when I/O is finished. e.g. When character is finished being printed, interrupt CPU. Allows CPU to do something else while character is being printed This part of memory that holds the interrupt handler is called the interrupt vector. Mahmoud El-Gayyar / Introduction to OS 27

I/O by DMA Special (controller) chip Avoids using the CPU as part of the transfer to/from memory CPU tells chip to set up transfer and take care of it Chip does as it told and interrupts CPU when it is finished Mahmoud El-Gayyar / Introduction to OS 28

Review What is Multiprogramming? On early computers, every byte of data read or written was handled by the CPU (i.e., there was no DMA). What implications does this have for multiprogramming? Mahmoud El-Gayyar / Introduction to OS 29