You are on page 1of 23

Department of Automation & Robotics

FMTH0301/Rev.5.3
Course Plan
Semester: VI Year: Oct.2021 – Dec. 2021
Course Title: Real-Time Embedded Systems Course Code: 18EARC307
Total Contact Hours: 50 Duration of ESA Hours: 3
ESA Marks: 50 ISA Marks: 50
Lesson Plan Author: Dr Jyoti .S. Bali Date: 20-10-2021
Checked By: Prof. Arunkumar .C. Giriyapur Date: 20-10-2021

Course Outcomes (COs):


At the end of the course the student should be able to:
1. Demonstrate the knowledge of Real-Time Embedded Systems (RTES) by explaining
the basic need for real-time and embedded systems, related terminologies, concepts,
characteristics and configurations, and further the generic architectural features of controllers
essential to building real-time embedded systems.
2. Demonstrate the knowledge and skill in programming a real-time controller to suit the
needs of a real-time system design by writing programs based on exception handling,
interrupt handlers, multitasking and inter-task communication.
3. Demonstrate the knowledge and skill in RTOS programming by writing state charts
and pseudocode on various strategies, task scheduling, Inter -task communication, and
resource-sharing mimicking the real-time case studies.
4. Demonstrate knowledge and skill in identifying reference models b y defining the
workload model, resources model and algorithm attributes and further describes the real -time
embedded systems design workflow by following the hardware-software co-design
methodology during their course project activity.
5. Demonstrate the knowledge of building, analyzing and optimizing the performance of
real-time embedded systems during their project activity by reading the latest white papers
from leading industries/surveying of research reports and estimating the real-time system
performance characteristics of the built real-time system.

Page 1 of 23.
Department of Automation & Robotics

Course Articulation Matrix: Mapping of Course Outcomes with Program Outcomes

Course Title: Real-Time Embedded Systems Semester: VI


Course Code: 18EARC307 Year: Oct.2021 – Dec. 2021
Course Outcomes (CO) / Program Outcomes (PO) 1 2 3 4 5 6 7 8 9 10 11 12 13 14

1.Demonstrate the knowledge of Real-Time


Embedded Systems (RTES), by explaining the
basic need for real-time and embedded systems
along with related terminologies, concepts, H H
characteristics and configurations, and further the
generic architectural features of controllers
essential to building real-time embedded systems.
2.Demonstrate the knowledge of Real-Time
Embedded Systems (RTES), by explaining the
basic need for real-time and embedded systems
along with related terminologies, concepts, H H H H
characteristics and configurations, and further the
generic architectural features of controllers
essential to building real-time embedded systems
3.Demonstrate the knowledge and skill in RTOS
programming by writing state-charts and
pseudocode on various strategies, namely, task H
scheduling, Inter-task communication and resource-
sharing mimicking the real-time case studies
4.Demonstrate knowledge and skill in identifying
reference models by defining the workload model,
resources model and algorithm attributes and
further describe the real-time embedded systems H H H H
design workflow by following the hardware-software
co-design methodology during their course project
activity.
5.Demonstrate the knowledge of building, analyzing
and optimizing the performance of real-time
embedded systems during their project activity by
reading the latest white papers from leading H H H H
industries/surveying of research reports and finally
estimating the real-time system performance
characteristics of the built real-time system.

The degree of compliance L: Low M: Medium H: High

Competency addressed in the Course and corresponding Performance Indicators.

Page 2 of 23.
Department of Automation & Robotics

Competency Performance Indicators Planned Activity


1.4 Demonstrate competence 1.4.1 Apply discipline-specific laws and Course Project &
in specialized engineering principles to solve an engineering Case study
knowledge to the program problem presentation
2.2.1 - Develops from the qualitative Course Project &
description of the problem mathematical, Case study
2.2 Demonstrate an ability to physical or computational presentation
formulate a solution plan and models/solutions based on fundamental
methodology for an principles and justifiable assumptions
engineering problem 2.2.2 Partitions problems, processes, or
systems into manageable elements for
analysis, modeling or design
3.1 Demonstrate an ability to 3.1.3 Synthesize engineering Course project
generate a diverse set of requirements from a review of the state activity
alternative design solutions of the art
3.4.1 Refine a conceptual design into a Course Project &
3.4 Demonstrate an ability to
detailed design within the existing Case study
advance an engineering design
constraints presentation
to defined end state
4.1 Demonstrate their ability to Course Project &
conduct investigations of Case study
4.1.1 Define a problem, for purposes of
technical issues consistent with presentation, Survey
investigation, its scope, and importance
their level of knowledge and Paper activity
understanding
5.1.1 - Identify modern engineering Course Project &
5.1 Demonstrate an ability to
tools, techniques, and resources for Case study
identify/ create modern
engineering activities. presentation
engineering tools, techniques,
5.1.2 - Create/adapt/modify/extend tools
and resources
and techniques to solve problems
5.3 Demonstrate an ability to 5.3.2 Verify the credibility of results from
evaluate the suitability and tool use concerning the accuracy and Course Project
limitations of the tools used to limitations, and the assumptions
solve an engineering problem inherent in their use
7.1 Demonstrate an Case study
understanding of the impact of presentation, Survey
7.1.1 Identify risks/impacts in the life-
engineering and industrial Paper activity
cycle of an engineering product or
practice on social,
activity
environmental and economic
contexts
8.2 Demonstrate an ability to 8.2.2 Examine and apply moral and Survey Paper activity
apply the code of ethics ethical principles
9.3 Demonstrate success in a 9.3.1 Present results as a team, with Case-study
team-based project smooth integration of contributions from presentation, Survey

