Computer Fundamentals and Operating System Theory. By Neil Bloomberg Spring 2017

Similar documents
Computer Organization and Assembly Language (CS-506)

Memory classification:- Topics covered:- types,organization and working

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2017 Lecture 13

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

CS429: Computer Organization and Architecture

Chapter 2 Logic Gates and Introduction to Computer Architecture

CS429: Computer Organization and Architecture

The CPU and Memory. How does a computer work? How does a computer interact with data? How are instructions performed? Recall schematic diagram:

CREATED BY M BILAL & Arslan Ahmad Shaad Visit:

Basic Concepts COE 205. Computer Organization and Assembly Language Dr. Aiman El-Maleh

Contents. Memory System Overview Cache Memory. Internal Memory. Virtual Memory. Memory Hierarchy. Registers In CPU Internal or Main memory

SAE5C Computer Organization and Architecture. Unit : I - V

Computers in Business: Concepts in Hardware and Software

IA-32 Architecture COE 205. Computer Organization and Assembly Language. Computer Engineering Department

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422)

Summer 2003 Lecture 18 07/09/03

UNIT:4 MEMORY ORGANIZATION

RISC (Reduced Instruction Set Computer)

Announcement. Computer Architecture (CSC-3501) Lecture 20 (08 April 2008) Chapter 6 Objectives. 6.1 Introduction. 6.

Lecture 18: Memory Systems. Spring 2018 Jason Tang

Computer Organization

Chapter 5 12/2/2013. Objectives. Computer Systems Organization. Objectives. Objectives (continued) Introduction. INVITATION TO Computer Science 1

Hardware Design I Chap. 10 Design of microprocessor

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

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

Instruction Register. Instruction Decoder. Control Unit (Combinational Circuit) Control Signals (These signals go to register) The bus and the ALU

COA. Prepared By: Dhaval R. Patel Page 1. Q.1 Define MBR.

CSE 380 Computer Operating Systems

Microcomputer Architecture and Programming

What Operating Systems Do An operating system is a program hardware that manages the computer provides a basis for application programs acts as an int

Chapter 5 Internal Memory

1 PC Hardware Basics Microprocessors (A) PC Hardware Basics Fal 2004 Hadassah College Dr. Martin Land

I/O 1. Devices and I/O. key concepts device registers, device drivers, program-controlled I/O, DMA, polling, disk drives, disk head scheduling

lesson 3 Transforming Data into Information

Main Memory (RAM) Organisation

Random-Access Memory (RAM) CS429: Computer Organization and Architecture. SRAM and DRAM. Flash / RAM Summary. Storage Technologies

Chapter One. Introduction to Computer System

The Memory Component

Basic Organization Memory Cell Operation. CSCI 4717 Computer Architecture. ROM Uses. Random Access Memory. Semiconductor Memory Types

UC Santa Barbara. Operating Systems. Christopher Kruegel Department of Computer Science UC Santa Barbara

Computer Organization. 8th Edition. Chapter 5 Internal Memory

CISC / RISC. Complex / Reduced Instruction Set Computers

Chapter 9: A Closer Look at System Hardware

Chapter 9: A Closer Look at System Hardware 4

Memory Study Material

Storage Technologies and the Memory Hierarchy

Chapter 5. Large and Fast: Exploiting Memory Hierarchy

CS 33. Memory Hierarchy I. CS33 Intro to Computer Systems XVI 1 Copyright 2016 Thomas W. Doeppner. All rights reserved.

Virtual Memory. Reading. Sections 5.4, 5.5, 5.6, 5.8, 5.10 (2) Lecture notes from MKP and S. Yalamanchili

CS370 Operating Systems

Computers and Microprocessors. Lecture 34 PHYS3360/AEP3630

Memory Technology. Chapter 5. Principle of Locality. Chapter 5 Large and Fast: Exploiting Memory Hierarchy 1

Chapter 4 Main Memory

Computer Systems. Binary Representation. Binary Representation. Logical Computation: Boolean Algebra

INTRODUCTION TO INFORMATION & COMMUNICATION TECHNOLOGY (ICT) LECTURE 2 : WEEK 2 CSC-111-T

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

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

EE 3170 Microcontroller Applications

5 Computer Organization

COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. 5 th. Edition. Chapter 5. Large and Fast: Exploiting Memory Hierarchy

CS 261 Fall Mike Lam, Professor. Memory

ASSEMBLY LANGUAGE MACHINE ORGANIZATION

Lecture Objectives. Introduction to Computing Chapter 0. Topics. Numbering Systems 04/09/2017

Advanced Parallel Architecture Lesson 4 bis. Annalisa Massini /2015

Chapter 6 Objectives

CSEE 3827: Fundamentals of Computer Systems. Storage

Computer Structure. Unit 2: Memory and programmable devices

A Review of Chapter 5 and. CSc 2010 Spring 2012 Instructor: Qian Hu

Memory. Objectives. Introduction. 6.2 Types of Memory

Module 5a: Introduction To Memory System (MAIN MEMORY)

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 3, 2015

