Chapter 12 IoT Projects Case Studies. Lesson-01: Introduction

Similar documents
Lesson 5: Software for embedding in System- Part 2

Inter-Process Communication and Synchronization of Processes, Threads and Tasks: Lesson-1: PROCESS

Linux Operating System

VEOS high level design. Revision 2.1 NEC

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

MARUTHI SCHOOL OF BANKING (MSB)

REAL TIME OPERATING SYSTEM PROGRAMMING-I: VxWorks

Software Development & Education Center

Kernel Internals. Course Duration: 5 days. Pre-Requisites : Course Objective: Course Outline

Noorul Islam College Of Engineering, Kumaracoil MCA Degree Model Examination (October 2007) 5 th Semester MC1642 UNIX Internals 2 mark Questions


CSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files

CSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files. Compiler vs.

3.1 Introduction. Computers perform operations concurrently

Operating Systems. II. Processes

Asynchronous Events on Linux

Processes. OS Structure. OS Structure. Modes of Execution. Typical Functions of an OS Kernel. Non-Kernel OS. COMP755 Advanced Operating Systems

Outline Background Jaluna-1 Presentation Jaluna-2 Presentation Overview Use Cases Architecture Features Copyright Jaluna SA. All rights reserved

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

Universidad Carlos III de Madrid Computer Science and Engineering Department Operating Systems Course

Mobile Operating Systems Lesson 01 Operating System

CS 333 Introduction to Operating Systems. Class 3 Threads & Concurrency. Jonathan Walpole Computer Science Portland State University

(MCQZ-CS604 Operating Systems)

Recap: Thread. What is it? What does it need (thread private)? What for? How to implement? Independent flow of control. Stack

Concurrency, Thread. Dongkun Shin, SKKU

CSE 4/521 Introduction to Operating Systems. Lecture 29 Windows 7 (History, Design Principles, System Components, Programmer Interface) Summer 2018

Problem Set: Processes

Operating Systems Comprehensive Exam. Spring Student ID # 3/20/2013

CSC209 Review. Yeah! We made it!

CS 333 Introduction to Operating Systems. Class 3 Threads & Concurrency. Jonathan Walpole Computer Science Portland State University

Problem Set: Processes

Mid Term from Feb-2005 to Nov 2012 CS604- Operating System

Linux Driver and Embedded Developer

518 Lecture Notes Week 3

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

LINUX INTERNALS & NETWORKING Weekend Workshop

Operating Systems Comprehensive Exam. Spring Student ID # 3/16/2006

SMD149 - Operating Systems

Introduction to PThreads and Basic Synchronization

PROCESS CONTROL BLOCK TWO-STATE MODEL (CONT D)

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

Operating Systems Design Fall 2010 Exam 1 Review. Paul Krzyzanowski

20-EECE-4029 Operating Systems Fall, 2015 John Franco

CS5460: Operating Systems

CS 33. Architecture and the OS. CS33 Intro to Computer Systems XIX 1 Copyright 2018 Thomas W. Doeppner. All rights reserved.

Computer Systems A Programmer s Perspective 1 (Beta Draft)

15: OS Scheduling and Buffering

Processes. Dr. Yingwu Zhu

Embedded System Curriculum

System Call. Preview. System Call. System Call. System Call 9/7/2018

ECE 598 Advanced Operating Systems Lecture 23

EMBEDDED Systems. Functions. MODULE- 1 C programming with data Structure Introduction to C. Array and String. Control Flow Statements In C

Processes. Overview. Processes. Process Creation. Process Creation fork() Processes. CPU scheduling. Pål Halvorsen 21/9-2005

CSE 153 Design of Operating Systems Fall 2018

Last class: Today: Thread Background. Thread Systems

CSC Operating Systems Spring Lecture - XII Midterm Review. Tevfik Ko!ar. Louisiana State University. March 4 th, 2008.

CS 326: Operating Systems. Process Execution. Lecture 5

Outline. 1) Introduction to Linux Kernel 2) How system calls work 3) Kernel-space programming 4) Networking in kernel 2/34

Basic OS Progamming Abstrac7ons

Table of Contents. Preface... xi

Basic OS Progamming Abstrac2ons

Mon Sep 17, 2007 Lecture 3: Process Management

CS 322 Operating Systems Practice Midterm Questions

pthreads CS449 Fall 2017