Page 3 of 23.
Department of Automation & Robotics

all individual efforts Paper activity, Course


project
10.1.1 Read, understand and interpret Case-study
10.1 Demonstrate an ability to technical and non-technical information presentation, Survey
comprehend technical 10.1.3 create a flow in a document or Paper activity
information presentation, a logical progression of
ideas so that the main point is clear
13.1.1 Develop system specification, Course Project
13.1 Demonstrate an ability to
identify I/O, control components and
design and integrate simple
field devices, Identify integration
automation systems
technologies

E.g., 1.2.3: Represents program outcome „1‟, competency „2‟ and performance indicator „3‟.

Page 4 of 23.
Department of Automation & Robotics

Course Content
Course Code: 18EARC307 Course Title: Real-Time Embedded Systems
L-T-P-S: 4-0-0-0 Credits: 4 Contact Hrs: 50
ISA Marks: 50 ESA Marks: 50 Total Marks: 100
Teaching Hrs: 50 Exam Duration: 3 hrs
Content Hrs
Unit - 1
1.0 Introduction to System Structures and Real-time Embedded System
Real-time systems, Classification, Core and Supporting components of the embedded
system, Embedded firmware, Example case studies with block diagrams, namely,
Process control system, Modern car. Purpose, Quality attributes, Challenges and 6
characteristics of Embedded Computing System Design, Embedded System Design
Process with case studies and State chart modeling - Automatic Chocolate Vending
Machine (ACVM)
2.0 Target Architectures : ARM Cortex M3 processors & its Programming
Introduction to embedded computing with examples and ARM processors, The
architectural features, Nested Vector Interrupt Controller(NVIC), Exceptions
7
Programming, advanced programming Features. Memory Protection and Debug
Architecture. Advanced Processor technologies for embedded system design. Case
studies: Engine Control Unit, Antilock Brake System(ABS)
3.0 Real-Time Kernels and Operating Systems
Introduction to Real-Time Kernels and Real-Time operating System( RTOS), key
characteristics, services of RTOS, components in RTOS kernel, context switching, Task
scheduling, Task communication and Synchronization, Multiprocessing and multitasking,
Multi-Threading, Hyper-threading, Scheduling types: Preemptive priority-based
scheduling, Round-robin and preemptive scheduling. First-come First-Serve scheduling, 7
Shortest Job First scheduling, Examples for each type using State diagrams and timing
diagrams, Device drivers and selection criteria of an RTOS. Case study on Mars
Pathfinder mission.
Unit - 2
4.0 Inter-task Communication in RTOS
Tasks, Semaphores, mutual exclusion (MUTEX) semaphore, Mail Box a nd Message
Queues with finite state machines, Synchronization between two tasks and multiple 7
tasks, Single shared-resource-access Synchronization, Case-study on Weapons
Dispense System
5.0 Tasks and Task Management
RTOS - task creation and Management, task scheduling, kernel services, inter-task-
communication, Demo and Problem solving on Task creation and management 7
functions using Open source tools. Discussion of Case studies on Industrial Robot and
Adaptive Cruise control
6.0 Handling Deadlocks
Sharing Resources, Deadlock Model- Necessary Conditions, Resource Allocation
6
Graph, Handling Deadlocks, Deadlock Prevention, Deadlock Avoidance, Deadlock
Detection, Handling of deadlocks, through a case study: The Dynamic Dining

Page 5 of 23.
Department of Automation & Robotics

