Embedded Operating Systems. Unit I and Unit II

Similar documents
MLR INSTITUTE OF TECHNOLOGY DUNDIGAL , HYDERABAD QUESTION BANK

OPERATING SYSTEM CONCEPTS UNDERSTAND!!! IMPLEMENT!!! ANALYZE!!!

Embedded System Curriculum

REAL TIME OPERATING SYSTEM PROGRAMMING-I: VxWorks

ECE 471 Embedded Systems Lecture 2

ECE 471 Embedded Systems Lecture 2

EEM870 Embedded System and Experiment Lecture 3: ARM Processor Architecture

Main Points of the Computer Organization and System Software Module

ECE 471 Embedded Systems Lecture 3

Commercial Real-time Operating Systems An Introduction. Swaminathan Sivasubramanian Dependable Computing & Networking Laboratory

ARM Processors for Embedded Applications

Lecture notes Lectures 1 through 5 (up through lecture 5 slide 63) Book Chapters 1-4

EMBEDDED SYSTEMS PART A UNIT-1

Real-Time Programming

Beaglebone green User Manual

EE 354 Fall 2015 Lecture 1 Architecture and Introduction

Migrating to Cortex-M3 Microcontrollers: an RTOS Perspective

ARM Cortex-M4 Architecture and Instruction Set 1: Architecture Overview

Part B Questions. Unit I

Short Term Courses (Including Project Work)

UNIT I [INTRODUCTION TO EMBEDDED COMPUTING AND ARM PROCESSORS] PART A

Copyright 2016 Xilinx

Zilog Real-Time Kernel

Lesson 5: Software for embedding in System- Part 2

ARM Cortex core microcontrollers 3. Cortex-M0, M4, M7

Hercules ARM Cortex -R4 System Architecture. Processor Overview

Tasks. Task Implementation and management

Introduction to Sitara AM437x Processors

EC EMBEDDED AND REAL TIME SYSTEMS

Final Exam Study Guide