ECE 574 Cluster Computing Lecture 8

Software Development & Education Center

POSIX Threads: a first step toward parallel programming. George Bosilca

Module 9 ARM 7 Microcontroller LPC2148 Programming ARM Architecture, LPC2148 specifications, Register architecture, Special function registers, KEIL I

Operating Systems. Review ENCE 360

Process Environment. Pradipta De

- Knowledge of basic computer architecture and organization, ECE 445

Deviations are things that modify a thread s normal flow of control. Unix has long had signals, and these must be dealt with in multithreaded

Operating System Structure

CS 5523: Operating Systems

UNIX Kernel. UNIX History

The Operating System Machine Level

CSE 451 Midterm 1. Name:

Layers in a UNIX System. Create a new process. Processes in UNIX. fildescriptors streams pipe(2) labinstructions

Thread. Disclaimer: some slides are adopted from the book authors slides with permission 1

Memory-Mapped Files. generic interface: vaddr mmap(file descriptor,fileoffset,length) munmap(vaddr,length)

ENGR 3950U / CSCI 3020U Midterm Exam SOLUTIONS, Fall 2012 SOLUTIONS

Introduction to OS Processes in Unix, Linux, and Windows MOS 2.1 Mahmoud El-Gayyar

Fall 2014:: CSE 506:: Section 2 (PhD) Threading. Nima Honarmand (Based on slides by Don Porter and Mike Ferdman)

Questions answered in this lecture: CS 537 Lecture 19 Threads and Cooperation. What s in a process? Organizing a Process

OS lpr. www. nfsd gcc emacs ls 1/27/09. Process Management. CS 537 Lecture 3: Processes. Example OS in operation. Why Processes? Simplicity + Speed

1. Draw and explain program flow of control without and with interrupts. [16]

UNIT I Linux Utilities

CS2506 Quick Revision

Pebbles Kernel Specification September 26, 2004

CSE506: Operating Systems CSE 506: Operating Systems

Design Overview of the FreeBSD Kernel CIS 657

Kernel Module Programming

PROCESS MANAGEMENT Operating Systems Design Euiseong Seo

Process management. What s in a process? What is a process? The OS s process namespace. A process s address space (idealized)

Processes. Process Management Chapter 3. When does a process gets created? When does a process gets terminated?

CSE 451: Operating Systems Winter Module 4 Processes. Mark Zbikowski Allen Center 476

Process Description and Control

Design Overview of the FreeBSD Kernel. Organization of the Kernel. What Code is Machine Independent?

Processes. Johan Montelius KTH

Processes. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Transcription:

Chapter 12 IoT Projects Case Studies Lesson-01: Introduction 1

1. Real Time Linux 2

Linux 2.6.x Linux known so after Linus Torvalds father of the Linux operating system Linux 2.6.x provides functions for preemptive scheduling, Linux 2.6.39 was last version of real time Linux 2.6.x (2011) High resolution timers Linux 3.13 (2013) release had 15,803,499 lines of code Linux 3.14 (March 2014) 3

Real-time Linux patch PREEMPT_RT Preemptive interrupt service handler threads Support for full preemption of critical sections, interrupt handlers, and "interrupt disable" code sequences 4

Additional scheduling policy known as SCHED_DEADLINE, implementing the earliest deadline first algorithm (EDF), was added to the Linux scheduler in version 3.14 of the Linux kernel mainline, released on 30 March 2014 5

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 6

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

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. 8

2. Processes in Linux 9

Processes in Linux Linux 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 POSIX map for shared memory functions 10

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. 11

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. 12

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 13

3. Linux Devices 14

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. 15

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 Block part also accessible 16

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. 17

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). 18

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. 19

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

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 21

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. 22

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

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

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 25

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 26

5. IPC functions 27

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 28

Linux functions for the thread properties and signal 29

Linux functions for the POSIX threads 30

Linux functions for the semaphore IPCs 31

Linux functions for message-queue IPCs 32

Linux functions for timers 33

Linux functions for shared memory 34

Summary 35

We learnt Linux 2.6.x and Linux 3.x support real time systems due to Preemptive scheduler functions and Schedule policy and Preemptive interrupt service handler threads High resolution timers 36

We learnt Linux uses POSIX processes, threads, shared memory, POSIX mmap, and POSIX queues, POSIX semaphores. 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. 37

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 38

End Lesson-01 on Real Time Linux 39