Philosopher problem.
Unit - 3
7.0 Performance Analysis and Optimization
Performance or Efficiency Measures, Complexity Analysis of the methodology, Analyzing
Code, algorithms, Response Time, Time Loading, Memory Loading, Evaluating
5
Performance, Performance Optimization, optimizing for Power Consumption.
Demonstration of concepts of Performance Analysis and Optimization through a case
study.
8.0 Wired and Wireless Protocols used in Real-Time Embedded System:
Bus communication protocol (USB, I2C, SPI), Wireless and mobile system protocol
5
(Bluetooth, 802.11 and its variants, ZigBee), Examples of block diagrams to explain the
working of each protocol with real-time case studies.

Text Books:
1. James K. Peckol, “ Embedded Systems A Contemporary Design Tool,” Wiley student
edition
2. Joseph Yiu “ The Definitive Guide to the ARM Cortex–M3”
3. Silberschatz, Galvin, and Gagne, ”Operating system concepts,” 8th edition, WILEY
Publication.

References:
1. Shibu K V, “Introduction to Embedded Systems Tata McGraw Hill, New Delhi, 6 th reprint
2012.
2. Raj Kamal,” Embedded Systems,” McGraw-Hill Education
3. Steve Furber, “ARM System-on-Chip Architecture” LPE, Second Edition.

Evaluation Scheme
ISA Scheme
Assessment Weightage in Marks
Minor Exam 1 15
Minor Exam 2 15
Survey paper activity 10
Quiz & Assignment 10
Total 50

Course Unitization for Minor Exams and End Semester Assessment


Unit Chapter Teachin No. of Questions No. of

Page 6 of 23.
Department of Automation & Robotics

g Hours Minor Minor Activity Questions


Exam I Exam II in ESA
Introduction to System Structures and
1 6 1 1
Real-Time Embedded System
Target Architectures: ARM Cortex M3
I 2 7 1 1 1
processors & its Programming
Real-Time Kernels and Operating
3 7 1 1 1
Systems
4 Inter-task Communication in RTOS 7 1 1
5 Tasks and Task Management 7 1 1
II
6 Handling Deadlocks 6 1 1
7 Performance Analysis & Optimization 5 1
III Wired and Wireless Protocols used in
8 5 1
Real-Time Embedded System

Note:
● Each question carries 20 marks and may consist of sub-questions.
● Mixing of sub-questions from different chapters within a unit (only for Unit I and Unit
II) is allowed in ESA.

Date:20-10-2021 Head of Department

Course Title: Real-Time Embedded Systems Code: 18EARC307


Course outcomes (COs) Weightage Assessment Methods

Page 7 of 23.
Department of Automation & Robotics

in Minor Minor
Activity ESA
Assessment Exam 1 Exam 2
1. Introduction to System
Structures and Real-Time 12% ✓ ✓
Embedded System
2. Target Architectures: ARM
Cortex M3 processors & its 14% ✓ ✓ ✓
Programming

3. Real-Time Kernels and


14% ✓ ✓ ✓
Operating Systems
4. Inter-task Communication in
14% ✓ ✓
RTOS

5. Tasks and Task Management 14% ✓
6. Handling Deadlocks 12% ✓ ✓
7. Performance Analysis & ✓
10%
Optimization
8. Wired and Wireless Protocols
used in Real-Time Embedded 10% ✓
System
Weightage 15% 15% 20% 50%

Page 8 of 23.
Department of Automation & Robotics

Chapter-wise Plan UNIT I

Course Code and Title: 18EARC307, Real-Time Embedded Systems


Chapter Number and Title: 1. Introduction to System Structures,
Planned Hours: 7
Embedded System and Operating System

Learning Objectives
At the end of this chapter, the student should be able to:
S.
N TLO‟s CO BL CA Code
o
Define the basic terminologies, system structures, Architectural
features, types of classification, Core and Supporting components,
1 1 L2 2.1
Embedded firmware features related to Real-time Embedded
systems (RTES).
Develop the concept of imbibing the Real-time behaviour in the
system by using the quality attributes and characteristics of
2 1 L4 2.1
Embedded Computing System Design while overcoming the
challenges in building RTES.
Explain the principle of operation of hardware and software
3 1 L2 1.4
components.
Explain the processes involved in the case study, Automatic
4 Chocolate Vending Machine (ACVM) and draw the equivalent 1 L3 1.4
state chart model.

Lesson Schedule

Class No. The portion covered per hour


1. Real-time systems, classification
2. Core and Supporting components of the embedded system, Embedded firmware
3. Example case study: Process control system, Modern car.
4. Purpose, Quality attributes, Challenges in Embedded Computing
5. characteristics of Embedded Computing, System Design
6. Embedded System Design Process case study Automatic-Chocolate Vending
Machine (ACVM)
7. State chart modeling (ACVM)