Lecture Topics. Announcements. Today: Operating System Overview (Stallings, chapter , ) Next: Processes (Stallings, chapter

systems such as Linux (real time application interface Linux included). The unified 32-

Embedded Systems. 5. Operating Systems. Lothar Thiele. Computer Engineering and Networks Laboratory

Chapter 4. Enhancing ARM7 architecture by embedding RTOS

December 1, 2015 Jason Kridner

ARM Cortex-A9 ARM v7-a. A programmer s perspective Part1

Four Components of a Computer System

About EmbeddedCraft. Embedded System Information Portal, regularly publishes. Follow us on

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING UNIT-1

What s An OS? Cyclic Executive. Interrupts. Advantages Simple implementation Low overhead Very predictable

Module 12: I/O Systems

Contents of this presentation: Some words about the ARM company

Course Introduction. Purpose: Objectives: Content: Learning Time:

CS307 Operating Systems Introduction Fan Wu

CSE 153 Design of Operating Systems

Product Technical Brief S3C2413 Rev 2.2, Apr. 2006

DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING EE6602- EMBEDDED SYSTEMS QUESTION BANK UNIT I - INTRODUCTION TO EMBEDDED SYSTEMS PART A

OS Design Approaches. Roadmap. OS Design Approaches. Tevfik Koşar. Operating System Design and Implementation

Efficiency and memory footprint of Xilkernel for the Microblaze soft processor

PRU Hardware Overview. Building Blocks for PRU Development: Module 1

Software Development & Education Center

(MCQZ-CS604 Operating Systems)

November 3, 2015 Jason Kridner

Stellaris Robotic Evaluation Board and Micriµm µc/os-iii

The control of I/O devices is a major concern for OS designers

VALLIAMMAI ENGINEERING COLLEGE

AT-501 Cortex-A5 System On Module Product Brief

CSI3131 Final Exam Review

IT2A4 EMBEDDED SYSTEMS

Hi Hsiao-Lung Chan, Ph.D. Dept Electrical Engineering Chang Gung University, Taiwan

GUJARAT TECHNOLOGICAL UNIVERSITY

Universität Dortmund. ARM Architecture

Embedded Systems. 6. Real-Time Operating Systems

Subject: Operating System (BTCOC403) Class: S.Y.B.Tech. (Computer Engineering)

ECE 471 Embedded Systems Lecture 2

EECS 571 Principles of Real-Time Embedded Systems. Lecture Note #10: More on Scheduling and Introduction of Real-Time OS

Chapter 19: Real-Time Systems. Operating System Concepts 8 th Edition,

EMBEDDED SYSTEMS READY TO USE LECTURE MATERIALS FOR UNDERGRADUATES

MYC-C437X CPU Module

CS 571 Operating Systems. Midterm Review. Angelos Stavrou, George Mason University

Embedded Systems: OS

CSE 237A Middleware and Operating Systems. Tajana Simunic Rosing Department of Computer Science and Engineering University of California, San Diego.

Real-Time & Embedded Operating Systems

«Real Time Embedded systems» Multi Masters Systems

Device-Functionality Progression

Chapter 12: I/O Systems. I/O Hardware

Chapter 13: I/O Systems

ZiLOG Real-Time Kernel Version 1.2.0

Product Technical Brief S3C2412 Rev 2.2, Apr. 2006

Embedded Systems: OS. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

OVERVIEW. Last Week: But if frequency of high priority task increases temporarily, system may encounter overload: Today: Slide 1. Slide 3.

Software Development & Education Center

CSC Operating Systems Fall Lecture - II OS Structures. Tevfik Ko!ar. Louisiana State University. August 27 th, 2009.

Announcements. Computer System Organization. Roadmap. Major OS Components. Processes. Tevfik Ko!ar. CSC Operating Systems Fall 2009

18-349: Embedded Real-Time Systems Lecture 2: ARM Architecture

Microcontrollers. Microcontroller

Introducing the AM57x Sitara Processors from Texas Instruments

QUESTION BANK UNIT I

7. Discuss the hardware signals and superscalar architecture of Pentium BTL 2 Understand

Introduction to ARM LPC2148 Microcontroller

PROCESSES & THREADS. Charles Abzug, Ph.D. Department of Computer Science James Madison University Harrisonburg, VA Charles Abzug

Chapter 15 ARM Architecture, Programming and Development Tools

Embedded Systems. Software Development & Education Center. (Design & Development with Various µc)

Linux Driver and Embedded Developer

Windows 7 Overview. Windows 7. Objectives. The History of Windows. CS140M Fall Lake 1

System Energy Efficiency Lab seelab.ucsd.edu

Operating System. Operating System Overview. Structure of a Computer System. Structure of a Computer System. Structure of a Computer System

CS370 Operating Systems

CODE TIME TECHNOLOGIES. Abassi RTOS. Porting Document. ARM Cortex-A9 CCS

CS370 Operating Systems

Transcription:

Embedded Operating Systems Unit I and Unit II

Syllabus Unit I Operating System Concepts Real-Time Tasks and Types Types of Real-Time Systems Real-Time Operating Systems

UNIT I

Operating System Manager: CPU, I/O, memory Abstraction: Hides details of h/w from the user Layers of protection: Users supervisor Support: Applications run above Bit length and OS: 32-bit 64-bit 32-bit Windows 7 or 64-bit Windows 7 No. of apps don t run on 64-bit ver! Many cross compilers, IDEs don t run on 64-bit ver!

What s an embedded system? Wiki: An embedded system is a special-purpose system in which the computer is completely encapsulated by or dedicated to the device or system it controls.

Embedded Operating Systems Why Embedded Systems need OS? They are complex, run multiple tasks, have many I/Os and networks to manage

Embedded Operating Systems ecos Embedded Linux RTLinux FreeDOS FreeRTOS LynxOS RTOS MicroSuse NetBSD OpenBSD Inferno (operating system) ITROM OSE OS-9 QNX RTEMS RTXC Quadros VxWorks Windows CE Windows XP Embedded SymbianOS T2 SDE

Network OS (NOS) Specialized in managing networked systems alone E.g.: Windows NT, Microsoft server, Novell Netware

Layers of OS

History of OS MSDOS: 1980-81 Unix: 1970, Ken Thomson and Dennis Ritchie Windows: 1990s Windows 3.0 Linux: 1991, Linus Torvalds

Functions - OS Process management Memory management I/O Management File Management Support to Multiprogramming Protection Security Network management

Kernel Functions Interrupt handling Task creation and scheduling Inter Process communication Support for I/O devices Memory allocation and deallocation File system management Network management

Facts - kernel While loading OS, specific kernel options have to be configured. This is w.r.t. h/w Changing Mother Board, Processor, memory require kernel updates For E.S. boards, it is important to know type of board so that kernel can be selected and configured

Types of Kernel Monolithic Kernel Microkernel

Monolithic Kernel It has simple design and is a large single process Runs entirely in single address space i.e.: kernel space and in supervisory mode Kernel is bulky and is difficult to extend and maintain E.g.: Unix, Linux, MSDOS

Monolithic Kernel

Microkernel It is minimum amount of software to provide the mechanisms needed to implement an OS mechanisms => low-level address, space management, thread management, and IPC Kernel is broken down into separate processes (servers) Some of the processes (servers) run in kernel space and some run in user-space E.g.: MINIX by A. Tanenbaum, QNX (RTOS), Mach kernel 3.0 by CMU

Microkernel

Tasks/Processes A program in execution is a process Task or a job can also be used to denote process Process can be in any one of 5 states broadly 1. New 2. Ready 3. Running 4. Blocked 5. Exit For each task there is Task Control Block (TCB)

State transition diagram of a process

Task (Process) Control Block

Multitasking Time multiplexing Context Context switch Overhead

Task scheduling Techniques, methods.. Time, priority, order?? Scheduling policy of OS decides CPU bound tasks and I/O bound tasks CPU bound tasks are computation intensive I/O bound tasks need more I/O time

Quality points that rate Scheduling algorithms CPU utilization: % of time CPU working Response time: task waiting for CPU to respond Turnaround time (TAT): time interval from which the task is presented to the system to the instance at which task exits after completion Throughput rate: No. of tasks processed in unit time

Scheduling Algorithms 1. Non-preemptive scheduling Co-operative scheduling Shortest job next Priority based scheduling 2. Preemptive scheduling Round robin scheduling Pre-emptive priority Pre-emptive SJN/ Shortest remaining time (SRT)

Threads

Interrupt Handling In OS interrupts are used either with h/w support or by pure software ISR Interrupt latency Sequence of actions following an interrupt: Saving current context Determine ID of the interrupt Switch to new context Starting the execution of interrupt handler (ISR)

Interrupts and Task Switching Task switching is accomplished by the mechanism of interrupts The total switching latency = interrupt latency + dispatch latency

Inter Process (Task) Communications (IPC) Where is communication needed? Processes in the same machine, and processes in different machines might need to communicate to share data, or to send queries and receive responses Two of the task communication methods are i) Shared memory ii) Message passing e.g.: Semaphores, Pipes, Mailbox, RPC

