CS 478: Microcontroller Systems University of Wisconsin-Eau Claire Dan Ernst Advantages of Operating Systems vs. Raw Hardware Raw HardwareOperating System.

Slides:



Advertisements
Similar presentations
Computer Architecture
Advertisements

CS4315A. Berrached:CMS:UHD1 Operating Systems and Computer Organization Chapter 4.
Computer System Overview
Lecture 19 Page 1 CS 111 Online Protecting Operating Systems Resources How do we use these various tools to protect actual OS resources? Memory? Files?
1/1/ / faculty of Electrical Engineering eindhoven university of technology Introduction Part 3: Input/output and co-processors dr.ir. A.C. Verschueren.
Basic Input Output System
Chapter 6 Limited Direct Execution
CMPT 300: Operating Systems I Dr. Mohamed Hefeeda
COMP3221: Microprocessors and Embedded Systems Lecture 15: Interrupts I Lecturer: Hui Wu Session 1, 2005.
OS Fall ’ 02 Introduction Operating Systems Fall 2002.
Architectural Support for Operating Systems. Announcements Most office hours are finalized Assignments up every Wednesday, due next week CS 415 section.
Chapter 13 Embedded Systems
OS Spring’03 Introduction Operating Systems Spring 2003.
Chapter 7 Interupts DMA Channels Context Switching.
1 Operating Systems Ch An Overview. Architecture of Computer Hardware and Systems Software Irv Englander, John Wiley, Bare Bones Computer.
Threads CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
OS Spring’04 Introduction Operating Systems Spring 2004.
Operating System Organization
Chapter 6 - Implementing Processes, Threads and Resources Kris Hansen Shelby Davis Jeffery Brass 3/7/05 & 3/9/05 Kris Hansen Shelby Davis Jeffery Brass.
Copyright Arshi Khan1 System Programming Instructor Arshi Khan.
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.
I/O Tanenbaum, ch. 5 p. 329 – 427 Silberschatz, ch. 13 p
Chapter 3 Operating Systems Introduction to CS 1 st Semester, 2015 Sanghyun Park.
hardware and operating systems basics.
How Hardware and Software Work Together
System Calls 1.
Computer Maintenance Unit Subtitle: Basic Input/Output System (BIOS) Excerpted from 1 Copyright © Texas Education Agency, All.
Protection and the Kernel: Mode, Space, and Context.
A Definitive View Of Components by RobRenfrew. . The following information has been obtained from and is being used for educational.
Cpr E 308 Input/Output Recall: OS must abstract out all the details of specific I/O devices Today –Block and Character Devices –Hardware Issues – Programmed.
ITEC 502 컴퓨터 시스템 및 실습 Chapter 8-1: I/O Management Mi-Jung Choi DPNM Lab. Dept. of CSE, POSTECH.
Three fundamental concepts in computer security: Reference Monitors: An access control concept that refers to an abstract machine that mediates all accesses.
Architecture Support for OS CSCI 444/544 Operating Systems Fall 2008.
1-1 Embedded Network Interface (ENI) API Concepts Shared RAM vs. FIFO modes ENI API’s.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto OS-Related Hardware.
Operating Systems Lecture 7 OS Potpourri Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing Liu School of Software.
NT Kernel CS Spring Overview Interrupts and Exceptions: Trap Handler Interrupt Request Levels and IRT DPC’s, and APC’s System Service Dispatching.
Operating Systems Lecture November 2015© Copyright Virtual University of Pakistan 2 Agenda for Today Review of previous lecture Hardware (I/O, memory,
© 2004, D. J. Foreman 1 Computer Organization. © 2004, D. J. Foreman 2 Basic Architecture Review  Von Neumann ■ Distinct single-ALU & single-Control.
Processes Introduction to Operating Systems: Module 3.
OPERATING SYSTEM - program that is loaded into the computer and coordinates all the activities among computer hardware devices. -controls the hardware.
Interrupt driven I/O. MIPS RISC Exception Mechanism The processor operates in The processor operates in user mode user mode kernel mode kernel mode Access.
Operating Systems 1 K. Salah Module 1.2: Fundamental Concepts Interrupts System Calls.
System Components ● There are three main protected modules of the System  The Hardware Abstraction Layer ● A virtual machine to configure all devices.
Interrupt driven I/O Computer Organization and Assembly Language: Module 12.
Device Driver Concepts Digital UNIX Internals II Device Driver Concepts Chapter 13.
CS4315A. Berrached:CMS:UHD1 Operating Systems and Computer Organization Chapter 4.
Computer Maintenance I
1 Operating System Software What, Where, Why, and How? Startup routines ROM BIOS POST Device Drivers User Interface – Text or GUI Menus and dialog boxes.
Chapter 6 Limited Direct Execution Chien-Chung Shen CIS/UD
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Of Privilege, Traps, Interrupts & Exceptions Prof. Sirer CS 316 Cornell University.
Introduction to Operating Systems Concepts
Limited Direct Execution
CS 6560: Operating Systems Design
Session 3 Memory Management
Computer Maintenance Unit Subtitle: Basic Input/Output System (BIOS)
Introduction to Operating System
Introduction to Operating System (OS)
KERNEL ARCHITECTURE.
Lecture Topics: 11/1 General Operating System Concepts Processes
Operating Systems Lecture 3.
CSE 451: Operating Systems Autumn 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 596 Allen Center 1.
CSE 451: Operating Systems Autumn 2001 Lecture 2 Architectural Support for Operating Systems Brian Bershad 310 Sieg Hall 1.
Operating System Introduction.
CSE 451: Operating Systems Winter 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 412 Sieg Hall 1.
COMP3221: Microprocessors and Embedded Systems
Operating Systems Structure
In Today’s Class.. General Kernel Responsibilities Kernel Organization
CS Introduction to Operating Systems
Presentation transcript:

CS 478: Microcontroller Systems University of Wisconsin-Eau Claire Dan Ernst Advantages of Operating Systems vs. Raw Hardware Raw HardwareOperating System Fast software (no overhead) Simpler development for 1-trick systems Better development environment (API) Stability guarantees Multitasking support Do you need an OS? Only if you need a flexible environment

CS 478: Microcontroller Systems University of Wisconsin-Eau Claire Dan Ernst The 3 Roles of an OS Process Management – Control what tasks happen when and in what order/priority Memory Management – Allocate memory resources to processes – Protect processes from one accessing each others’ memory spaces. I/O (Device) Management –Provide an API for device interaction – Protect devices from misuse (abstraction barrier!) – Arbitrate between processes who would like to use a device

CS 478: Microcontroller Systems University of Wisconsin-Eau Claire Dan Ernst Device Drivers Part of the OS or integrated with the OS (from a 3 rd party/manufacturer) –In raw hardware systems, a function library for HW support is ~= a device driver Provide the interface between the HW device and the user software. Usually implemented through a series of system calls –Software-triggered interrupt which the OS handles –Function often based upon register states when the call happened

CS 478: Microcontroller Systems University of Wisconsin-Eau Claire Dan Ernst Components of Drivers A typical device driver will contain at least a subset of these functions: –Install (someone plugged it into the system – think USB) –Uninstall (removed) –Enable (give a device power/ set it up) –Disable –Acquire (acquire permission to use the device – for process protection) –Release (relinquish control of the device) –Read –Write –Startup (on boot-up) –Shutdown (on shut-down) These functions, besides manipulating data and devices, also move the device between 3 (normally) different states: Inactive – Busy – Idle(Finished)

CS 478: Microcontroller Systems University of Wisconsin-Eau Claire Dan Ernst The Boot Process “Bootstrap” is the method by which a system brings itself up from reset/power on to a normal running state Some tasks to consider for this sequence (not ordered): –Self-diagnostics –Initializing registers –Initializing MMRs (clocks, power settings, memory map, bus settings) –Setting up ABI standards (starting the stack/heap, etc) –Enabling/Configuring interrupts –Move programs into memory –Transfer control to a program (main())

CS 478: Microcontroller Systems University of Wisconsin-Eau Claire Dan Ernst CodeWarrior/MPC 555 Boot Process Our CodeWarrior projects implement a configurable boot process. You can find the code for it in these files: eppc_exception.asm MPC555CME_init.c __ppc_eabi_init.c __start.c – Not in project – located in: C:\Program Files\Freescale\CodeWarrior EPPC 5xx V8.7\PowerPC_EABI_Support\Runtime\src (numbers used to denote which file functions are in on next slide) (4) (3) (2) (1)

CS 478: Microcontroller Systems University of Wisconsin-Eau Claire Dan Ernst CodeWarrior/MPC 555 Boot Process 1.Reset Interrupt starts everything 2.Interrupt handler table calls __reset() function 3._reset() enables machine check exceptions (for sanity) and calls _start() Note that everything is using nofralloc – there’s no stack yet! 4._start() calls _init_registers() to set up SP and other EABI reserved regs 5._start() calls _init_hardware() 6._init_hardware() takes care of some special cases and calls usr_init() 7.usr_init() is where the developer can configure the machine MMR setup that will be used at boot time. Sets up clock, power, interrupts, and most importantly, the memory controller. 8._start() allocates the stack base and the heaps 9._start() calls main () 10.main() returns, leading to an exit()-type routine (1) (2) (3) (4) (1) (4)