REAL TIME OPERATING SYSTEM PROGRAMMING-II: II: Windows CE, OSEK and Real time Linux. Lesson-12: Real Time Linux



Similar documents
DEVICE DRIVERS AND TERRUPTS SERVICE MECHANISM Lesson-14: Device types, Physical and Virtual device functions

Linux Driver Devices. Why, When, Which, How?

REAL TIME OPERATING SYSTEMS. Lesson-10:

CS 377: Operating Systems. Outline. A review of what you ve learned, and how it applies to a real operating system. Lecture 25 - Linux Case Study

Networking Operating Systems (CO32010)

Linux Kernel Architecture

Computer and Set of Robots

Device Management Functions

Red Hat Linux Internals

POSIX. RTOSes Part I. POSIX Versions. POSIX Versions (2)

Chapter 1 Lesson 3 Hardware Elements in the Embedded Systems Chapter-1L03: "Embedded Systems - ", Raj Kamal, Publs.: McGraw-Hill Education

OPERATING SYSTEM SERVICES

Chapter 10 Case Study 1: LINUX

LSN 10 Linux Overview

Comparing RTOS to Infinite Loop Designs

1. Computer System Structure and Components

Review from last time. CS 537 Lecture 3 OS Structure. OS structure. What you should learn from this lecture

Have both hardware and software. Want to hide the details from the programmer (user).

Page 1 of 5. IS 335: Information Technology in Business Lecture Outline Operating Systems

Linux Kernel Networking. Raoul Rivas

Outline: Operating Systems

Lab 6: Building Your Own Firewall

Embedded Systems. 6. Real-Time Operating Systems

A Design of Video Acquisition and Transmission Based on ARM. Ziqiang Hao a, Hongzuo Li b

TEST CHAPTERS 1 & 2 OPERATING SYSTEMS

Embedded Programming in C/C++: Lesson-1: Programming Elements and Programming in C

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

Leak Check Version 2.1 for Linux TM

Introduction. What is an Operating System?

Chapter 6, The Operating System Machine Level

Performance Comparison of RTOS

CS161: Operating Systems

The Real-Time Operating System ucos-ii

Operating system Dr. Shroouq J.

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson

Operating System Components and Services

Outline. Review. Inter process communication Signals Fork Pipes FIFO. Spotlights

CSE 120 Principles of Operating Systems. Modules, Interfaces, Structure

STUDY GUIDE CHAPTER 4

COS 318: Operating Systems. I/O Device and Drivers. Input and Output. Definitions and General Method. Revisit Hardware

Linux Firewall Lab. 1 Overview. 2 Lab Tasks. 2.1 Task 1: Firewall Policies. Laboratory for Computer Security Education 1

FAME Operating Systems

Lesson 6: 6 EXAMPLES OF EMBEDDED SYSTEMS. Chapter-1L06: "Embedded Systems - ", Raj Kamal, Publs.: McGraw-Hill Education

Xinying Wang, Cong Xu CS 423 Project

Operating System Manual. Realtime Communication System for netx. Kernel API Function Reference.

Fall Lecture 1. Operating Systems: Configuration & Use CIS345. Introduction to Operating Systems. Mostafa Z. Ali. mzali@just.edu.