Page 9 of 23.
Department of Automation & Robotics

Review Questions
S. TL PI
Questions BL
No O Code
Write a note on the types of System structures used for system
1 1 L2 2.1.1
development
2 Discuss the characteristics, classification of Operating systems 2 L2 2.1.1
3 How does a real-time system differ from an ordinary system 3 L3 2.2.2
Discuss the architecture of an Embedded system and the relevance
4 4 L2 2.2.1
of every block
5 Explain the components of a typical embedded system in detail. 4 L2 1.4.1
Which are the components used as the core of an embedded
6 system? Explain the metrics, drawbacks, if any, and the 5 L2 1.4.1
application/domain where they are commonly used.
What are the advantages of FLASH over other program storage 6
7 L2 1.4.1
memory in Embedded system design?
What are the different types of RAM used for Embedded System
8 3 L2 1.4.1
design?
9 Explain in detail the chosen real-time case-study problem. 3 L2 4.1.1
12 Explain embedded firmware with an example problem. 2 L2 4.1.1

Course Code and Title: 18EARC307, Real-Time Embedded Systems


Chapter Number and Title: 2. Target Architectures: ARM Cortex Planned Hours: 7
M3 processors & its Programming

Learning Objectives
At the end of this chapter, the student should be able to:

S. CA
TLO‟s CO BL
No Code
Explain the features of Embedded computing using ARM
1 2 L2 5.1
processor architectural features and the supporting examples.
Develop concepts on advanced programming features, namely,
2 Nested Vector Interrupt Controller(NVIC) and Exceptions 2 L4 5.1
Programming.
Explain the advanced Processor technologies for embedded
3 system design, namely, Memory Protection and Debug 2 L2 13.1
Architecture.
Describe the processes involved in the following case studies:
4 Engine Control Unit and Antilock Brake System(ABS) using state 2 L3 13.1
charts..

Page 10 of 23.
Department of Automation & Robotics

Review Questions
S.N Questions TLO BL PI Code
o
1 Describe the architecture of the ARM Cortex- M3 processor. 1 L2 5.1.1
Explain the modes of operation, memory mapping and bus
2 2 L2 5.1.1
interface systems in ARM CortexM3
What do you mean by the term „Exception‟? Explain exception
3 2 L2 5.1.1
handling capability ARM CortexM3
Discuss how ARM CortexM3 helps build deterministic interrupt
4 handling for a predictable response concerning a real-time case- 3 L3 13.1.1
study problem.
Describe the advantages of target architectures DSP & FPGA
5 4 L2 13.1.1
used in real-time systems
What is a PLD? Show its working by the AND-OR plane
6 5 L3 13.1.1
implementation of half adder circuit.

Course Code and Title: 18EARC307, Real-Time Embedded Systems


Chapter Number and Title: 3. Real-Time Kernels and Operating
Planned Hours: 7
Systems

Learning Objectives
At the end of this chapter, the student should be able to:

S. TLO‟s
CO BL CA Code
No
Define the basic terminologies and components in the Real-Time
1 Operating System( RTOS) kernel and list RTOS's key 2 L2 4.1
characteristics and services.
Develop the concepts of necessity for Real-Time Kernels and
2 RTOS) and use of techniques, namely, context switching, task
3 L3 4.1
scheduling
and task communication and Synchronization.
3 Explain the selection criteria of an RTOS, use of scheduling
3 L4 4.1
Techniques and device drivers for a selected application.
4 Analyze the real-time processes involved in the case study on
3 L4 4.1
the Mars Pathfinder mission using state chart models.

Page 11 of 23.
Department of Automation & Robotics

Lesson Schedule

Class No. The portion covered per hour


15.0 Introduction to Real-time kernels and Operating system basics, Task
scheduling
16.0 Task Scheduling types, Examples
17.0 Task communication and Synchronization,
18.0 Multiprocessing and multitasking, Kernel objects
19.0 Device drivers and Selection criteria of RTOS
20.0 Case study on Mars PathFinder Mission

Review Questions
S. PI
Questions TLO BL
No Code
Explain, What is an operating system? Where it is used, and
1 1 L2 4.1.1
what are its primary functions?
Explain the difference between the memory management of the 4.1.1
2 1 L2
general-purpose kernel and a real-time kernel.
What is a task control block (TCB)? Explain the structure of 4.1.1
3 2 L2
TCB.
What is Inter-process communication (IPC)? Give an overview 4.1.1
of different IPC mechanisms adopted by various operating
4 2 L2
systems? Explain using an example of a real-time case-study
problem.
Three processes with process IDs P1, P2, P3 with estimated 4.1.1
completion times 8, 4, 7 ms respectively enter the ready queue
in the order P3, P1, P2. P1 contains an I/O waiting time of 2ms
when it completes 4ms of its execution. P2 and P3 do not
5 3 L3
contain any I/o waiting. Calculate the waiting time and Turn
Around Time (TAT) for each process and the average waiting
and Turn Around Time in the LIFO scheduling. All the estimated
execution completion times is excluding I/O wait time.
4.1.1
6 Explain the architecture of device drivers. 3 L2

