ttgvs
TRANSCRIPT
-
7/28/2019 TTGVS
1/14
Department of Instrumentation Technology
R.V. College of Engineering, Bangalore
IT-10/Rev.1.0
LessonPlan
Cover Page: Course Overview
Semester: VII Year: 2011-12
Course Title: Real Time Systems and Applications and Lab Course Code: 07IT73
Total Contact Hours: 42 hrs Duration of SEE: 3+3 hrs
SEE Marks: 100+50 CIE Marks: 100+50
Lesson Plan Author: Soumya M Date:
Checked By: Date:
Prerequisites:
To understand Real time systems, a student must have strong basics of embedded
system and C programming.
Course Overview:
The course is about understanding basic concepts of operating systems, Real time
system, real time memory management and its associated embedded system.
Course Learning Objectives-CLO
1. To explore through the basics of RTOS and to master the essential command set, that can
be used to work comfortably.
2. RTOS provides a number of real time concepts like semaphores, mutex, thread, process,
priorities, etc.
3. The ability to combine commands to perform tasks that are not possible to achieve using
single command.
4. Understand the significance of C programming to attain real time objectives.
5. Acquire knowledge of real time memory management.
1
-
7/28/2019 TTGVS
2/14
Department of Instrumentation Technology
R.V. College of Engineering, Bangalore
Course Content
Course Code: 07IT73 L-T-P: 3-1-3
Course Title: REAL TIME SYSTEMS AND APPLICATIONS AND LAB CIE: 100+50
Teaching Hours: 42 SEE: 100+50
Part A
1. Basic Real time concepts:
Basic computer architecture bus transfer mechanism, input and output memory, CPU
operation: Terminology, software concepts, system concepts, real time definitions,
events and determination, synchronous and asynchronous events, determinism, time
loading; real time design issues.
03 hours
2. Real time specification and design techniques:
Natural languages: mathematical specifications, flow charts, structure charts, pseudo
code and programming design languages, finite state automata, data flow diagrams
DeMarcos rules, Hately and Pribhais extensions; petri nets, warnier-orr notation
Indexed loop, state charts depth, orthogonality, broadcast communication, sanity in
using graphical techniques
07 hours
3. Real time kernels:
Polled loop system, polled loop with interrupts, phase/state driven code, co routines,
interrupt driven systems, context switching, round robin systems, pre emptive
priority systems, major and minor cycles, hybrid systems, foreground-background
systems, background processing, initialization, real-time operation, full featured real
time operation systems Task control block model, Build or buy POSIX
06 hours
Part B
4. Intertask communication and Synchronization:
Buffering data Time relative buffering, ring buffers, mailboxes mailboxes and
semaphores, counting semaphores, problems with semaphores, the test and set
instruction, event flags and signals, deadlock avoidance, detect and recover, priority
inversion.
10 hours
5. Real time memory management: 06 hours
2
-
7/28/2019 TTGVS
3/14
Department of Instrumentation Technology
R.V. College of Engineering, Bangalore
Process stack management, task control block model, managing the stack, run time
ring buffer, maximum stack size, multiple stack arrangements, task control block
model, dynamic allocation swapping, overlays, MFT, MVT, demand paging,
working sets, real-time garbage collection, contiguous fils systems; static schemes.
Part - C
6. Interrupt servicing mechanism:
Context and the periods for context switching; deadline and interrupt latency,
language features: parameter passing, recursion, dynamic allocation, typing,
exception handling, abstract data typing.
5hours
7. Case studies:
Vx Works and MuCOS05hours
Reference Books:
1. Philip A Laplante Real time systems design and analysis and engineers handbook,
PHI publication, Second edition, 2000
2. Rajkamal Embedded systems architecture programming and design Tata McGraw
Hill, 2004.
3. Dr. K.V.K.K Prasad Embedded/Real time systems: concepts, design and
programming, Dreamtech press, 2005.
4. Steve Heath, Embedded systems design:, Second edition.
5. Krishna and shinkong Real time systems, McGraw Hill Publications, 2nd edition.
Evaluation Scheme
3
-
7/28/2019 TTGVS
4/14
Department of Instrumentation Technology
R.V. College of Engineering, Bangalore
CIE Scheme
Best out of 2 Quiz and 2 Internals will be considered for CIE marks.
Course Unitization for Internals and Semester End Examination
Part Chapter Teaching
Hours
No. of Questions in No. of
Questions in
SEEInternals
I
Internals
II
Compensatory
Internals
A
1 Basic real time
concepts
32 - -
32 Real time
specification anddesign techniques
7
3 - -
3 Real time kernels 6 2 -
B
4 Intertask
communicationand
Synchronization
10
- 2 -
35 Real time
memory
management
6
- 1
C
6 Interrupt
servicing
mechanism
5
- - 32
7 Case studies 5 - - 2
Note:
1. Eight questions will be asked in the internals out of which student should answer five
questions. Each question carries 10 Marks.
2. Eight questions will be asked in the Examination out of which student should answer
five questions choosing atleast Two from PART-A, One from PART-B and Two from
PART-C.
Faculty In-charge Head of Department
4
Assessment Weightage in Marks
2 Quiz 20
2 Internals 30
Total 50
-
7/28/2019 TTGVS
5/14
Department of Instrumentation Technology
R.V. College of Engineering, Bangalore
Date:
5
-
7/28/2019 TTGVS
6/14
Department of Instrumentation Technology
R.V. College of Engineering, Bangalore
Chapter wise Plan
Part A
Course Code and Title: (07IT73 ) REAL TIME SYSTEMS AND APPLICATIONS AND LAB
Chapter Number and Title:01 Basic Real-Time Concepts Planned Hours:04 hrs
Learning Objectives
1. This chapter will explore through the basics of RTOS, and also helps to master the
command set.
2. The multiprogramming, multiuser and multitasking nature of RTOS.
3. What System calls are and how they enrich the RTOS programming environment.
4. The other features of RTOS its vast collection of tools, pattern matching and wide
variety of its documentation sources.
Lesson Schedule
Class No. Portion covered per hour
1. Basic computer architecture bus transfer mechanism, input and output memory,
CPU operation.
2. Terminology, software concepts, system concepts, real time definitions, events and
determination.
3. Synchronous and asynchronous events, determinism, time loading; real time design
issues.
Model Questions
6
1.
What are hard, firm and Soft Real Time systems? Consider a payroll processing
system for a small manufacturing firm. Describe three different scenarios in which
the system can be justified as hard, firm or soft real time.
2.
Define response time. Model a real time system describing its features and how it is
different from a typical I/O system.
3.When can we say that a system is deterministic? Illustrate it with an example.
4.What do we mean by CPU utilization? Enumerate scenarios where CPU utilization
factor is essential in determining its performance.
5.
What are the services offered by Kernel? Describe a pre-emptive and non-
preemptive kernel highlighting the difference between the two.
-
7/28/2019 TTGVS
7/14
Department of Instrumentation Technology
R.V. College of Engineering, Bangalore
Learning Objectives
1. This chapter helps in developing knowledge in languages required for basic
programming and mathematical specifications
2. Discern in depth about formulating flowcharts and state charts for different real timeproblems.
3. Be acquainted with pseudo code generation for a problem.
4. Be familiar with petrinets ,data flow diagrams and orthogonality.
Lesson Schedule
Class No. Portion covered per hour
1. Natural languages: mathematical specifications
2. Flow charts, structure charts
3. Pseudo code and programming design languages
4. Finite state automata
5. Data flow diagrams DeMarcos rules, Hately and Pribhais extensions
6. Petri nets, warnier-orr notation Indexed loop, state charts depth
7. Orthogonality, broadcast communication, sanity in using graphical techniques
Model Questions
1. What are the disadvantages of modeling using state chart
2. Taking an example of a digital clock, model it using the state chart. state all the
assumptions made.
3. How is state chart better than FSM modeling an embedded system.
4. Describe finite state automata with a example.
5. Explain about data flow diagrams. and Demarcos rules.
6. What are petrinets ? show a typical petrinet and firing for typical petrinet?
7. With an explain pseudo code for an automatic teller machine.
7
Course Code and Title: (07IT73 ) REAL TIME SYSTEMS AND APPLICATIONS AND LAB
Chapter Number and Title:02Real-Time specification and Design Techniques Planned Hours: 06hrs
-
7/28/2019 TTGVS
8/14
Department of Instrumentation Technology
R.V. College of Engineering, Bangalore
Learning Objectives
1. Comprehend pooled loop systems and polled loop with interrupts.
2. Identify phase and state driven systems and co routines and their significance in rael
time design.
3. Distinguish between Round robin and pre emptive systems and their importance.
4. Realize full featured RTOS.
Lesson Schedule
Class No. Portion covered per hour
1. Polled loop system, polled loop with interrupts
2. Phase/state driven code, coroutines
3. Interrupt driven systems, context switching
4. Round robin systems, pre emptive priority systems, major and minor cycles, hybrid
systems
5. Foreground-background systems, background processing, initialization, real-time
operation
6. Full featured real time operation systems Task control block model, Build or buy
POSIX
Model Questions
1. What is interrupt-only driven system? Explain a foreground-background system
highlighting its improvement over interrupt only systems.
2.Describe the process how a co-routine executes with the help of a pseudo code.
3. What is interrupt-only driven system? Explain a foreground-background system
highlighting its improvement over interrupt only systems.
4. What are cyclic executives? Construct a cyclic executive with four processes, 1, 2, 3,
4; Process_2 runs two times as frequently as Process_1 and Process_3 and Process_2
runs four times as frequently as Process_4.
5. Explain TCB model with different task states.
8
Course Code and Title: (07IT73 ) REAL TIME SYSTEMS AND APPLICATIONS AND LAB
Chapter Number and Title:03 Real-Time Kernels Planned Hours: 05 hrs
-
7/28/2019 TTGVS
9/14
Department of Instrumentation Technology
R.V. College of Engineering, Bangalore
Part - B
Learning Objectives
1. Be acquainted with the various buffering methods in real time system design.
2. Be familiar with semaphores and mailboxes and use them in programming.
3. Realize the importance of deadlock and deadlock avoidance in real time design.
4. Appreciate the significance of priority inversion and how to avoid it.
Lesson Schedule
Class No. Portion covered per hour
1. Buffering data Time relative buffering,
2. Ring buffers,
3. Mailboxes mailboxes
4. Semaphores, counting semaphores,
5. Problems with semaphores,
6. The test and set instruction,
7. Event flags and signals,
8. Deadlock avoidance,
9. Detect and recover,
10. Priority inversion.
Model Questions
1. What are the advantages of ring buffer over buffering or time-relative buffering?
2. With pseudo code, explain the operation of a ring buffer.
3. In brief, write a note on mailbox and message queue highlighting the difference
between the two concepts.
4. What are semaphores and where is it implemented?
5. Explain the types of semaphores available in an RTOS and illustrate with an example
of its utilization.
6. Explain priority inversion with an example and how to overcome it?
9
Course Code and Title: (07IT73 ) REAL TIME SYSTEMS AND APPLICATIONS AND LAB
Chapter Number and Title:04 Intertask communication and synchronization Planned Hours: 04 hrs
-
7/28/2019 TTGVS
10/14
Department of Instrumentation Technology
R.V. College of Engineering, Bangalore
Learning Objectives
1. Discern Dynamic memory management of any kind in real time systems.
2. Identify the techniques for managing stacks and task control blocks.
3. Value of memory management or paging of memory in real time systems.
Lesson Schedule
Class No. Portion covered per hour
1. Process stack management, task control block model, managing the stack, run time
ring buffer
2. Maximum stack size, multiple stack arrangements
3. Task control block model, dynamic allocation swapping, overlays
4. MFT, MVT, demand paging, working sets, real-time garbage collection
5. Contiguous fils systems; static schemes.
Model Questions
1. How does state chart better the FSM way of modeling embedded system?
2. Write a note on modeling hierarchy. Describe the history mechanism involved in a
state chart.
3. Taking an example of a digital clock, model it using the state chart. State all the
assumptions made.
4. What are the disadvantages of modeling using a state chart?
5. In memory management, how can we use a single list instead of multiple lists while
implementing the TCB model of real time multitasking? Mention its advantage and
disadvantage
6. Which technique allows single program to be larger than the allowable program
memory? Elaborate on the technique.
7. In demand memory page systems, when is page staling done? How do we access a
desired page by referencing via a page table?
8. What are the disadvantages of using memory paging?
9. Explain the concept of replacement algorithm. Take an example of a paged memory
system divided into sixteen 256kb pages of which any 5 can be loaded at the same
time
Part C
10
Course Code and Title: (07IT73 ) REAL TIME SYSTEMS AND APPLICATIONS AND LAB
Chapter Number and Title:05 Real-Time Memory Management Planned Hours: 03 hrs
-
7/28/2019 TTGVS
11/14
Department of Instrumentation Technology
R.V. College of Engineering, Bangalore
Learning Objectives
1. Significance of context switching in real time design.
2. Prediction of worst case performance in real time design.
3. Considering the trade off in time and memory requirements.
4. Value of exception handling.
Lesson Schedule
Class No. Portion covered per hour
1. Context and the periods for context switching;
2. Deadline and interrupt latency
3. Language features: parameter passing
4. Recursion, dynamic allocation, typing
5. Exception handling, abstract data typing.
Model Questions
1. Explain about context switching in detail2. What do you mean by dead line and interrupt latency in and RTOS
3. With the help of a pseudo code illustrate recursion
4. With the help of a pseudo code illustrate dynamic allocation
5. With the help of a pseudo code illustrate exception handling
6. Write short notes on abstract data typing and parameter passing
Learning Objectives
1. Real time communication tools and an impressive collection of email agents and tools.
2. Locking user information with Vx Works , online text chat withMuCOS.
11
Course Code and Title: (07IT73 ) REAL TIME SYSTEMS AND APPLICATIONS AND LAB
Chapter Number and Title:06 Interrupt Servicing mechanism Planned Hours: 04 hrs
Course Code and Title: (07IT73 ) REAL TIME SYSTEMS AND APPLICATIONS AND LAB
Chapter Number and Title:07 Case studies Planned Hours: 02 hrs
-
7/28/2019 TTGVS
12/14
Department of Instrumentation Technology
R.V. College of Engineering, Bangalore
Lesson Schedule
Class No. Portion covered per hour
1. Vx Works: Details of Users, mesg: Your Willingness to Communicate, write:
Communicating alternatively
2. MuCOS: Online Communication, wall: writing on all terminals, news: knowing the
local events, Email Basics, The mail command
Model Questions
1. Design a class diagram using UML for an Automatic Chocolate Vending Machine.
Also give examples for any one of class and object representations.
2. Design the hardware and software architectures for a Digital camera. State your
assumptions made for the performance of the system prior to the design.
12
-
7/28/2019 TTGVS
13/14
Department of Instrumentation Technology
R.V. College of Engineering, Bangalore
DEPARTMENT OF INSTRUMENTATION TECHNOLOGYR.V. COLLEGE OF ENGINEERING, BANGALORE 560 059.
Model Question Paper
REAL TIME SYSTEMS AND APPLICATIONS AND LAB
Semester VII Sem B.E Subject Code: 07IT73
DATE: Max. Marks: 100 Marks
TIME: Exam Time
Note:1. Answer five questions choosing at least Two from PART-A, One from PART-B and Two from
PART-C.
2. Write neat diagrams wherever required.
PART A
1 a) Define synchronous and asynchronous events.map them against periodic aperiodic
and sporadic event.
b) Discuss whether the following are hard, soft or firm real-time system: (a) The library
of a congress print manuscript database system. (b) Automatic teller machine
c) What are the design issues we come across dealing with real time systems? give oneexample of an RTS you come across on day to day basis and enumerate the design
issues of that system.
[06]
[04]
2 a) Explain basic petrinet. model a system on an assembly line that counts 5 items and
then sends a signal to the operator.
b) Determine whether the following set is RM schedulable or not. If not schedule it with
EDF [T1(5,8),T2(1,9),T3(1,5)]
[10]
[10]
3 a) What are the disadvantages of EDF over fixed priority algorithm? Show the rmschedule of
i si ei Pi=di
1 0 2 5
2 1 1 4
3 2 2 20
b) When is an ISR said to be re-entrant?
c) Explain a context switch with a pseudo code. why should it be minimized?
[10]
[02]
[10]
13
-
7/28/2019 TTGVS
14/14
Department of Instrumentation Technology
R.V. College of Engineering, Bangalore
PART B
4 a) What are the ways to avoid deadlock in intertask communication? explain bankers
algorithm illustrating safe and unsafe states for 3 process.
b) When does priority inversion occur? How does priority inheritance protocol solvesinversion problem . describe both with timing diagrams
[10]
[10]
5 a) Discuss issues related to buffering data using global variables. How is time related
buffering done by readers and writers problem.
b) Give an example of mailbox implementation which has 4 tasks and 3 recourses. Draw
task resource request table and resource table and state your assumptions.
c) Write short note on critical region with example.
[10]
[06]
[04]
6 a) What are the basic differences between a mutex and a semaphore? Illustrate their
implementation in detail with pseudo code.
b) Explain process stack management using run time stack and TCB model.
[10]
[10]
PART C
7 a) What do you mean by throwing an exception? How is the exception condition during
execution of a function handled.
b) Why is the context switching in an embedded processor faster than saving the pointers
and variables on the stack using stack pointer. How does the context switching time
reduce in processor architectures for embedded system.
[10]
[10]
8 a) Design a class diagram using UML for an Automatic Chocolate Vending Machine.
Also give examples for any one of class and object representations.
b) Design the hardware and software architectures for a Digital camera. State your
assumptions made for the performance of the system prior to the design.
[10]
[10]