16
SIMPLIFIED APPROACH TO REAL TIME SYSTEM

SIMPLIFIED APPROACH TO REAL TIME SYSTEM

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: SIMPLIFIED APPROACH TO REAL TIME SYSTEM

SIMPLIFIED APPROACHTO

REAL TIME SYSTEM

Page 2: SIMPLIFIED APPROACH TO REAL TIME SYSTEM
Page 3: SIMPLIFIED APPROACH TO REAL TIME SYSTEM

SIMPLIFIED APPROACH TOREAL TIME SYSTEM

By

Yogyata JainAssistant Professor (CSE)

IET Bhaddal, Ropar

(Formerly in Chitkara University Punjab)

UNIVERSITY SCIENCE PRESS(An Imprint of Laxmi Publications (P) Ltd.)

BANGALORE ∑ CHENNAI ∑ COCHIN ∑ GUWAHATI ∑ HYDERABAD

JALANDHAR ∑ KOLKATA ∑ ∑LUCKNOW ∑

MUMBAI ∑ RANCHI NEW DELHI INDIA USA GHANA KENYA

Page 4: SIMPLIFIED APPROACH TO REAL TIME SYSTEM

SIMPLIFIED APPROACH TO REAL TIME SYSTEM

Copyright © by Laxmi Publications (P) Ltd. All rights reserved including those of translation into other languages. In accordance with the Copyright (Amendment) Act, 2012, no part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise. Any such act or scanning, uploading, and or electronic sharing of any part of this book without the permission of the publisher constitutes unlawful piracy and theft of the copyright holder’s intellectual property. If you would like to use material from the book (other than for review purposes), prior written permission must be obtained from the publishers.

Printed and bound in India Typeset at Excellent Graphics

First Edition: 2015 USA-9740-150-SIMP APP REAL TIME SYS-JAI

ISBN 978-93-83828-36-4