Shared Memory

Message Passing

Producer Consumer Paradigm Sender receiver communication is a Producer Consumer Paradigm Consumer consumes if producer produces Producer needs to produce as long as consumer consumes it Bounded buffer problem: sender side receiver side

Task Synchronization There are three aspects to it. First, how different tasks with conflicting actions can cause havoc. Second, how to avoid such situations and third, if such a situation occurs, how to get out of it.

Task Synchronization Race Condition Critical Section Solution to Race Condition Automicity Disable interrupts Locks - mutex

Deadlocks What is Deadlock? What are the Necessary conditions? Mutual exclusion Hold & wait Non-Preemption Circular Wait How to deal with them? Ignore, avoid, prevent, detect and recover

Tasks and their Conflicts Priority Inversion? Solution to this : Priority Inheritance and Priority Ceiling

Device Drivers in OS What are they? What are the types? What are the design issues?

Layers Associated with Device Driver I/O Service I/O Request

Real-Time Systems & Real-time Tasks It consists of many tasks with at least one time constrained task Real-Time tasks Hard real-time and Soft real-time Can be pre-emptive or non-preemptive Periodic, Aperiodic, Sporadic

What does an RTOS do?

Kernel Services of an RTOS

Real-time Scheduling Algorithms

UNIT II

Syllabus Unit II Processor basics Integrated Processors: SOC History of ARM Processors Hardware Platforms ARM Architecture Interrupt Vector Table ARM Programming Assembly Language Instruction Set Read only and Read-Write Memory ARM9 ARM-Cortex-M3 Case Study of BeagleBone Black Board

SYSTEM-ON-CHIP (SOC) Embedding: Multiple processors, memories, multiple standard source solutions (IP Cores), analog units

A SOC Embedded System -with two internal ASICs, two internal processor and peripheral interfaces ASIPs IPs Data Address generator Program Address generator Multiprocessor DSP RISC processor Program data and memory Port Other Digital circuits- Timer,MUXs Port Interfaces DMAC Interrupt Controller Analog circuits, A /D EEPROM