7 Write a brief note on the selection of RTOS 4 L2 4.1.1

4.1.1
8 Bring out the differences between semaphore and mutex 4 L2
Differentiate between Preemptive and non-preemptive 4.1.1
9 5 L2
scheduling.
10 Explain the single and recursive sharing of resources 5 L2 4.1.1

Page 12 of 23.
Department of Automation & Robotics

4.1.1
11 With an example, discuss the round-robin scheduling. 5 L2
What is a process? Describe the process states with the help of 4.1.1
12 6 L2
a process transition diagram?
Explain the procedure involved in context switching while doing 4.1.1
13 6 L2
multitasking
14 With a neat diagram, explain process states. 6 L2 4.1.1

Question Paper Title: Model Question Paper for Minor Exam I ( ISA)
Total Duration (H: Course: Real-Time Embedded Maximum Marks: 60
M):1:15 Systems Course Code: 18EARC307
Note: Answer any two total questions
Q. Questions Marks CO BL PO PI
No. Code
1a Explain the characteristic of an embedded system 10 1 L2 13 13.1.1
along with its architectural diagram.
1b Which are the components used as the core of an 10 1 L3 5 4.1.1
embedded system? Explain the metrics, drawbacks, if
any, and the application/domain where they are
commonly used.
2a Discuss how ARM CortexM3 helps in building 10 2 L2 5 4.1.1
deterministic interrupt handling for predictable
responses in automobiles. Give an example of a real-
time case-study problem.
2b Explain the following two techniques used by the NVIC 10 2 L2 5 4.1.1
of Cortex M3 to decrease the interrupt latency. Show
the relevant timing diagrams
(i) tail-chaining (ii) Late arrivals
3a Discuss the different functional and non-functional 10 3 L2 13 13.1.1
requirements that need to be addressed in the
selection of RTOS
3b Discuss the essential kernel services of an operating 10 3 L3 13 13.1.1
system and give the classification of the operating
system.

Assignment Case study Presentation Performance Indicators


Students in a team of 3 members shall present a real-world case study 1.4.1, 2.2.1, 2.2.2,
problem for the complete analysis and relation to real-time embedded 3.1.3, 3.4.1, 4.1.1,
system concepts 9.3.1, 10.1.1, 10.1.3

Page 13 of 23.
Department of Automation & Robotics

Chapter-wise Plan UNIT II

Course Code and Title: 18EARC307, Real-Time Embedded Systems


Chapter Number and Title: 4.0 Inter-task Communication in
Planned Hours: 7
RTOS

Learning Objectives
At the end of this chapter, the student should be able to:

S. TLO‟s CA
CO BL
No Code
Define the basic terminologies related to Task, Task scheduling
1.
and Inter-task Communication.
Develop the concepts on RTOS objects for Inter-task
2. Communication, namely, Semaphore, Buffer, Mailbox, Message 4 L2 13.1
Queue and writing of pseudocode etc.
Explain the procedures involved in Synchronization between two
3. tasks and across multiple tasks and Single shared-resource- 4 L2 13.1
access Synchronization.
Demonstrate using a state chart model and Pseudocode program
4. for implementing Inter-Task communication to demonstrate RTOS 4 L2 13.1
concepts for a real-time control system case study.

Lesson Schedule

Class No. The portion covered per hour


21.0 Introduction to Tasks, Semaphores and Message Queues
22.0 A typical finite state machine with an example.
23.0 Semaphore structure types, Synchronization between multiple tasks, Examples
24.0 Shared-resource-access Synchronization, Message queue, its structure
25.0 Message Queue operations with Examples, Sending messages in FIFO or LIFO
order, broadcasting messages
26.0 Demonstration of the objects of Inter-process communication
27.0 Case-study on Magnetic Resonance Imaging(MRI)

Page 14 of 23.
Department of Automation & Robotics