ADVANCED COMPUTER ARCHITECTURE TWO MARKS WITH ANSWERS

Memory memories memory

Four Components of a Computer System

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 2, 2016

Semiconductor Memory Types Microprocessor Design & Organisation HCA2102

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


Where Have We Been? Ch. 6 Memory Technology

8051 INTERFACING TO EXTERNAL MEMORY

Basic Computer Architecture

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

Introduction Disks RAID Tertiary storage. Mass Storage. CMSC 420, York College. November 21, 2006

Chapter 6 Storage and Other I/O Topics

Computer Organization and Structure. Bing-Yu Chen National Taiwan University

Memory Overview. Overview - Memory Types 2/17/16. Curtis Nelson Walla Walla University

! Memory Overview. ! ROM Memories. ! RAM Memory " SRAM " DRAM. ! This is done because we can build. " large, slow memories OR

Computer Science 61C Spring Friedland and Weaver. Input/Output

EE414 Embedded Systems Ch 5. Memory Part 2/2

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


Computer Systems Organization

Introduction to Computer Systems and Operating Systems

Overview. Memory Classification Read-Only Memory (ROM) Random Access Memory (RAM) Functional Behavior of RAM. Implementing Static RAM

CS370 Operating Systems

Memory Hierarchy Y. K. Malaiya

ELEC 5200/6200 Computer Architecture and Design Spring 2017 Lecture 7: Memory Organization Part II

INTEL Architectures GOPALAKRISHNAN IYER FALL 2009 ELEC : Computer Architecture and Design