Price: ` 150.00

Limits of Liability/Disclaimer of Warranty: The publisher and the author make no representation or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties. The advice, strategies, and activities contained herein may not be suitable for every situation. In performing activities adult supervision must be sought. Likewise, common sense and care are essential to the conduct of any and all activities, whether described in this book or otherwise. Neither the publisher nor the author shall be liable or assumes any responsibility for any injuries or damages arising herefrom. The fact that an organization or Website if referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Website may provide or recommendations it may make. Further, readers must be aware that the Internet Websites listed in this work may have changed or disappeared between when this work was written and when it is read.

All trademarks, logos or any other mark such as Vibgyor, USP, Amanda, Golden Bells, Firewall Media, Mercury, Trinity, Laxmi appearing in this work are trademarks and intellectual property owned by or licensed to Laxmi Publications, its subsidiaries or affiliates. Notwithstanding this disclaimer, all other names and marks mentioned in this work are the trade names, trademarks or service marks of their respective owners.

Published in india by

UNIVERSITY SCIENCE PRESS(An Imprint of Laxmi Publications Pvt.Ltd.)

113, GOLDEN HOUSE, DARYAGANJ, NEW DELHI - 110002, INDIA Telephone : 91-11-4353 2500, 4353 2501 Fax : 91-11-2325 2572, 4353 2528 C—www.laxmipublications.com [email protected] Printed at:

& Bangalore 080-26 75 69 30

& Chennai 044-24 34 47 26, 24 35 95 07

& Cochin 0484-237 70 04, 405 13 03

& Guwahati 0361-254 36 69, 251 38 81

& Hyderabad 040-27 55 53 83, 27 55 53 93

& Jalandhar 0181-222 12 72

& Kolkata 033-22 27 43 84

& Lucknow 0522-220 99 16

& Mumbai 022-24 91 54 15, 24 92 78 69

& Ranchi 0651-220 44 64

Bran

ches

Page 5: SIMPLIFIED APPROACH TO REAL TIME SYSTEM

For my Loving Son

Hirdey Jain

&

Caring Husband

Deepak Jain

Page 6: SIMPLIFIED APPROACH TO REAL TIME SYSTEM
Page 7: SIMPLIFIED APPROACH TO REAL TIME SYSTEM

ContentsChapters Pages

1. Real Time System 1–141.1 Introduction ... 11.2 Architecture of Real Time System ... 21.3 Real Time System Tasks ... 21.4 Real Time Computing Issues ... 61.5 Real Time World ... 61.6 Real Time Operating System ... 81.7 Real Time System Components ... 91.8 Programming Styles ... 91.9 Communication Based Model ... 9Summary ... 10Exercises ... 10Multiple Choice Questions ... 11Questionnaires ... 12

2. Characterizing Real Time Systems 15–282.1 Real Time System Performance Measure ... 152.2 Properties of Performance Measure ... 162.3 Performability ... 182.4 Cost Functions and Hard Deadlines ... 22Summary ... 25Exercises ... 25Multiple Choice Questions ... 27Questionnaires ... 28

3. Task Assignment and Scheduling 29–593.1 Introduction ... 293.2 Scheduling Algorithms ... 343.3 Task Assignment ... 47Summary ... 53Exercises ... 54Multiple Choice Questions ... 57Questionnaires ... 58

4. Real Time Databases 60–784.1 Introduction ... 604.2 Scheduling of Real Time Database Transactions ... 644.3 Soft and Hard Transactions ... 644.4 Serializability ... 684.5 Main Memory Databases (MMDB) ... 694.6 Databases for Hard Real Time System ... 714.7 Thrashing Effect ... 73Summary ... 74Exercises ... 75Multiple Choice Questions ... 76Questionnaires ... 77

( vii )

Page 8: SIMPLIFIED APPROACH TO REAL TIME SYSTEM

5. Real Time Communication 79–1105.1 Introduction ... 795.2 Conventional Communication Vs. Real Time Communication ... 805.3 Communications Media ... 815.4 Types of Network ... 845.5 Architecture of Real Time Communication System ... 875.6 Token Based Protocol or Timed Token Protocol (TTP) ... 885.7 Deadline Based Protocols ... 915.8 Polled Bus Protocol ... 925.9 Contention Based Protocol ... 945.10 Stop and Go Multihop Protocol (SGMP) ... 985.11 Hierarchical Round Robin Protocol (HRR) ... 1005.12 Virtual Time Carrier Sensed Multiple Access (VTCSMA) ... 1025.13 Window Based Protocol ... 102Summary ... 103Exercises ... 104Multiple Choice Questions ... 106Questionnaires ... 107

6. Real Time Operating System 111–1216.1 Introduction ... 1116.2 RTOS Classification ... 1126.3 Real Time OS Features ... 1126.4 RTOS Architecture ... 1136.5 Commercial Most Popular RTOS ... 1186.6 RTOS Vs. General Operating System ... 118Summary ... 119Exercises ... 119Multiple Choice Questions ... 120

Case Study 122–128

Bibliography 129

Abbreviations 130–133

Glossary of Terms 134–147

PTU Question Papers 148–160

Index 161–163

Chapters Pages

( viii )

Page 9: SIMPLIFIED APPROACH TO REAL TIME SYSTEM

PREFACEThe book is in very simple language. I have tried to ensure that the book clear whole

concepts related to real time system. Book is according to PTU syllabus and I have speciallymade it for PTU students. Daily life and practical examples used in book to clear the conceptsmore clearly. To achieve this I have made six chapters of this book.

I felt a need to write a book on the subject that was simple and easy to understand. Abook can solve general facing problems and provide a comprehensive view of real time system.This thought provided me to write a book on real time system.

Since this book provides comprehensive coverage of basic concepts of real time systemavoids complicated mathematical formula and makes minimal assumptions, it will benefit awide spectrum of audience. This includes students studying RTS for the first time or doingresearch on RTS; engineers engaged in real time protocol design and marketing people. Allwill find this book extremely readable and very informative.

Your comments are valuable to me. I will appreciate if you will notify me of any error oradmissions in the book. So, please send your comments and valuable suggestions forimprovement I will be glad to incorporate your comments for next edition of the book.

— Author

( ix )

Page 10: SIMPLIFIED APPROACH TO REAL TIME SYSTEM

ACKNOWLEDGEMENTWriting and publishing of this book could not attain successfully without the support of

number of people associated with it and sincere efforts made by an author.Firstly, I would like to thanks worthy chairperson Er. Kulwinder Gurcharan Singh,

Director General R. Jha and Associate Director J.S. Kanwar for their valuable direction.I would also like to thanks Mrs. Jyoti Snehi Assistant Professor CSE Department in

Chitkara University Punjab for her valuable guidance.I would also like to express my sincere gratitude to Dr. Sanjay Singla, HOD CSE

Department of IET Bhaddal, Ropar for inspiration and Mrs. Aarti Mahajan, CSE DepartmentAssistant Professor in IET Bhaddal for guiding me.

I would also deeply appreciate the assistance provided by my husband Deepak Jain, mymother in law Rukmani Jain and father in law Arihant Jain for their invaluable help andsupport for completion of this book.

— Author

( x )

Page 11: SIMPLIFIED APPROACH TO REAL TIME SYSTEM

OM SAI NATH

( xi )

Page 12: SIMPLIFIED APPROACH TO REAL TIME SYSTEM

SYLLABUS

PUNJAB TECHNICAL UNIVERSITY

JALANDHAR

BOOK IS ACCORDING TO PTU SYLLABUS

CS – 324 REAL TIME SYSTEMS (ELECTIVE I)Introduction: Definition, Issues in Real Time Computing, Structure of a Real Time

System. Task Classes.Characterizing Real Time Systems and Tasks: Introduction, Performance measures

for real time systems: Traditional performance measures, Performability, Cost functions andhard deadlines.

Task Assignment and Scheduling: Introduction, Classical uniprocessor schedulingalgorithms: Rate Monotonic, EDF algorithm, Task assignment, Fault tolerant scheduling.

Real Time Databases: Basic definitions, Real time Vs. General purpose databases,Main memory databases, Concurrency control issues, Databases for hard real time systems.

Real Time Communication: Introduction, Architectural issues, Protocols: Contentionbased protocols, Token based protocols, Deadlines based protocols, Stop and Go Multihopprotocol, The polled bus protocol, Hierarchical round robin protocol.

( x )

Page 13: SIMPLIFIED APPROACH TO REAL TIME SYSTEM

U.A. TECHNICAL UNIVERSITY, DEHRADUN

MCA 5.5 (2) Real Time Systems

Unit-I: Introduction to Real Time Systems, Prioritites, Embedded Systems, Task,Classification & Requirements, Deadlines, Soft, Hard.

Unit-II: Firm Real Time Systems, Introduction to Real Time Operating Systems, TaskManagement, Inter Process Communication, Case Studies of Maruti II, HART OS, VRTX etc.

Unit-III: Characterizing Real Time Systems and Task, Task Assignment & SchedulingTheory, Fixed and Dynamic Priority Scheduling Uniprocessor (RM and EDF), Multiprocessor(Utilization Balancing, Next-fit for RM & Bin-Packing Assignment for EDF) Scheduling.

Unit-IV: Programming Languages and Tools, Real Time Databases. Real TimeCommunication, FDDI, Specification and Verification using Duration Calculus, Flow Control,Protocols for Real Time (VTCSMA, Window, IEEE 802.3, IEEE 802.4, IEEE 802.5, Stop andGo Protocol, Media Access Protocol).

Unit-V: Fault, Fault Classes, Fault Tolerant Real Time System, Clocks, ClockSynchronization, Issues in Real Time Software Design.

( xiii )

Page 14: SIMPLIFIED APPROACH TO REAL TIME SYSTEM

ANNA UNIVERSITY SYLLABUS

B.Tech CSE – 7th Sem

UNIT I: INTRODUCTION

Introduction-Issues in Real Time Computing, Structure of a Real Time System. TaskClasses, Performance Measures for Real Time Systems, Estimating Program Run times. TaskAssignment and Scheduling—Classical Uniprocessor Scheduling Algorithms, UniprocessorScheduling of IRIS Tasks, Task Assignment, Mode Changes, and Fault Tolerant Scheduling.

UNIT II: PROGRAMMING LANGUAGES AND TOOLS

Programming Language and Tools–Desired Language Characteristics, Data Typing,Control Structures, Facilitating Hierarchical Decomposition, Packages, Run-time (Exception)Error Handling, Overloading and Generics, Multitasking, Low Level Programming, TaskScheduling, Timing Specifications, Programming Environments, Run-time Support.

UNIT III: REAL TIME DATABASES

Real Time Databases—Basic Definition, Real Time Vs. General Purpose Databases,Main Memory Databases, Transaction Priorities, Transaction Aborts, Concurrency ControlIssues, Disk Scheduling Algorithms, Two-phase Approach to Improve Predictability,Maintaining Serialization Consistency, Databases for Hard Real Time Systems.

UNIT IV: COMMUNICATION

Real Time Communication—Communications Media, Network Topologies Protocols,Fault Tolerant Routing. Fault Tolerance Techniques—Fault Types, Fault Detection. FaultError Containment Redundancy, Data Diversity, Reversal Checks, Integrated FailureHandling.

UNIT V: EVALUATION TECHNIQUES

Reliability Evaluation Techniques—Obtaining Parameter Values, Reliability Modelsfor Hardware Redundancy, Software Error Models. Clock Synchronization—Clock, A Nonfault-Tolerant Synchronization Algorithm, Impact of Faults, Fault Tolerant Synchronization inHardware, Fault Tolerant Synchronization in Software.

( xiv )

Page 15: SIMPLIFIED APPROACH TO REAL TIME SYSTEM

GAUTAM BUDDH TECHNICAL UNIVERSITY,

LUCKNOW

(TCS 041) REAL TIME SYSTEMS

UNIT-I: INTRODUCTION

Definition, Typical Real Time Applications: Digital Control, High Level Controls, SignalProcessing etc., Release Times, Deadlines, and Timing Constraints, Hard Real Time Systemsand Soft Real Time Systems, Reference Models for Real Time Systems: Processors andResources, Temporal Parameters of Real Time Workload, Periodic Task Model, PrecedenceConstraints and Data Dependency.

UNIT-II: REAL TIME SCHEDULING

Common Approaches to Real Time Scheduling: Clock Driven Approach, Weighted RoundRobin Approach, Priority Driven Approach, Dynamic Versus Static Systems, Optimality ofEffective-Deadline-First (EDF) and Least-Slack-Time-First (LST) Algorithms, Offline VersusOnline Scheduling, Scheduling Aperiodic and Sporadic jobs in Priority Driven and Clock DrivenSystems.

UNIT-III: RESOURCES ACCESS CONTROL

Effect of Resource Contention and Resource Access Control (RAC), NonpreemptiveCritical Sections, Basic Priority-Inheritance and Priority-Ceiling Protocols, Stack BasedPriority-Ceiling Protocol, Use of Priority-Ceiling Protocol in Dynamic Priority Systems,Preemption Ceiling Protocol, Access Control in Multiple-Unit Resources, Controlling ConcurrentAccesses to Data Objects.

UNIT-IV: MULTIPROCESSOR SYSTEM ENVIRONMENT

Multiprocessor and Distributed System Model, Multiprocessor Priority-Ceiling Protocol,Schedulability of Fixed-Priority End-to-End Periodic Tasks, Scheduling Algorithms for End-to-End Periodic Tasks, End-to-End Tasks in Heterogeneous Systems, Predictability andValidation of Dynamic Multiprocessor Systems, Scheduling of Tasks with Temporal DistanceConstraints.

UNIT-V: REAL TIME COMMUNICATION

Model of Real Time Communication, Priority-Based Service and Weighted Round-RobinService Disciplines for Switched Networks, Medium Access Control Protocols for BroadcastNetworks, Internet and Resource Reservation Protocols, Real Time Protocols, Communicationin Multicomputer System, An Overview of Real Time Operating Systems.

( xv )

Page 16: SIMPLIFIED APPROACH TO REAL TIME SYSTEM

Simplified Approach To Real TimeSystem By Yogyata Jain

Publisher : Laxmi Publications ISBN : 9789382828364 Author : Yogyata Jain

Type the URL : http://www.kopykitab.com/product/3478

Get this eBook

40%OFF