Review Questions
S.N
Questions TLO BL PI Code
o
Discuss how a semaphore can be used for inter-task
1 Synchronization, taking the example of a real-time case-study 1 L2 13.1.1
problem.
2 Bring out the differences between a semaphore and a mutex. 1 L2 1.4.1
3 Discuss the use of message queues, mailboxes and pipes. 2 L2 1.4.1
4 Explain the single and recursive sharing of resources. 1 L2 1.4.1
Write a short note on Sending messages in FIFO or LIFO order,
5 2 L2 1.4.1
broadcasting messages.
Develop an embedded system that takes analogue voice signal as
input, converts it into a digital format using an ADC, converts the
digital data into packets and sends the packet over a data network.
6 3 L3 13.1.1
List the various task in the embedded software. How do you
assign priorities to the task? Do you need an embedded operating
system? If so, what type of OS.
Discuss how a semaphore can be used for inter-task
7 3 L2 13.1.1
Synchronization.

Course Code and Title: 18EARC307, Real-Time Embedded Systems


Chapter Number and Title: 5.0 Tasks & Task Management Planned Hours: 7

Learning Objectives
At the end of this chapter, the student should be able to:

S B CA
TLO‟s CO
No L Code
Define the terminologies, namely, kernels, Microkernels, Nano
1 kernels and the services offered by each of them. 5 L2 13.1
Develop the basics of concepts, namely, RTOS-task creation and
2 5 L2 13.1
task management.
Describe the principles of task scheduling, inter-task-
3 communication for real-time case studies, namely, Industrial Robot/ 5 L2 13.1
Adaptive Cruise control System.
Solve problems on Task creation and task management functions
4 5 L2 13.1
using pseudocode and state chart modeling.

Page 15 of 23.
Department of Automation & Robotics

Lesson Schedule

Class No. The portion covered per hour


28.0 RTOS- task creation and Management, Task scheduling, kernel services
29.0 Inter-task-communication, Task creation and Management using RTOS
30.0 Task scheduling, Kernel services
31.0 Demo on Task creation and management functions.
32.0 A case study on Industrial Robot
33.0 A case study on Weapons Dispense System
34.0 A case study on Adaptive Cruise control

Review Questions

S.
Questions TLO BL PI Code
No
Explain the exception handling mechanisms for tasks and
1 interrupts under the RTOS kernel, taking an example of a real-time 1 L2 13.1.1
case-study problem.
Create a POSIX based message queue under RTOS for
2 communicating between two tasks as per given requirements for a 2 L3 13.1.1
given example of a real-time case-study problem.
3 Explain the watch-dog timer operation under RTOS Kernel. 3 L2 13.1.1
Write a complete RTOS program for implementing multitasking as
4 per the given requirements for a given example of a real-time 4 L3 13.1.1
case-study problem.
Explain the different mutual exclusion mechanisms supported by
5 5 L2 13.1.1
the RTOS kernel. State the relative merits and limitations of each.

Course Code and Title: 18EARC307, Real-Time Embedded Systems


Chapter Number and Title: 6. Handling Deadlocks Planned Hours: 6

Learning Objectives
At the end of this chapter, the student should be able to:

Sr.No TLO‟s CA
CO BL
Code
1 Define the Deadlock scenario and list the conditions that
6 L2 4.1
describe the deadlock situation.
2 Develop concepts of Deadlock occurrence, Resource
6 L2 4.1
Management, and, Sharing of Resources.

Page 16 of 23.
Department of Automation & Robotics

3 Explain the principles of Deadlock Avoidance, Deadlock


Detection, Handling of deadlocks, and Resource 6 L2 4.1
Management.
4 Draw the Resource allocation graph for the given case study
6 L3 4.1
problem.
5 Explain the strategies of deadlock management, namely,
6 L2 4.1
Banker‟s algorithm and Dining Philosopher problem.

Lesson Schedule

Class No. The portion covered per hour


35.0 Sharing Resources, Deadlock Model- Necessary Conditions,
36.0 A Graph-Theoretic Tool: The Resource Allocation Graph,
37.0 Handling Deadlocks, Deadlock Prevention, Deadlock Avoidance,
38.0 Deadlock Detection, Demonstration on Handling of deadlocks
39.0 Demo on Deadlock identification through a case study
40.0 The Dynamic Dining Philosopher problem.

Review Questions
S.N PI
Questions TLO BL
o Code
Explain what a deadlock is? What are the different conditions
1 1 L2 4.1.1
favouring deadlock?
Explain the Dining Philosophers problem in the process
2 2 L2 4.1.1
synchronization context.
3 Discuss various deadlock prevention methods. 3 L2 4.1.1
Explain Banker‟ algorithm for safe states using a resource
4 4 L2 4.1.1
allocation graph for a given real-time case-study problem.
Describe what should be considered when using a termination
5 strategy to recover from a deadlock with a real-time case-study 5 L2 4.1.1
problem.