M. Sc (CS) (II Semester) Examination, Subject: Computer System Architecture Paper Code: M.Sc-CS-203. Time: Three Hours] [Maximum Marks: 60

Database Management Systems, 2nd edition, Raghu Ramakrishnan, Johannes Gehrke, McGraw-Hill

Transcription:

Computer Fundamentals and Operating System Theory By Neil Bloomberg Spring 2017

INTRODUCTION This presentation will cover the fundamentals of Computer Operating Systems as a layered architecture using the basic building blocks of the hardware as a point of reference.

AGENDA Hardware Architecture Single Cycle vs Multi Cycle CPU's Operating Systems - A layered Architecture The Process Scheduler - The heart of the System Multitasking and Multi-threading Operating Systems Q & A

Bonus Material CPU Internals, lessons from the Z80 Microprocessor Disk Drive fundamentals Memory (DRAM, PROM, SRAM, etc.)

Acknowledgements etc. All Click art used in this presentation was obtained from Wikipedia unless otherwise noted. Slide Take-Away Points are designed with an Arrow and highlighted at the bottom in bold RED.

Basic Computer Model

Detailed Hardware Design Address Bus Data Bus Control Bus CPU Memory Disk I/O Devices - Keyboard/mouse - Network Address Bus Used to designate the specific device and location in which to send or receive data. Data Bus Used to transfer CPU Instructions or Data between either the CPU or a memory device. Control Bus CPU Signals used for reading/writing data between devices along with Clock and Interrupt Signaling. The CPU is used to transfer, manipulate, and manage binary data between all devices. Buses are used to convey information.

CPU Instructions 11010101 01101010 11011010 OP Code Operand A Operand B Move Move the contents between CPU Register or Memory Add Add Operation Subtract Subtract Operation Logical Logic: AND, OR, XOR, NOT Operations Shift Shift information Right or Left Rotate Circular shift data Right or Left Push Store the contents of CPU Address register Pop Retrieve the contents of the CPU Address register Test&Set Semaphore Operative All programs are converted into CPU instructions for execution.

Types of CPU s There are basically two type of Processors: Single Cycle, in which the OP Code and Operands are contained in a single Unit confined to the width of the Data Bus. The CPU performs a OP Code Fetch on the Rising Edge of the Clock and Execution takes place on the Falling Edge of the Clock. (e.g. ARM, RISC, DSP, Most Video Processors, and SPARC Chips) Multi-Cycle, in which the OP Code is retrieved by the CPU during one phase, then each Operand is retrieved in successive phases, followed by the execution of the Instruction in following phases. (e.g. X86 Processor, 68000, and most other Processors). A Phase consists of one or more Clock Cycles as illustrated in the following slide.

Basic CPU Timing Example Z80 CPU Timing Example

Contrasts Single Cycle, Speed, only one Clock Cycle per Instruction. Disadvantage: limited Instruction set. Multi-Cycle: A single instruction can take 8 to 12 clock cycles to retrieve and execute. The advantage is a large number of Instructions. However, with pipelining and caching techniques, Instruction overlap can be achieved during CPU internal processing. Single Cycle Processors are becoming more popular with Cell phone technology and may eventually replace current the current Pentium Core Processors.

Z80 Microprocessor

Putting it all together

Memory Map Addr = 0000 Boot Vector (Points to Boot Loader) Interrupt Service Vectors I/O Device Addresses Boot Loader Read-Only Memory (BIOS) Kernel Processes Mid-Layer Processes RAM > 2 GB Application Layer Processes

Operating System - Definition An operating system (OS) is system software that manages computer hardware and software resources and provides common services for computer programs.

Definitions A process consists of one or more CPU Instructions that represent a Program or Application. Non-multitasking Receives a command line, prompts for an input, processes the results and starts again. (e.g. MS DOS) Multi-Tasking Uses a Process Scheduler to execute in sequential order one or more processes continuously. This is done so quickly it gives the appearance as if they are all running at the same time. Multi-Threading Like Multi-Tasking but executes two or more processes at the same time.

Definitions Process Scheduler Responsible for running processes off of the process queue from Memory. Processes not in memory are retrieved from disk. This is called Swap. Memory Manager Responsible for ensuring processes do not overlap in memory and process/application/file memory access rights are maintained. File Manager Responsible for File System Library Structure on Disk and access rule integrity Library Application Interface (API) Low level routines used by higher level programs to perform tasks. (e.g. Drivers, print functions, display functions, sound, etc.)

Operating System - Model Layer 6 Layer 5 Layer 4 User Interface Applications And Programs Low level Libraries User Space Layer 3 - Device Drivers - File System Layer 2 Layer 1 Memory Management - Process Management -Interrupt Service Kernel Layer 0 Hardware

Memory Map Process Scheduler Process 1 Process 2 Process n > 2 GB RAM Process Queue Swap area Stack - Memory

Process Scheduler New Process IDLE RUN Next Process WAIT Nothing to Process Timer Expired SWAP Get Next Process

The Process Queue

Multi-Threading

Process Scheduler Multi Thread Master New Process IDLE New Process IDLE Nothing to Process Nothing to Process RUN Next Process WAIT RUN Next Process WAIT Timer Expired SWAP Get Next Process Timer Expired SWAP Get Next Process In a Multi-threaded Operating System there needs to be one Master responsible for keeping track of all threads or processes.

The SETI Example Perhaps the largest and most famous Multi-Threaded Operating System in the World is the Search for Extraterrestrial Intelligence (SETI) System. A huge Radio Telescope farm collects large chunks of information and then farms it out to regular computers to process and then report the results back to the master System.

Summary The CPU is used to transfer, manipulate, and manage binary data between all devices. Buses are used to convey information. All programs/applications are converted into CPU instructions for execution by the CPU. In a Multi-Tasking Operating System, processes are run for a brief period of time sequentially. This is done so quickly that it gives the appearance that they are all running at the same time. In Multi-threaded Operating System there needs to be one Master responsible for keeping track of all threads or processes. Understanding how the hardware and operating system work together can help you streamline and improve computer performance. (e.g. reducing unneeded processes, can speed up computer boot time and overall system speed)

Q & A?????

Bonus Section

Disk Drives

Layout Typically a 7200 rpm Disk Drive Access time without Cache is approximately 15 milliseconds. With Cache this time is reduced to Microseconds. Solid State Drive access times are in the 10-100 nanosecond range.

Disk Access The Disk Head Moves to the proper Track (~5 ms). The Disk Platter rotates to the proper Sector. This can take 15 Milliseconds. Data from the Sector is then serial streamed from the Sector and checked for errors using Error Correction Code (ECC) technology. A file consists of one or more sectors of data and may be randomly placed on the drive. Excessive files split up by non-continuous Sectors is called Fragmentation.

Detailed Layout A Segment is also another name for a Track. Track 0, typically contains boot and library information, hence it is typically certified to be free of defects.

Disk Sector Formats

Memory Non-Volatile Memory ROM Read Only, write once only (fast) Flash Read Only, Electrically writeable (slow to write) Volatile Memory Cache RAM High Speed RAM, typically embedded into CPU Chips (1 nanosecond or less) Static RAM Fast but expensive (10 or so nanoseconds) DRAM (Dynamic RAM) Not Fast, but relatively Inexpensive. Uses Row/Column Addressing with Refresh (10-50 nanoseconds)

Future Topics Computer Network Basics Digital Logic Basics Basic Electronics Operating Systems Overview of UNIX Fundamentals of Programming

Backup Slides

Basic Building Blocks of All Things S-R Flip Flop Clear Input Output Clock D - Flip Flop The basic building blocks of combinational logic circuits are gates. In particular, AND, OR, and NOT gates, however, there are also, XOR, NAND, NOR, XNOR gates too. The basic building blocks of sequential logic circuits are flip flops. Flip flops are devices that use a clock. Each flip flop can store one bit. All gates are implemented within an integrated circuit chip in the form of transistors, diodes, and resistors as illustrated on the far left.

CPU- Memory Read/Write Cycle

Zilog Z80 Internal Architecture

Intel 8080 Internal Architecture

Beowulf O.S. A Beowulf cluster is a computer cluster of what are normally identical, commodity-grade computers networked into a small local area network with libraries and programs installed which allow processing to be shared among them. The result is a high-performance parallel computing cluster from inexpensive personal computer hardware. The name Beowulf originally referred to a specific computer built in 1994 by Thomas Sterling and Donald Becker at NASA. The name "Beowulf" comes from the Old English epic poem of the same name. Source: Wikipedia