History of the ARM Processor Acorn Computers Ltd. (UK) developed ARM1, ARM2 ARM5 Acorn Computers Ltd. + Apple Computers + VLSI Tech. Group Advanced RISC Machines Ltd. ARM6, ARM 7 most popular and still widely used ARM9, ARM10,ARM11 CORTEX 90% of embedded 32-bit RISC processors used are ARM processors

The ARM Core What is meant by the core? The core is the processing unit or the computing engine It has all the computing power, and this aspect is decided by the architecture, which represents the basic design of the processor The ARM Microcontroller is ARM core with peripherals added to it

ARM SOC Core with Peripherals

The RISC Architecture These apply to most of the instructions of ARM 1) Instructions are of the same size, that is, 32 bits 2) Instructions are executed in one cycle 3) Only the load and store instructions access memory

Advanced Features of ARM Thumb MMU and MPU Cache Debug interface Embedded ICE macrocell Fast multiplier Enhanced instructions Jazelle DBX (Direct Bytecode execution) Vector floating point unit Synthesizable

Features of ARM which make it special Data bus width Computational capability Low Power Pipelining Multiple Register instructions DSP Enhancements

Operating Modes Of ARM

Register Set

CPSR

Interrupt Vector Table

Programming the ARM processor Can be done in Assembly as well as in high level languages Assembly Language Programming: Instruction set features: 1) Instructions are of the same size, that is, 32 bits 2) Only the load and store instructions access memory 3) Barrel shifter..more than I bit of shift/rotation 4) Conditions can be appended to the instructions Data Types and Data Alignment: 32-bit 2 words each 16-bits byte Both Little Endian and Big Endian supported 4 banks of memory

Instruction Set

Data Processing Instructions Move Shift Move and Shift together

Conditional Execution

Data Processing Instructions Arithmetic

Data Processing Instructions Logical Compare

Load-Store Instructions

Branch Instructions

Loading constants-immediate mode ARM has the limitation that its instruction size should nor exceed 32 bits This means that the constant should fit in the word length of 32 bits along with the opcode, condition code, register code and other information So, we can t have a 32-bit constant embedded in the instruction! ARM uses an ingenious technique the use of rotation of a small number to generate a large number

Constants

Multiple Load and Store

Readonly and Read/Write Memory The two memory areas defined by the compiler are Readonly for code and Read/write memory for data This corresponds to ROM and RAM RAM is used for intermediate results, for temporary storage, etc., as this is volatile memory In the readonly memory, data is written using directives like DCD, DCW, etc.

ARM 9

ARM 9 32-bit Harvard Architecture 5-stage pipeline DSP instructions E.g.: LPC29XX (2917, 2919, 2927, 2927) 125 MHz core, 2.0 USB host-device, CAN, LIN, 56KB SRAM, 768KB Flash, three10-bit ADC, multiple serial & parallel interfaces

ARM Cortex-M3

ARM Cortex-M3 Up to 100 MHz CPU frequency 3-stage pipeline Harvard architecture Separate instruction, data and peripheral bus 64 KB SRAM, 512KB Flash Ethernet MAC, USB host-device 8-channel DMA controller 4 UARTs, 2 CAN ports, 2-SSP controllers, SPI interface 3 I2C interfaces, 8-channel 12-bit ADC, 10-bit DAC, PWM 4 timers, RTC, 70 general purpose I/O pins

BeagleBone Black low-cost, open source, community-supported development platform for ARM Cortex -A8 processor developers and hobbyists Shipped with the Debian GNU/Linux in onboard FLASH Other Linux distributions and operating systems are also supported on BeagleBone Black including: Ubuntu, Android, Fedora http://www.ti.com/tool/beaglebk http://beagleboard.org/ http://elinux.org/beagleboard:beagleboneblack to get all h/w details Blogs

BeagleBone Black

BeagleBone Black Features Processor : 1GHz AM3359 Sitara ARM Cortex-A8 512 DDR Memory On-chip 10/100 Ethernet 512MB DDR3 RAM 4GB 8-bit emmc on-board flash storage with Debian GNU/Linux 3D graphics accelerator NEON floating-point accelerator 2x PRU 32-bit microcontrollers USB client for power & communications USB host Ethernet HDMI 2x 46 pin headers

BeagleBone Black Programming BoneScript JavaScript C++ programming with Eclipse IDE with CDT

Thank you