Survey Paper Activity Performance


Indicators
Students in a team of 3 members shall present a survey paper based on 5.3.2, 8.2.2, 9.3.1,
the overview of available state of the art technologies, standards and the 10.1.1, 10.1.3, 13.1.1
recent research activity in the area of an identified case-study problem

Page 17 of 23.
Department of Automation & Robotics

Question Paper Title: Model Question Paper for Minor Exam II (ISA)
Total Duration (H: M):1.15 Course: Real-Time Embedded Systems Maximum Marks: 60
Course Code: 18EARC307
Note: Answer any two full questions
Q.No Questions Mark C BL P PI
s O O Code
1a Discuss the use of message queues, mailboxes, and pipes 10 4 L3 5 4.1.1
1b Discuss how a semaphore can be used for inter-task
Synchronization concerning any real-time case-study 10 4 L3 13 13.1.1
problem.
2a Write an RTOS multitasking application to create two tasks 4.1.1
as per the following requirements
(i) The stack size for the tasks are 2000
(ii) priority for both the tasks are 100
(iii) Task 1 prints the message “Hell from Task 1”
10 5 L2 5
continuously with a delay of 500 timer ticks between
successive printing
(iv) Task 2 prints the message “Hell from Task 2”
continuously with a delay of 500 timer ticks between
successive printing
2b Explain the state transition under RTOS with a state 4.1.1
transition diagram. Give an example of the scenarios for 10 5 L3 5
each state transition.
3a What are the necessary conditions for a deadlock to
occur? Give a real-world case-study example in which a 10 6 L3 13 13.1.1
deadlock can occur.
3b Two tasks are sharing a FIFO queue. Either task can write
to or read from the FIFO.
(i) Hypothesize a situation in which deadlock can occur. 10 6 L2 13 13.1.1
(ii) Use the resource allocation graph to illustrate the
situation

Page 18 of 23.
Department of Automation & Robotics

Course Code and Title: 18EARC307, Real-Time Embedded Systems


Chapter Number and Title: 7. Performance Analysis and
Planned Hours: 5
Optimization

Learning Objectives
At the end of this chapter, the student should be able to:

S.
CA
N TLO‟s CO BL
Code
o
Define the terms, namely, performance measures, efficiency,
1 7 L2 7.1
complexity, response time and associated terminologies.
Develop concepts of performance or efficiency of the system,
2 time loading, memory loading and optimization using case study 7 L2 7.1
problems.
Discuss the when analyzing performance and for improving
3 7 L2 7.1
performance in time, power and memory access.

Lesson Schedule
Class No. The portion covered per hour

41.0 Performance or Efficiency Measures, Complexity Analysis, The Methodology


42.0 Analyzing Code, algorithms, Response Time, Time Loading
43.0 Memory Loading, Evaluating Performance, Optimization of Performance and
Power Consumption.
44.0 Performance Analysis and Optimization through a case study I
45.0 Performance Analysis and Optimization through a case-study II

Review Questions
S. Questions PI
TLO BL
No Code
1 Identify the primary criteria by which the performance of an
1 L2 7.1.1
embedded application may be measured.
2 What is complexity analysis? What is the purpose of
performing a complexity analysis of a software algorithm for a 2 L2 7.1.1
real-time case-study example?
3 Identify the major factors that can affect the time performance 3 L2 7.1.1

Page 19 of 23.
Department of Automation & Robotics

of an instruction.
4 Describe the methods by which we can perform a time loading
analysis of an embedded application. Discuss the advantages 4 L2 7.1.1
and disadvantages of each.
5 Describe each model used in analyzing the performance of an
embedded application and elaborate on the kind of information
5 L2 7.1.1
we are trying to gain from each model for a real-time case-
study example.
6 What are "tricks of the trade"? Discuss the use of these 5 L2 7.1.1
techniques in reducing time loading and response times
concerning a real-time case-study example.

Course Code and Title: 18EARC307, Real-Time Embedded Systems


Chapter Number and Title: 8. Wired and Wireless Protocols used in
Planned Hours: 5
Real-Time Embedded System

Learning Objectives
At the end of this chapter, the student should be able to:

Sr.No TLO‟s CO BL CA Code


1 Define the basic terminologies related to different
8 L2 7.1
communication protocols used in real-time embedded systems.
2 Develop the concepts of strategies used for communication
8 L2 7.1
using standard wired and wireless protocols.
3 Compare the advantages and unique features of each of the
8 L2 7.1
protocols in the chosen real-time case-study examples.

Lesson Schedule