How To Understand How A Process Works In Unix (Shell) (Shell Shell) (Program) (Unix) (For A Non-Program) And (Shell).Orgode) (Powerpoint) (Permanent) (Processes

Lecture 6: Operating Systems and Utility Programs

Lesson 10:DESIGN PROCESS EXAMPLES Automatic Chocolate vending machine, smart card and digital camera

SYSTEM ecos Embedded Configurable Operating System

Computer Systems II. Unix system calls. fork( ) wait( ) exit( ) How To Create New Processes? Creating and Executing Processes

Cisco Networking Academy Program Curriculum Scope & Sequence. Fundamentals of UNIX version 2.0 (July, 2002)

I/O Device and Drivers

The Lagopus SDN Software Switch. 3.1 SDN and OpenFlow. 3. Cloud Computing Technology

KVM: Kernel-based Virtualization Driver

Automating Linux Malware Analysis Using Limon Sandbox Monnappa K A monnappa22@gmail.com

Real Time Programming: Concepts

Operating System Structure

Chapter 11 I/O Management and Disk Scheduling

Embedded Software development Process and Tools:

Chapter 8 Types of Utility Programs and Operating Systems. Discovering Computers Your Interactive Guide to the Digital World

CHAPTER 15: Operating Systems: An Overview

S7 for Windows S7-300/400

ERA6 OBJECTIVE QUSESTION

White Paper. Real-time Capabilities for Linux SGI REACT Real-Time for Linux

Chapter 8 Objectives. Chapter 8 Operating Systems and Utility Programs. Operating Systems. Operating Systems. Operating Systems.

Obj: Sec 1.0, to describe the relationship between hardware and software HW: Read p.2 9. Do Now: Name 3 parts of the computer.

Voice over IP phone Software Design. Software Engineering Project University of Oulu 2004

Linux 2.4. Linux. Windows

ENABLING WIRELESS DATA COMMUNICATION IN CONSTRUCTION MANAGEMENT SYSTEM

Processes and Non-Preemptive Scheduling. Otto J. Anshus

Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester

Real-Time Systems Prof. Dr. Rajib Mall Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Mobile Devices and Systems Lesson 02 Handheld Pocket Computers and Mobile System Operating Systems

Operating Systems for Parallel Processing Assistent Lecturer Alecu Felician Economic Informatics Department Academy of Economic Studies Bucharest

ReactOS is (not) Windows. Windows internals and why ReactOS couldn t just use a Linux kernel

MatrixSSL Porting Guide

Operating System Software

LynxOS RTOS (Real-Time Operating System)

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-17: Memory organisation, and types of memory

Chapter 2: OS Overview

point to point and point to multi point calls over IP

Scaling Networking Applications to Multiple Cores

Chapter 2 System Structures

Module 20: The Linux System

How To Port A Program To Dynamic C (C) (C-Based) (Program) (For A Non Portable Program) (Un Portable) (Permanent) (Non Portable) C-Based (Programs) (Powerpoint)

VisorALARM-Manager Application Quick Guide. (Ver. 1.3) Dm 380-I. V:3.0

Lecture 5. User-Mode Linux. Jeff Dike. November 7, Operating Systems Practical. OSP Lecture 5, UML 1/33

Nios II-Based Intellectual Property Camera Design

KITES TECHNOLOGY COURSE MODULE (C, C++, DS)

First-class User Level Threads

This tutorial will take you through step by step approach while learning Operating System concepts.

Apache Thrift and Ruby

Multiprogramming. IT 3123 Hardware and Software Concepts. Program Dispatching. Multiprogramming. Program Dispatching. Program Dispatching

Going Linux on Massive Multicore

Internet and Computing Core Certification Guide Module A Computing Fundamentals

Mobile Operating Systems Lesson 05 Windows CE Part 1

Transcription:

REAL TIME OPERATING SYSTEM PROGRAMMING-II: II: Windows CE, OSEK and Real time Linux Lesson-12: Real Time Linux 1

1. Real Time Linux 2

Linux 2.6.x Linux is after Linus Torvalds, father of the Linux operating system Linux 2.6.24 latest version of real time Linux (January ) Linux 2.6.x provides functions for preemptive scheduling High resolution timers Preemptive interrupt service handler threads 3

Linux 2.6.x All scheduler functions as O(1), which means size of input to a function is linearly correlated with function run time Task scheduler support spin lock 2 30 process IDs 4095 device types 4

Linux for Embedded Systems Process Management functions. Memory Management functions. [For example, allocation, de-allocation, pointers, creating and deleting the tasks. File System Functions. 5

Linux for Embedded Systems Shared Memory functions Networking System Functions Device Control Functions for any peripheral present into a system (computer) System call functions are also like an IO device open ( ), close ( ), write ( ) and read ( ) functions. 6

2. Processes in Linux 7

Processes in Linux Linux uses POSIX processes and threads. Linux header files Linux/ types.h and Linux/ shm.h, if included support the system programming for forking processes and shared memory functions in the kernel. For shared memory functions the POSIX map are used in Linux. 8

Processes in Linux A process always creates as child process in the process that uses fork ( ) function. A child creates as the copy of the parent with a new process ID fork () returns a different process structure pid for the parent and pid number of child becomes = 0. 9

Processes in Linux The child process is made to perform different functions than the parent by overloading function of the parent process using execv ( ) function. 10

Processes in Linux execv ( ) has two arguments, the function_name for the child function and function_arguments for the child functions. Each process has its own memory and cannot directly call another process. There is no lightweight process as in UNIX 11

3. Linux Devices 12

char device Character and block devices. char device parallel port, LCD matrix display, or serial port or keypad or mouse. Character access byte-by-byte and analogous to the access from and to a printer device. 13

Block device block device a file system (disk). Linux permits a block device to read and write byte-by-byte like a char device or read and write block-wise like a block device. A part of the block can be accessed 14

net device A net device is a device that handles network interface device (card or adapter) using a line protocols, for example tty or PPP or SLIP. A network interface receives or sends packets using a protocol and sockets, and the kernel uses the modules related to packet transmission. 15

Input, and media devices An input device is a device that handles inputs from a device, for example keyboard. An input device driver has functions for the standard input devices. The media device drivers have functions for the voice and video input devices. Examples are video-frame grabber device, teletext device, radio-device (actually a streaming voice, music or speech device). 16

video device A video device is a device that handles the frame buffer from the system to other systems as a char device does or UDP network packet sending device The video drivers for the standard video output devices. does. A sound device driver has functions for the standard audio devices. A sound device is a device that handles audio in standard format. 17

4. Registering and De-registering and related functions of Linux Modules 18

module initialization module initialization, handling the errors, prevention of unauthorized port accesses, usage-counts, root level security and clean up. A module creates by compiling without main ( ). A module is an object file. For example, object module1.o creates from module1.c file by command $ gcc c {flags} module1.c 19

init_module() Called before the module is inserted into the kernel. The function returns 0 if initialization succeeds and ve value if does not. The function registers a handler for something with the kernel. Alternatively it replaces one of the kernel functions by overloading. 20

insmod Inserts module into the Linux kernel. The object file module1.o, inserts by command $ insmod module1.o. 21

rmmod A module file module1.o is deleted from the kernel by command $ rmmod module1 22

cleanup A kernel level void function, which performs the action on an rmmod call from the execution of the module. The cleanup_module() is called just before the module is removed. The cleanup_module() function negates whatever init_module() did and the module unloads safely 23

Registering modules register_capability A kernel level function for registering unregister_capability A kernel level function for deregistering register_symtab A symbol table function support, which exists as an alternative to declaring functions and variables static 24

5. IPC functions 25

IPC functions Linux/ipc.h included to support IPCs signals on an event Linux header file Linux/signal.h, included to support multithreading Linux/pthread.h included mutex and semaphores Linux/sem.h included Message queues Linux/msg.h 26

Linux functions for the thread properties and signal 27

Linux functions for the POSIX threads 28

Linux functions for the semaphore IPCs 29

Linux functions for message-queue IPCs 30

Linux functions for timers 31

Linux functions for shared memory 32

Summary 33

We learnt Linux 2.6.x is for real time system Preemptive scheduler Linux 2.6.x provides functions for preemptive scheduling High resolution timers Preemptive interrupt service handler threads 34

We learnt Linux uses POSIX processes, threads, shared memory, POSIX mmap, and POSIX queues. Linux has number of interfaces for user. For example, X-Windows for GUI and csh (for C shell). Linux has number of character, block and network interface devices and has device drivers for user programming environment. 35

We learnt Linux supports a module initialization, handling the errors, prevention of unauthorized port accesses, usage-counts, root level security, insert, remove and cleanup functions 36

End Lesson-12 on Real Time Linux 37