hardware and operating systems basics.

Slides:



Advertisements
Similar presentations
1 OS Structure, Processes & Process Management. 2 Recap OS functions  Coordinator  Protection  Communication  Resource management  Service provider.
Advertisements

04/14/2008CSCI 315 Operating Systems Design1 I/O Systems Notice: The slides for this lecture have been largely based on those accompanying the textbook.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem.
1 Hardware and Software Architecture Chapter 2 n The Intel Processor Architecture n History of PC Memory Usage (Real Mode)
CSS 372 Lecture 1 Course Overview: CSS 372 Web page Syllabus Lab Ettiquette Lab Report Format Review of CSS 371: Simple Computer Architecture Traps Interrupts.
Figure 2.8 Compiler phases Compiling. Figure 2.9 Object module Linking.
Wednesday, June 07, 2006 “Unix is user friendly … it’s just picky about it’s friends”. - Anonymous.
Introduction to Kernel
I/O Hardware n Incredible variety of I/O devices n Common concepts: – Port – connection point to the computer – Bus (daisy chain or shared direct access)
04/16/2010CSCI 315 Operating Systems Design1 I/O Systems Notice: The slides for this lecture have been largely based on those accompanying an earlier edition.
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.
Figure 1.1 Interaction between applications and the operating system.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
1 DOS with Windows 3.1 and 3.11 Operating Environments n Designed to allow applications to have a graphical interface DOS runs in the background as the.
I/O Systems CSCI 444/544 Operating Systems Fall 2008.
Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access memory.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
An Introduction to Operating Systems. Definition  An Operating System, or OS, is low-level software that enables a user and higher-level application.
I/O Tanenbaum, ch. 5 p. 329 – 427 Silberschatz, ch. 13 p
Chapter 3 Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access.
Chapter 3.1:Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access.
Computer Organization
How Hardware and Software Work Together
Operating System. Architecture of Computer System Hardware Operating System (OS) Programming Language (e.g. PASCAL) Application Programs (e.g. WORD, EXCEL)
OPERATING SYSTEM OVERVIEW. Contents Basic hardware elements.
CSC 322 Operating Systems Concepts Lecture - 3: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
Input and Output Computer Organization and Assembly Language: Module 9.
Hardware Definitions –Port: Point of connection –Bus: Interface Daisy Chain (A=>B=>…=>X) Shared Direct Device Access –Controller: Device Electronics –Registers:
ITEC 502 컴퓨터 시스템 및 실습 Chapter 8-2: I/O Management (Review) Mi-Jung Choi DPNM Lab. Dept. of CSE, POSTECH.
Interrupts and DMA CSCI The Role of the Operating System in Performing I/O Two main jobs of a computer are: –Processing –Performing I/O manage and.
I/O Systems I/O Hardware Application I/O Interface
1 Lecture 20: I/O n I/O hardware n I/O structure n communication with controllers n device interrupts n device drivers n streams.
Three fundamental concepts in computer security: Reference Monitors: An access control concept that refers to an abstract machine that mediates all accesses.
How Hardware and Software Work Together
Architecture Support for OS CSCI 444/544 Operating Systems Fall 2008.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Overview of Hardware.
Section 3.1: Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random.
Computer Architecture Lecture10: Input/output devices Piotr Bilski.
Processes and Threads Processes have two characteristics: – Resource ownership - process includes a virtual address space to hold the process image – Scheduling/execution.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Chapter 13: I/O Systems. 13.2/34 Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem.
1.4 Hardware Review. CPU  Fetch-decode-execute cycle 1. Fetch 2. Bump PC 3. Decode 4. Determine operand addr (if necessary) 5. Fetch operand from memory.
Chapter 13 – I/O Systems (Pgs ). Devices  Two conflicting properties A. Growing uniformity in interfaces (both h/w and s/w): e.g., USB, TWAIN.
A+ Guide to Managing and Maintaining Your PC Fifth Edition Chapter 2 How Hardware and Software Work Together.
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.
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 12: I/O Systems I/O hardwared Application I/O Interface Kernel I/O.
Operating Systems: Summary INF1060: Introduction to Operating Systems and Data Communication.
1 Computer Architecture. 2 Basic Elements Processor Main Memory –volatile –referred to as real memory or primary memory I/O modules –secondary memory.
Von Neumann Machines. 3 The Von Neumann Architecture Model for designing and building computers, based on the following three characteristics: 1)The.
File System Department of Computer Science Southern Illinois University Edwardsville Spring, 2016 Dr. Hiroshi Fujinoki CS 314.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
CSCE451/851 Introduction to Operating Systems
Introduction to Operating Systems Concepts
OPERATING SYSTEM CONCEPT AND PRACTISE
Introduction to Kernel
Module 12: I/O Systems I/O hardware Application I/O Interface
Memory Key Revision Points.
Technology Literacy Hardware.
CSCI 315 Operating Systems Design
Multicultural Social Community Development Institute ( MSCDI)
Operating System Concepts
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Department of Computer Science
Operating Systems Structure
Chapter 1: Introduction CSS503 Systems Programming
Module 12: I/O Systems I/O hardwared Application I/O Interface
Presentation transcript:

hardware and operating systems basics

BY SA

client/workstation (PC) server (responds to requests from network) hand-held (phone, audio player) embedded system (toaster, car) mainframe (a big server) supercomputer (a many-processor system)

RAM (Random Access Memory) addressable by the CPU volatile faster than storage code and data of running programs

programming model (simplified conception of a processor for sake of programmers)

instruction (a sequence of bits understood by the processor to signal a certain action) copy bytes arithmetic bit logic jumps

register (a small memory area in a processor) status general purpose

ISA (Instruction Set Architecture) x86 (IA-32, x86-64) ARM MIPS Motorola 68k

call stack (local variables) call stack (local variables) program memory heap (everything else) heap (everything else) code

frame of main frame of cat frame of dog frame of fish frame of bird frame of lama stack space local variables argument values  top of stack

frame of moose stack space frame of main frame of cat frame of dog frame of fish frame of bird local variables argument values return address  top of stack

big-endian vs. little-endian (the order in which the bytes of a register are copied from registers to memory and vice versa)

big-endian vs. little-endian (the order in which the bytes of a register are copied from registers to memory and vice versa)

processor registers processor cache random access memory hard drives speed, cost capacity

CPU registers device read/write 

port-mapped I/O vs. memory-mapped I/O output register 2 to port 0x44 98 copy register 5 to address 0x66 2C 1A 32

ports memory addresses RAM 0x xFF FF FF FF byte 0 byte n port 0 port n devices

memory addresses RAM 0x x xFF FF FF FF 0x00 00 FF FF byte 0 byte n devices

(code periodically checks device registers to see if the device needs the CPU to do something) polling

CPU registers device interrupt line

(code periodically checks device registers to see if they need the CPU to do something) polling 1.device sends interrupt signal to CPU 2.CPU saves state of whatever it was currently doing 3.CPU jumps to address corresponding to interrupt number in the interrupt table interrupt

0x interrupt 0 0x interrupt 1 0x interrupt 2 0xA interrupt 3 0xFF interrupt 4 0xFF interrupt 5 0xFF interrupt 6 0xFF interrupt 7 ……

(code periodically checks device registers to see if they need the CPU to do something) polling 1.device sends interrupt signal to CPU 2.CPU saves state of whatever it was currently doing 3.CPU jumps to address corresponding to interrupt number in the interrupt table 4.CPU returns to whatever it was doing before the interrupt interrupt

hardware exception (a condition which causes the CPU to jump to a pre-determined address) 0x exception 0 0x exception 1 0x exception 2 0xA exception 3 0xFF exception 4 ……

Instruction Set Architecture byte size word size address size cache speeds and sizes big-endian vs. little-endian ports vs. memory-mapped i/o number of processors/cores

boot firmware CPU registers BIOS

boot firmware CPU registers BIOS

operating system (manages the hardware and running programs) load and manage processes provide “interfaces” to hardware via system calls provide a filesystem provide a basic user interface

Windows (series of OS’s from Microsoft) Windows 7 Windows Server 2008 Windows CE

Unix (a family of OS’s) Linux BSD OS X

OS device driver (plug-in to the OS to control a particular device) device driver software hardware

B B A A B B C C C C B B A A B B A A time A A B B C C B B C C A A C C C C CPU CPU 2 process OS

1.CPU receives interrupt 2.interrupt stores state of currently running code 3.interrupt invokes handler 4.interrupt handler invokes the scheduler 5.scheduler selects a process 6.scheduler “configures” CPU for that process 7.scheduler jumps execution to that process pre-emptive multitasking

Process C Process B OS Process A 0x xFF FF FF FF

stack heap code 0x x FF FF FF FF heap RAM byte 0 byte n

stack heap code 0x x FF FF FF FF heap RAM byte 0 byte n HD

Process C Process B OS Process A jump to system call code via special instruction RAM

0x system call 0 0x system call 1 0x system call 2 0xA system call 3 0xFF system call 4 0xFF system call 5 0xFF system call 6 0xFF system call 7 ……

stack code 0x x FF FF FF FF heap allocated with system call  heap allocated with system call 

stack code 0x x FF FF FF FF heap  deallocated with system call

stack code 0x x FF FF FF FF  top of stack stack boundary  heap

stack code 0x x FF FF FF FF  top of stack stack boundary  heap

created waitingrunning blocked terminated

HD partition 1 partition 2 partition 3 HD partition 4 flash drive partition 5 CD-ROM partition 6 partition 7

file 35 file 7 file 61 file 3 directory 21 directory 86 root directory

partition 1 C:H:H:D:D: C:/ H:/ D:/ partition 2 partition 3

partition 1 C:H:H:D:D: C:/adams/nixon H:/taylor/polk/hayes D:/garfield partition 2 partition 3

partition 1 /banana//lemon/apple partition 2 partition 3

partition 1 /banana//lemon/apple /banana/adams/nixon /taylor/polk/hayes /lemon/apple/garfield partition 2 partition 3

IPC (Interprocess Communication) files pipes sockets signals shared memory