Chapter 1 – Computer Systems. BYU CS 345OS Overview (Chapter 1)2 CS 345 Stalling’s Chapter#Project 1: Computer System Overview 2: Operating System Overview.

Slides:



Advertisements
Similar presentations
Computer Organization and Architecture
Advertisements

Computer System Overview
Chapter 1 Computer System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
1 Lecture 2: Review of Computer Organization Operating System Spring 2007.
1: Operating Systems Overview
Computer System Overview
1 Computer System Overview OS-1 Course AA
1 Process Description and Control Chapter 3. 2 Process Management—Fundamental task of an OS The OS is responsible for: Allocation of resources to processes.
1 CSIT431 Introduction to Operating Systems Welcome to CSIT431 Introduction to Operating Systems In this course we learn about the design and structure.
Computer System Overview
Advanced OS Chapter 3p2 Sections 3.4 / 3.5. Interrupts These enable software to respond to signals from hardware. The set of instructions to be executed.
Adapted from slides ©2005 Silberschatz, Galvin, and Gagne and Stallings Lecture 2: Computer Systems Overview.
Figure 1.1 Interaction between applications and the operating system.
Modified from Silberschatz, Galvin and Gagne ©2009 CS 446/646 Principles of Operating Systems Lecture 1 Chapter 1: Introduction.
Operating Systems CS208. What is Operating System? It is a program. It is the first piece of software to run after the system boots. It coordinates the.
Operating Systems Béat Hirsbrunner Main Reference: William Stallings, Operating Systems: Internals and Design Principles, 6 th Edition, Prentice Hall 2009.
Computer System Overview Chapter 1. Basic computer structure CPU Memory memory bus I/O bus diskNet interface.
CS 345 Stalling’s Chapter # Project 1: Computer System Overview
OS and the Computer System  Some OS programs exist permanently in the system area of the memory to monitor and control activities in the computer system.
Chapter 2 The OS, the Computer, and User Programs Copyright © 2008.
1 Computer System Overview Chapter 1 Review of basic hardware concepts.
1 Computer System Overview Let’s figure out what’s inside this thing...
General System Architecture and I/O.  I/O devices and the CPU can execute concurrently.  Each device controller is in charge of a particular device.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 1: Introduction.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 1: Introduction.
Computer System Architectures Computer System Software
Chapter 4 Threads, SMP, and Microkernels Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E.
Chapter 1 Computer System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
Computer Systems Overview. Page 2 W. Stallings: Operating Systems: Internals and Design, ©2001 Operating System Exploits the hardware resources of one.
1 Computer System Overview Chapter 1. 2 n An Operating System makes the computing power available to users by controlling the hardware n Let us review.
Computer System Overview Chapter 1. Operating System Exploits the hardware resources of one or more processors Provides a set of services to system users.
Chapter 1 Computer System Overview Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William.
CHAPTER 2: COMPUTER-SYSTEM STRUCTURES Computer system operation Computer system operation I/O structure I/O structure Storage structure Storage structure.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Operating Systems and Networks AE4B33OSS Introduction.
Operating Systems Lecture 02: Computer System Overview Anda Iamnitchi
Ihr Logo Operating Systems Internals & Design Principles Fifth Edition William Stallings Chapter 1 Computer System Overview.
Processes and Threads Processes have two characteristics: – Resource ownership - process includes a virtual address space to hold the process image – Scheduling/execution.
Operating System Isfahan University of Technology Note: most of the slides used in this course are derived from those of the textbook (see slide 4)
1 CS.217 Operating System By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 2 Computer-System Structures Slide 1 Chapter 2 Computer-System Structures.
Concurrency, Processes, and System calls Benefits and issues of concurrency The basic concept of process System calls.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 4 Computer Systems Review.
Silberschatz, Galvin and Gagne  Applied Operating System Concepts Chapter 2: Computer-System Structures Computer System Architecture and Operation.
Processor Structure and Function Chapter8:. CPU Structure  CPU must:  Fetch instructions –Read instruction from memory  Interpret instructions –Instruction.
Lecture 1: Review of Computer Organization
1 Lecture 1: Computer System Structures We go over the aspects of computer architecture relevant to OS design  overview  input and output (I/O) organization.
CS 345 Computer System Overview
Review of Computer System Organization. Computer Startup For a computer to start running when it is first powered up, it needs to execute an initial program.
1 Process Description and Control Chapter 3. 2 Process A program in execution An instance of a program running on a computer The entity that can be assigned.
CSC 360- Instructor: K. Wu Review of Computer Organization.
1 Computer Architecture. 2 Basic Elements Processor Main Memory –volatile –referred to as real memory or primary memory I/O modules –secondary memory.
Chapter 11 System Performance Enhancement. Basic Operation of a Computer l Program is loaded into memory l Instruction is fetched from memory l Operands.
Chapter 1 Computer System Overview Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
Computer Systems Overview. Lecture 1/Page 2AE4B33OSS W. Stallings: Operating Systems: Internals and Design, ©2001 Operating System Exploits the hardware.
1 Computer System Overview Chapter 1. 2 Operating System Exploits the hardware resources of one or more processors Provides a set of services to system.
Introduction to Operating Systems Concepts
Computer System Overview
Chapter 1 Computer System Overview
Chapter 1: Introduction
Computer System Overview
Interrupt handling Explain how interrupts are used to obtain processor time and how processing of interrupted jobs may later be resumed, (typical.
Computer System Overview
Chapter 1 Computer System Overview
Computer System Overview
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment. Phone:
Operating System Overview
Chapter 1: Introduction CSS503 Systems Programming
Presentation transcript:

Chapter 1 – Computer Systems

BYU CS 345OS Overview (Chapter 1)2 CS 345 Stalling’s Chapter#Project 1: Computer System Overview 2: Operating System Overview 4P1: Shell 3: Process Description and Control 4: Threads 4P2: Tasking 5: Concurrency: ME and Synchronization 6: Concurrency: Deadlock and Starvation 6P3: Jurassic Park 7: Memory Management 8: Virtual memory 6P4: Virtual Memory 9: Uniprocessor Scheduling 10: Multiprocessor and Real-Time Scheduling 6P5: Scheduling 11: I/O Management and Disk Scheduling 12: File Management 8P6: FAT Student Presentations6

Learning Objectives Describe the basic elements of a computer system and their interrelationship. Explain the steps taken by a processor to execute an instruction. Understand the concept of interrupts and how and why a processor uses interrupts List and describe the levels of a typical computer memory hierarchy. Explain the basic characteristics of multiprocessor and multicore organization. Discuss the concept of locality and analyze the performance of a multilevel memory hierarchy. Understand the operation of a stack and its use to support procedure call and return. BYU CS 345OS Overview (Chapter 1)3

Quiz: Define the following terms Kernel BYU CS 345OS Overview (Chapter 1)4 Systems program Applications program Middleware Firmware Bootstrap program Daemon Device driver Asymmetric multiprocessing Symmetric multiprocessing

Operating System Tradeoffs Convenience vs efficiency Ease of use vs maximum resource utilization Interactive user interface vs no user view Asymmetric vs symmetric processing Single-processor vs multiprocessor systems Unicore vs multicore systems UMA vs NUMA Batch vs time sharing Logical vs physical memory Dual mode vs multimode BYU CS 345OS Overview (Chapter 1)5

Learning Objectives Describe the basic elements of a computer system and their interrelationship. Explain the steps taken by a processor to execute an instruction. Understand the concept of interrupts and how and why a processor uses interrupts List and describe the levels of a typical computer memory hierarchy. Explain the basic characteristics of multiprocessor and multicore organization. Discuss the concept of locality and analyze the performance of a multilevel memory hierarchy. Understand the operation of a stack and its use to support procedure call and return. BYU CS 345OS Overview (Chapter 1)6

BYU CS 345OS Overview (Chapter 1)7 Processor Registers User-visible registers May be referenced by machine language Available to all programs - application programs and system programs Data Registers – can be changed by user Address Registers – could be separate from data register Stack Registers – user / supervisor stacks Condition Codes – results of operations Control and status registers May or may not be visible Program Counter (PC) – address of next instruction Instruction Register (IR) – most recently fetched instruction MAR/MBR – memory reference registers Program Status Word (PSW) – condition codes, interrupts, mode Registers

BYU CS 345OS Overview (Chapter 1)8 CPU Registers

BYU CS 345OS Overview (Chapter 1)9 Instruction Execution Registers

BYU CS 345OS Overview (Chapter 1)10 Instruction Execution Registers

Learning Objectives Describe the basic elements of a computer system and their interrelationship. Explain the steps taken by a processor to execute an instruction. Understand the concept of interrupts and how and why a processor uses interrupts List and describe the levels of a typical computer memory hierarchy. Explain the basic characteristics of multiprocessor and multicore organization. Discuss the concept of locality and analyze the performance of a multilevel memory hierarchy. Understand the operation of a stack and its use to support procedure call and return. BYU CS 345OS Overview (Chapter 1)11

Main Routine (synchronous) Interrupt Service Routines BYU CS 345OS Overview (Chapter 1)12 Interrupt Service Routine Interrupt Interrupt Service Routine (asynchronous) Main Routine (synchronous) Interrupt Service Routine (asynchronous) Main Routine (synchronous) Interrupt Service Routine (asynchronous) Main Routine (synchronous)

BYU CS 345OS Overview (Chapter 1)13 Interrupts The interrupt was the principle tool available to system programmers in developing multi-tasking systems! Classes of Interrupts Program: arithmetic overflow, division by zero Execute illegal instruction Reference outside user’s memory space I/O: Timer, DMA Hardware failure Interrupt control Disable during ISR Enable upon exiting Allow Interrupts? Priorities?

Learning Objectives Describe the basic elements of a computer system and their interrelationship. Explain the steps taken by a processor to execute an instruction. Understand the concept of interrupts and how and why a processor uses interrupts List and describe the levels of a typical computer memory hierarchy. Explain the basic characteristics of multiprocessor and multicore organization. Discuss the concept of locality and analyze the performance of a multilevel memory hierarchy. Understand the operation of a stack and its use to support procedure call and return. BYU CS 345OS Overview (Chapter 1)14

Storage Performance BYU CS 345OS Overview (Chapter 1)15 Level1 Name Registers Typical Size < 1KB Implementation Technology Custom memory w/multiple ports CMOS Access time (ns) Bandwidth (MB/sec) 20, ,000 Managed by Compiler Backed by Cache

Storage Performance BYU CS 345OS Overview (Chapter 1)16 Level12 Name RegistersCache Typical Size < 1KB< 16MB Implementation Technology Custom memory w/multiple ports CMOS On-chip CMOS RAM Access time (ns) Bandwidth (MB/sec) 20, ,000 5, ,000 Managed by CompilerHardware Backed by CacheMain

Storage Performance BYU CS 345OS Overview (Chapter 1)17 Level123 Name RegistersCache Main memory Typical Size < 1KB< 16MB<64GB Implementation Technology Custom memory w/multiple ports CMOS On-chip CMOS RAM CMOS SRAM Access time (ns) Bandwidth (MB/sec) 20, ,000 5, ,000 1,000- 5,000 Managed by CompilerHardwareOS Backed by CacheMainDisk

Storage Performance BYU CS 345OS Overview (Chapter 1)18 Level1234 Name RegistersCache Main memory Solid state disk Typical Size < 1KB< 16MB<64GB<1TB Implementation Technology Custom memory w/multiple ports CMOS On-chip CMOS RAM CMOS SRAM Flash Access time (ns) , ,000 Bandwidth (MB/sec) 20, ,000 5, ,000 1,000- 5, Managed by CompilerHardwareOS Backed by CacheMainDisk

Storage Performance BYU CS 345OS Overview (Chapter 1)19 Level12345 Name RegistersCache Main memory Solid state disk Hard disk Typical Size < 1KB< 16MB<64GB<1TB<10TB Implementation Technology Custom memory w/multiple ports CMOS On-chip CMOS RAM CMOS SRAM FlashHard disk Access time (ns) , ,000 5,000,000 Bandwidth (MB/sec) 20, ,000 5, ,000 1,000- 5, Managed by CompilerHardwareOS Backed by CacheMainDisk Disk or tape

Learning Objectives Describe the basic elements of a computer system and their interrelationship. Explain the steps taken by a processor to execute an instruction. Understand the concept of interrupts and how and why a processor uses interrupts List and describe the levels of a typical computer memory hierarchy. Explain the basic characteristics of multiprocessor and multicore organization. Discuss the concept of locality and analyze the performance of a multilevel memory hierarchy. Understand the operation of a stack and its use to support procedure call and return. BYU CS 345OS Overview (Chapter 1)20

Cluster computing Loosely coupled - network Client / server environment Middleware DME, RPC Multi (processor/core) Traditionally, the computer has been viewed as a sequential machine. Multiple control signals Pipelining BYU CS 345OS Overview (Chapter 1)21 Parallelism Symmetric Multiprocessors (SMP) 2 or more identical processors that share resources Integrated OS to control jobs, tasks, files, data elements… High degree of interaction/cooperation between processes Multicore Computers Single piece of silicon (die) Independent processors + levels of cache Intel Core i7 Prefetching

Learning Objectives Describe the basic elements of a computer system and their interrelationship. Explain the steps taken by a processor to execute an instruction. Understand the concept of interrupts and how and why a processor uses interrupts List and describe the levels of a typical computer memory hierarchy. Explain the basic characteristics of multiprocessor and multicore organization. Discuss the concept of locality and analyze the performance of a multilevel memory hierarchy. Understand the operation of a stack and its use to support procedure call and return. BYU CS 345OS Overview (Chapter 1)22

Given: Processor speed is faster than memory speed Execution/data localizes Processor Cache: Contains a portion of main memory Invisible to operating system Used similar to virtual memory Increases the speed of memory Processor first checks cache - If not found in cache, the block of memory containing the needed information is moved to the cache Disk cache, I/O cache, VM cache,… BYU CS 345OS Overview (Chapter 1)23

Two-Level Memory Locality Spatial locality – clustered access Large cache Pre-fetch Temporal locality – recent/repeated access Cache Least Recently Used (LRU) Cache hierarchy BYU CS 345OS Overview (Chapter 1)24

Learning Objectives Describe the basic elements of a computer system and their interrelationship. Explain the steps taken by a processor to execute an instruction. Understand the concept of interrupts and how and why a processor uses interrupts List and describe the levels of a typical computer memory hierarchy. Explain the basic characteristics of multiprocessor and multicore organization. Discuss the concept of locality and analyze the performance of a multilevel memory hierarchy. Understand the operation of a stack and its use to support procedure call and return. BYU CS 345OS Overview (Chapter 1)25

The Call / Return Mechanism BYU CS 345OS Overview (Chapter 1)26 Subroutines Smaller programs. Easier to maintain. Reduces development costs. Increased reliability. Fewer bugs do to copying code. More library friendly. Faster programs. Less overhead.

BYU CS 345OS Overview (Chapter 1)27

Summary…

BYU CS 345OS Overview (Chapter 1)29 What is an O.S.? Not always a clear definition as to what constitutes an O.S. and what is an application CD-Rom Driver Scandisk Internet Explorer Intermediary between the hardware and the users Allocate resources (CPU, Memory, disk space, etc.) between programs and users efficiently Allow the user to conveniently access data and programs Protect the system from incorrect or malicious programs and users Summary

BYU CS 345OS Overview (Chapter 1)30 Hardware Review Elements of a system: · Processor Registers (address, data, control) Instruction cycle (fetch, decode, execute) Interrupts Usually includes hardware and special instructions to help the O.S. manage memory, devices, etc. · Memory Different levels (cache, main memory, disk) Operating system will generally manage memory (both RAM and disk), and move data back and forth as required · I/O Usually use Interrupts, DMA Operating system usually controls use of I/O devices Summary

BYU CS 345OS Overview (Chapter 1)31 Registers Used for frequently accessed items User-Visible registers – Available to the programmer and compiler Data Registers Address Registers (Index, Segment, Stack Pointer) Condition code/flags Control and Status registers – Used to control the processor Program Counter/Instruction Pointer Memory address/data Processor Status Word Debugging registers Temp registers Memory Management registers Summary

BYU CS 345OS Overview (Chapter 1)32 Interrupts Allow I/O devices to get the CPUs attention at regular intervals (Program, Timer, I/O, Hardware failure) Helps the O.S. by reducing the time spent monitoring I/O devices CPU checks for interrupts after each instruction, starts the handler if needed May allow nested interrupts I/O techniques Programmed I/O Interrupt-Driven I/O Direct Memory Access Summary

BYU CS 345OS Overview (Chapter 1)33 Interrupts and I/O Handling and Interrupts: Figure 1.10 (pg 23) Device sends interrupt request to CPU CPU finishes current instruction CPU acknowledges request CPU saves PC and PSW CPU loads PC with the address of the first instruction in the interrupt handler (may get help from interrupt request) Interrupt handler starts, often saves other CPU registers and key values Interrupt handler responds to the device Interrupt handler restores CPU registers and key values CPU restores PC and PSW and resumes previous program Summary

BYU CS 345OS Overview (Chapter 1)34 Memory Varying types of memory Registers, Cache, RAM, Disk, CD Vary in speed, size, cost CPU and O.S. try to keep frequently used data in faster memory Cache – Use a small high-speed memory to improve the apparent speed of a larger low-speed memory Keep track of what is currently being used, load into high-speed memory Replacement Algorithm – What do we get rid of when we run out of memory? Write Policy – How do we respond to modifications? Summary

BYU CS 345OS Overview (Chapter 1)35