Introduction to Cloud Computing

Similar documents
CPS104 Computer Organization and Programming Lecture 18: Input-Output. Robert Wagner

COMPUTER HARDWARE. Input- Output and Communication Memory Systems

Price/performance Modern Memory Hierarchy

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

Random-Access Memory (RAM) The Memory Hierarchy. SRAM vs DRAM Summary. Conventional DRAM Organization. Page 1

Input / Ouput devices. I/O Chapter 8. Goals & Constraints. Measures of Performance. Anatomy of a Disk Drive. Introduction - 8.1

CHAPTER 7: The CPU and Memory

Communicating with devices

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

File System & Device Drive. Overview of Mass Storage Structure. Moving head Disk Mechanism. HDD Pictures 11/13/2014. CS341: Operating System

Central Processing Unit

Introduction Disks RAID Tertiary storage. Mass Storage. CMSC 412, University of Maryland. Guest lecturer: David Hovemeyer.

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

Central Processing Unit (CPU)

The Central Processing Unit:

Chapter 11 I/O Management and Disk Scheduling

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

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

Let s put together a Manual Processor

Operating System Components

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

Lecture 9: Memory and Storage Technologies

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

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

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

Computer Organization. and Instruction Execution. August 22

Lesson 06: Basics of Software Development (W02D2

COMPUTER SCIENCE AND ENGINEERING - Microprocessor Systems - Mitchell Aaron Thornton

Chapter 1 Computer System Overview

Computer Systems Structure Input/Output

Operating System Overview. Otto J. Anshus

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

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

MICROPROCESSOR AND MICROCOMPUTER BASICS

Storing Data: Disks and Files

Computer Systems Structure Main Memory Organization

OPERATING SYSTEM SERVICES

Operating system Dr. Shroouq J.

Quiz for Chapter 6 Storage and Other I/O Topics 3.10

William Stallings Computer Organization and Architecture 7 th Edition. Chapter 6 External Memory

Operating System Concepts. Operating System 資 訊 工 程 學 系 袁 賢 銘 老 師

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

LSN 2 Computer Processors

Operating Systems 4 th Class

Computer Organization & Architecture Lecture #19

Big Picture. IC220 Set #11: Storage and I/O I/O. Outline. Important but neglected

Microprocessor & Assembly Language

Devices and Device Controllers

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

Writing Assignment #2 due Today (5:00pm) - Post on your CSC101 webpage - Ask if you have questions! Lab #2 Today. Quiz #1 Tomorrow (Lectures 1-7)

CPU Organisation and Operation

İSTANBUL AYDIN UNIVERSITY

1 Storage Devices Summary

Chapter 11 I/O Management and Disk Scheduling

CHAPTER 4 MARIE: An Introduction to a Simple Computer

Chapter 9: Peripheral Devices: Magnetic Disks

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

Outline: Operating Systems

The Bus (PCI and PCI-Express)

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

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-12: ARM

Chapter 10: Mass-Storage Systems

Example of Standard API

Disks and RAID. Profs. Bracy and Van Renesse. based on slides by Prof. Sirer

CSCA0102 IT & Business Applications. Foundation in Business Information Technology School of Engineering & Computing Sciences FTMS College Global

CS 6290 I/O and Storage. Milos Prvulovic

(Refer Slide Time: 02:39)

Chapter 3: Operating-System Structures. Common System Components

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

MICROPROCESSOR BCA IV Sem MULTIPLE CHOICE QUESTIONS

CS 464/564 Introduction to Database Management System Instructor: Abdullah Mueen

(Refer Slide Time: 00:01:16 min)

Chapter 2: Computer-System Structures. Computer System Operation Storage Structure Storage Hierarchy Hardware Protection General System Architecture

TEST CHAPTERS 1 & 2 OPERATING SYSTEMS

Chapter 12: Mass-Storage Systems

Common Operating-System Components

Chapter 3: Computer Hardware Components: CPU, Memory, and I/O

Case for storage. Outline. Magnetic disks. CS2410: Computer Architecture. Storage systems. Sangyeun Cho

Primary Memory. Input Units CPU (Central Processing Unit)

Computer Architecture Prof. Mainak Chaudhuri Department of Computer Science and Engineering Indian Institute of Technology, Kanpur

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

Introduction. What is an Operating System?

TECHNOLOGY BRIEF. Compaq RAID on a Chip Technology EXECUTIVE SUMMARY CONTENTS

Putting it all together: Intel Nehalem.

Operating System Software

CHAPTER 2: HARDWARE BASICS: INSIDE THE BOX

Have both hardware and software. Want to hide the details from the programmer (user).

Chapter 2 Logic Gates and Introduction to Computer Architecture

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

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

1. Computer System Structure and Components

Chapter 2: OS Overview

Data Storage - I: Memory Hierarchies & Disks

Chapter 02: Computer Organization. Lesson 04: Functional units and components in a computer organization Part 3 Bus Structures

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

Agenda. Enterprise Application Performance Factors. Current form of Enterprise Applications. Factors to Application Performance.

CPU Organization and Assembly Language

DELL RAID PRIMER DELL PERC RAID CONTROLLERS. Joe H. Trickey III. Dell Storage RAID Product Marketing. John Seward. Dell Storage RAID Engineering

Memory Hierarchy. Arquitectura de Computadoras. Centro de Investigación n y de Estudios Avanzados del IPN. adiaz@cinvestav.mx. MemoryHierarchy- 1

Block diagram of typical laptop/desktop

Transcription:

Introduction to Cloud Computing Systems I 15 319, spring 2010 4 th Lecture, Jan 26 th Majd F. Sakr

Lecture Motivation Overview of a Cloud architecture Systems review ISA Memory hierarchy OS Networks Next time Impact on cloud performance 2

Intel Open Cirrus Cloud Pittsburgh

Blade Performance Consider bandwidth and latency between these layers Quad Core Processor Disk core core core core L1 L2 Quad Core Processor core core L3 core core L1 Memory L2

Cloud Performance Consider bandwidth and latency of all layers

How could these different bandwidths impact the Cloud s performance? To understand this, we need to go through a summary of the machine s components?

Single CPU Machine s Component ISA (Processor) Main Memory Disk Operating System Network

A Single CPU Computer Components Datapath Control Register File PC IR I/O Bridge Main Memory ALU Control Unit CPU I/O Bus Disk Network

The Von Neuman machine Completed 1952 Main memory storing programs and data ALU operating on binary data Control unit interpreting instructions from memory and executing Input and Output equipment operated by control unit Datapath Control Register File ALU PC IR Control Unit MM I/O System CPU

The Five Von Neumann Components Input & Output 1 2 ALU & CU 3 4 M 5

Motherboard Everything is attached to it: CPU/ memory/ monitor/ mouse/ keyboard/ add on cards/ printers/ scanners/ speakers/..etc

The Processor Datapath Register File CPU Control PC IR I/O Bridge Main Memory ALU Control Unit CPU I/O Bus Disk Network

Central Processing Unit The Brain: a functional unit that interprets and carries out instructions (does mathematical manipulation) Also called a Processor Contains tens of millions of tiny transistors Datapath Register File Control PC IR http://www.overclock.net/intel-cpus/72887-broken-cpu-pins.html ALU Control Unit

Instruction Set Architecture (ISA) Every processor has a unique set of operations (Instruction Set or Machine Instructions) Written in binary language called Machine Language Each Instruction consists of (operator & operands) Operand: data or a memory address of the data that we need to operate on Instructions Categories: Category Arithmetic Logic Program Control Data Movement I/O Example Add, subtract, multiply, divide And, or, not, exclusive or Branching, subroutines Move, load, store Read, write

Program Execution Fetch/Execute Cycle: Fetch Cycle: get instruction from memory Execute Cycle: Decode instruction, get operands, execute the operation on them Retrieve next Instruction from memory Maybe store results in memory Retrieve operands from memory Perform the operation

Synchronous Systems Each step waits for clock ticks to begin A 100 MHz processor uses a clock that ticks 100,000,000 times per second Retrieve next Instruction from memory Maybe store results in memory Cycle Speed: millionths of a second Retrieve operands from memory Perform the operation

Processor Components (1/3) Datapath Control Register File PC IR ALU Control Unit

Processor Layout

Processor Components (2/3) Control Unit Processor s Supervisor Connects and regulates the interaction between the datapath and memory. Job Steps: Retrieve instruction from Memory Decode it Break it into a sequence of actions Carries out the execution of an instruction Datapath Register File ALU Control PC IR Control Unit Program Counter (PC): has the address of the instruction to be fetched Instruction Register (IR): has the instruction most recently fetched

Processor Components (3/3) Datapath Register Files:General purpose storage locations inside the processor that hold values or addresses Arithmetic Logic Units: Set of functional units or multipliers that perform data processing (arithmetic & logical operations) Datapath Register File ALU Control PC IR Control Unit Operates using instructions provided by the control unit Comprises adders, counters, and registers

Instruction Processing Instruction Set Architecture (ISA) Design of the CPU's instruction set (set of unique operations) visible to the programmer/compiler writer the boundary between software and hardware Common Types: Stack: The operands are implicitly on top of the stack (+)/ ( )?? Accumulator: One operand is implicitly the accumulator (+)/( )?? General Purpose Register (GPR): All operands are explicitly mentioned (either registers or memory locations) (+)/( )??

ISA

Processor Memory Gap A big problem: The gap widens between DRAM, disk, and CPU speeds. 100,000,000 10,000,000 1,000,000 ns 100,000 10,000 1,000 100 10 1 0 1980 1985 1990 1995 2000 2005 Year Disk seek time DRAM access time SRAM access time CPU cycle time

Main Memory Datapath Control Register File PC IR I/O Bridge Main Memory ALU Control Unit CPU I/O Bus Disk Network

Locality Principle of Locality: Programs tend to reuse data and instructions near those they have used recently, or that were recently referenced themselves. Temporal locality: Recently referenced items are likely to be referenced in the near future. Spatial locality: Items with nearby addresses tend to be referenced close together in time. Examples: Do they have good locality? int sum_array_cols(int a[m][n]) { int i, j, sum = 0; int sum_array_rows(int a[m][n]) { int i, j, sum = 0; } for (j = 0; j < N; j++) for (i = 0; i < M; i++) sum += a[i][j]; return sum; } for (i = 0; i < M; i++) for (j = 0; j < N; j++) sum += a[i][j]; return sum;

Problem: Processor Memory Bottleneck

Solution Smaller, faster, and costlier (per byte) storage devices L2: L1: L0: registers on-chip L1 cache (SRAM) off-chip L2 cache (SRAM) CPU registers hold words retrieved from L1 cache. L1 cache holds cache lines retrieved from the L2 cache memory. L2 cache holds cache lines retrieved from main memory. Larger, slower, and cheaper (per byte) storage devices L5: L3: main memory (DRAM) How about Memory Hierarchy??? L4: local secondary storage (local disks) remote secondary storage (tapes, distributed file systems, Web servers) Main memory holds disk blocks retrieved from local disks. Local disks hold files retrieved from disks on remote network servers.

The Memory Hierarchy Smaller, faster, and costlier (per byte) storage devices L2: L1: L0: registers on-chip L1 cache (SRAM) off-chip L2 cache (SRAM) CPU registers hold words retrieved from L1 cache. L1 cache holds cache lines retrieved from the L2 cache memory. L2 cache holds cache lines retrieved from main memory. Larger, slower, and cheaper (per byte) storage devices L4: L3: main memory (DRAM) local secondary storage (local disks) Main memory holds disk blocks retrieved from local disks. Local disks hold files retrieved from disks on remote network servers. L5: remote secondary storage (tapes, distributed file systems, Web servers)

How does it work? Caches: A smaller, faster storage device that acts as a staging area for a subset of the data in a larger, slower device. Fundamental idea of a memory hierarchy: For each k, the faster, smaller device at level k serves as a cache for the larger, slower device at level k+1. Why do memory hierarchies work? Programs tend to access the data at level k more often than they access the data at level k+1. Thus, the storage at level k+1 can be slower, and thus larger and cheaper per bit.

Memory Design: Hierarchy Why can t all of our memory be of the fastest type? Size and Cost Memory Hierarchy effect: A large pool of memory that costs as much as the cheap storage near the bottom, but that serves data to programs at the rate of the fast storage near the top. Gives illusion that the processor is always retrieving data from the fastest memory level (if locality is high) To take advantage of spatial locality: When the needed data is found at level k+1: the needed data & its neighboring data is handed up to level k

Disk Datapath Control Register File PC IR I/O Bridge Main Memory ALU Control Unit CPU I/O Bus Disk Network

Disk Geometry Disks consist of platters,eachwithtwosurfaces. Each surface consists of concentric rings called tracks. Each track consists of sectors separated by gaps. Aligned tracks from a cylinder.

Disk Operation (Single Platter View) The disk surface spins at a fixed rotational rate The read/write head is attached to the end of the arm and flies over the disk surface By moving radially, the arm can position the read/write head over any track

Disk Access Time Averagetimetoaccesssometargetsectorapproximatedby: Taccess= Tavg seek + Tavg rotation + Tavg transfer Seektime (Tavg seek) Time to position heads over cylinder containing target sector. Typical Tavg seek = 9 ms Rotational latency (Tavg rotation) Time waiting for first bit of target sector to pass under r/w head. Tavg rotation = 1/2 x 1/RPMs x 60 sec/1 min Transfer time (Tavg transfer) Time to read the bits in the target sector. Tavg transfer = 1/RPM x 1/(avg # sectors/track) x 60 secs/1 min.

Logical Disk Blocks Modern disks present a simpler abstract view of the complex sector geometry: The set of available sectors is modeled as a sequence of b sized logical blocks(0, 1, 2,...) Mapping between logical blocks and actual (physical) sectors Maintained by hardware/firmware device called disk controller. Converts requests for logical blocks into (surface, track, sector) triples. Allows controller to set aside spare cylinders for each zone. Accounts for the difference in formatted capacity and maximum capacity.

I/O Bus

Reading Disk Sector (1)

Reading Disk Sector (2)

Reading Disk Sector (3)

Storage Trends

What is the Typical Bandwidth Between? L 1 & L 2? L 2 & L 3? L 3 & Main Memory? Main Memory & Disk? How can this affect the machine's performance? How can it affect the Cloud s performance?

What is the Typical Bandwidth Between Layers? Quad Core Processor Disk core core core core L1 L2 Quad Core Processor core core L3 core core L1 Memory L2 1 ns 4.2 ns 83 ns 14.7 ms

RAID: Redundant Array of Inexpensive Disks RAID 0: Striping (misnomer: non redundant) RAID 1: Mirroring RAID 2: Striping + Error Correction RAID 3: Bit striping + Parity Disk RAID 4: Block striping + Parity Disk RAID 5: Block striping + Distributed Parity RAID 6: multiple parity checks Files are "striped" across multiple spindles Redundancy yields high data availability When disks fail, contents are reconstructed from data redundantly stored in the array High reliability comes at a cost: Reduced storage capacity Lower performance

Network Datapath Control Register File PC IR I/O Bridge Main Memory ALU Control Unit CPU I/O Bus Disk Network

Internal Computer Network (1/2) Computer Bus System A bus is a collection of parallel wires that carry address, data, and control signals. CPU chip Buses are typically shared by/ Connect multiple devices. Since the 70's register file ALU system bus memory bus bus interface I/O bridge main memory

Internal Computer Network (2/2) Computer Bus System CPU chip register file I/O Bus ALU system bus memory bus bus interface I/O bridge main memory USB controller graphics adapter I/O bus disk controller Expansion slots for other devices such as network adapters. mouse keyboard monitor disk

Connection Between Computers To connect it to other computers add a Network Adaptor

Connection Between Computers Network: two or more communication devices connected together. Networks Mediums: Wired: Fiber optic, coaxial, Ethernet Wireless: air

Connection Between Computers Bandwidth: Data transmission rate Bandwidth of different Mediums: The maximum amount of information (bits/second) that can be carried along the transmission channel size of the pipe http://www.scherstad.com/bandwidth.gif Latency: time to transfer data through the pipe t1 t2- t1 t2 10111000011010111000010111010111100111000010111 pipe sharing

OSI Model Transmit Data Receive Data Application Layer Presentation Layer Session Layer Transport Layer Network Layer Datalink Layer Physical Layer Bits

Network Topologies Star Bus Ring Tree

Network Topologies Fat Tree Hypercube

How does it all work? Excel Chrome wordcount Application System Software Hardware Windows XP Linux Solaris OS X PC MAC SUN

Program Path to Execution High Level Language Program (.c file) Compiler Assembly Language Program (.asm file) Assembler Binary Machine Language Program (.exe file)

From High Level (English) to Binary (Machine) High Level Code in files p1.c Compile with command: gcc p1.c Carnegie Mellon text C program (p1.c) Compiler text Asm program (p1.s) Assembler binary binary Object program (p1.o) Linker Executable program (p1.exe) Static libraries (.a)

What is Operating System? A Program that controls the execution of application programs and acts as an interface between applications and the computer hardware. Applications Utilities (System Calls / API) OS (Kernel) Hardware

Role of the Operating System Process Control Process Scheduling Main Memory Management File System Management I/O Subsystem Management

Process Control A process is an instance of a program in execution. It s the unit of work in the OS. Processes can be executed concurrently, each needs resources (ex: CPU time, memory, files, I/O devices) to accomplish its task. For process management, the OS is responsible for: Process creation and deletion through system calls (ex: fork & exit). Process suspension and resumption through system calls (ex: wait) and signals (ex: issig). Process synchronization and process communication Invoking other programs through processes (ex: exec)

Process Control The OS kernel keeps track of the different states the process goes through: A process is created: it s loaded from a storage device (HD) into MM. Scheduler assigns state waiting to it. Process waits for the scheduler to do a context switch (so it can be assigned to be executed by a processor) When scheduler changed process context, its state becomes running, and execution starts. If the process need resources (ex: input from a file), its state become blocked. When resource is ready, process status becomes waiting until it s assigned to a processor again. Once the process execution is over, it s terminated by OS, then it s removed from MM. Source: http://en.wikipedia.org/wiki/process_(computing)

Process Scheduling Process Scheduling: is the way of determining when to run a process, assigning it to an available CPU to run on, and deciding for how long it should execute. The scheduler goals: CPU utilization Maximize throughput (processes finished / time unit) Minimize turnaround (time between process submission and its completion) Minimize waiting time (in ready queue) Minimize response time (time between request submission until the first response) Increase Fairness (in CPU time allocated) Algorithm schedule process Input: none Output: none { while( no process picked to execute) { for (every process on run queue) pick highest priority process loaded in memory; } } Scheduler Algorithm if (no process eligible to execute) idle the machine; remove chosen process from run queue; switch context to chosen process, resume its execution;

Memory Management Main Memory acts as a storage area for quickly accessible data shared by the CPU and I/O devices. During instruction fetch cycle, CPU reads instruction from MM. During datafetch cycle, CPU reads data from and writes data to MM. Many programs are kept in MM to improve CPU utilization and response time, but because MM is expensive it can not fit all processes in the system. For MM, OS is responsible for: Keeping track of which parts of memory are currently being used and by whom. Deciding which processes to load when memory space becomes available. Allocating and de allocating memory space as required by different processes.

File System Management File System: is a way of storing and organizing the files of the computer and representing the data they contain to ensure easy file search and access. For FS, the OS is responsible for: Supporting the feature of hierarchical structure. Files and Directories creation and deletion. Consistently treatment and protection of files data. Handling the dynamic growth of files. Files backup on nonvolatile storage. / Sample File System Tree fsl bin etc usr uni x dev mjb maury sh dat wh passwd src bin tty00 tty01 e o cmd date.c who.c

I/O Subsystem Management I/O subsystem allows processes to communicate with the peripheral devices such as disks, terminals, printers, and networks. The kernel modules controlling the peripheral devices are known as device drivers. The I/O subsystem consists of: A memory management component that includes buffering, caching and spooling A general device driver interface Drivers for specific hardware devices Each I/O device, requires its own set of instructions or control signals to operate. The OS provides a uniform interface that hides these details so the programmers can access such devices using simple read and write commands.,