Class No. The portion covered per hour


46. Wired Bus communication protocol (USB, I 2 C)
47. Bus communication protocol (SPI)
48. Wireless and mobile system protocol, Bluetooth, 802.11 and its variants, ZigBee
49. Example block diagrams on the use of each protocol for a specified application.
50. Example block diagrams on the use of each protocol for a specified application.

Page 20 of 23.
Department of Automation & Robotics

Review Questions
S. Questions PI
TLO BL
No Code
1 Explain the Bluetooth and 802.11 and their variants 1 2 7.1.1
Develop a C code to perform memory read and write using
2 2 3 7.1.1
SPI.
Develop a C code to program RTC to generate HOURS,
3 2 3 13.3.1
MINUTES And SECONDS using I2C protocol.

III. Course Project Activity Performance


Indicators
Students in a team of 3 members shall present a plan for implementation 5.3.2, 8.2.2, 9.3.1,
of solution based on Survey paper activity for the chosen case -study 10.1.1, 10.1.3, 13.1.1
problem through UML or state charts. The team shall follow the
Embedded System Design cycle steps to implement the solution in the
associated Lab.

Question Paper Title: Model Question Paper for End Semester Assessment
Total Duration (H: Course: Real-Time Embedded Systems Maximum Marks:
M):3 Course Code:18EARC307 100
Note: Answer five questions; any two full questions from each unit-I and Unit-II and one full
question from unit-III
UNIT I
Q. Questions Mar C BL P PI
No. ks O O Code
1a Explain the characteristic of an embedded system along with its 10 1 L2 3
3.4.1
architectural diagram.
1b Which are the components used as the core of an embedded 10 1 L2 3
system? Explain the metrics, drawbacks concerning a real-time 3.4.1
case-study example.
2a Explain the following two techniques used by the NVIC of Cortex
M3 to decrease the interrupt latency. Show the relevant timing 10 2 L2 3 3.4.1
diagrams:(i) tail-chaining (ii) Late arrivals
2b Realize switching function (2, 3, 4, 6, 7) using 2 input LUTs. Give
10 2 L3 3 3.4.1
the truth table implementation using FPGA.
3a What is task scheduling? Explain with example 10 3 L2 2 2.2.2
3b Develop a C code to perform the following tasks i. Flashing of LED
10 3 L3 2 2.2.2
ii. Displaying 00 to 99 on seven segments .use RTOS scheduling

Page 21 of 23.
Department of Automation & Robotics

algorithms.
An embedded system has three processes with the following
execution time and periods: P1(4,16), P2(3,8), P1(2,7).i) what is
the CPU utilization for such a system? ii)can the set of tasks be
scheduled using a monotonic rate schedule? (iii) if not, what
changes would have to be made to enable the set of tasks to be
scheduled in a rate monotonic schedule
UNIT II
4a Discuss the use of message queues, mailboxes, and pipes 10 4 L3 5 5.1.1
4b Discuss how a semaphore can be used for inter-task 13.1.
10 4 L3 13
Synchronization 1
5a Write an RTOS multitasking application to create two tasks as per
the following requirements.
(i) The stack size for the tasks are 2000
(ii) priority for both the tasks are 100
10 5 L2 5 5.1.2
(iii) Task 1 prints the message “Hello from Task 1” continuously
with a delay of 500 timer ticks between successive printing
(iv) Task 2 prints the message “Hello from Task 2” continuously
with a delay of 500 timer ticks between successive printing
5b Explain the state transition under RTOS with a state transition
diagram. Give an example of the scenarios for each state 10 5 L3 5 5.1.2
transition.
6a What are the necessary conditions for a deadlock to occur? Give 13.1.
10 6 L3 13
a real-world example in which a deadlock can occur 1
6b Two tasks are sharing a FIFO queue. Either task can write to or
read from the FIFO. 13.1.
10 6 L2 13
(i) Hypothesize a situation in which deadlock can occur. 1
(ii) Use the resource allocation graph to illustrate the situation
UNIT III
7a Identify the significant criteria, using which the performance of an 10 7 L3 4 4.1.1
embedded application can be analyzed. Do these criteria apply to
all embedded applications? Justify.
7b Describe the methods by which we can perform a time loading 10 7 L3 4 4.1.1
analysis of an embedded application. Discuss the advantages
and disadvantages of each.
8a Discuss the different embedded communication protocols 10 8 L3 7 7.1.1
8b Develop a C code to program RTC and generate a calendar 10 8 L3 7 7.1.1
using SPI protocol

Page 22 of 23.
Department of Automation & Robotics

Corrections Note:

Page 23 of 23.

You might also like