Beruflich Dokumente
Kultur Dokumente
(Question Bank)
Prepared By
Prof. N.SHANMUGASUNDARAM
Professor & Head, ECE Department,
VIDYAA VIKAS COLLEGE OF ENGINEERING AND TECHNOLOGY,
TRICHENGODE, NAMAKKAL DISTRICT - 637214
Embedded Systems- QB
ANNA UNIVERISTY OF TECHNOLOGY, COIMBATORE
B.E. (Electronics and Communication Engg)
Regulation 2007
SEMESTER –VII
REFERENCES:
1. K.V.K.K.Prasad “Embedded /Real-Time Systems: Concepts, Design and
Programming” Dream tech, Wiley 2003.
2. Ajay V Deshmukh “Microcontroller Theory and Applications” TMH 2005.
3. Raj Kamal “Embedded Systems Architecture Programming and Design” 2nd
Edition TMH, 2008.
4. David E Simon “An Embedded Software Primer” Pearson Education 2003.
5. Daniel W. Lewis, “Fundamentals of Embedded Software” Pearson Education-
2001.
6. Peatman “Designing with PIC Micro Controller”, Pearson 2003.
4. Give examples for Small, Medium & sophisticated scale embedded systems.
Small Scale Embedded System
Automatic chocolate vending machine
Stepper motor controller for a robotics system
Washing or cooking system
Multitasking toys
9. Define processor.
A processor is a Chip, which implements a process or processes as per the
command given to it.
Von-Neuman Architecture:
This architecture has common memory for both data and program codes.
Harvard Architecture:
This architecture has separate memory for data and program codes.
20. What are the differences between including a header file and a text
file or data file?
The differences between including a header file and a text file or data file are,
The header files are well tested and debugged modules.
They provide access to standard libraries.
The header file can include several text file or C files.
A text file is description of the text that contains specific information.
Boolean Bitwise
Operation
Operator Operator
Initialization of
structure variable members sue.age = 25;
sue.gender = ‘F’;
(or)
PERSON sue = {25, ‘F’};
typedef struct {
WORD16 seconds : 6,
minutes : 5,
hours : 5;
} TIME time1;
time1.hours = 13;
time1.minutes = 34;
time1.seconds = 18/2;
31 16 15 0
result.part.whole result.part.fract
JC - Jump if CF=1
JNC - Jump if CF=0
JS - Jump if SF=1
JNS - Jump if SF=0
Once: Once:
Once:
When the program Just before
Static When the
is first loaded into the program
program stops
the memory starts to run
By writing
By calling the By calling the
executable
Dynamic library function library function
statements that
malloc() free()
modify its content
Text book:
Peatman, “Designing with PIC Micro Controller”, Pearson education, 2003.
1. Define RTOS.
Operating System with real time task scheduling, interrupt-latency control,
Synchronization of tasks with IPCs, predictable timing and synchronization
behavior of the system.
13. What if two tasks with the same priority are ready?
There are two options in this situation. (1) RTOS should declare as illegal
when two tasks are assigned with same priority. (2) RTOS can time-slice
between two tasks that has the same priority.
19. What are the problems that may arise while using semaphores?
The problems that may while using semaphores are,
Sharing of two semaphores creates a deadlock problem.
Without a timeout an ISR worst-case latency may exceed the
deadline.
If a semaphore is not taken, and another task uses a shared
variable.
When using multiple semaphores, if an unintended task takes the
semaphore, it creates a problem.
It may introduce priority inversion problem.
24. Explain the term (i) Message Queue (ii) Mailbox (iii) Pipe (iv) Socket.
Message Queue
RTOS allows a task to send multiple messages into a FIFO queue for use
by another task(s) using queue message as an input.
Mailbox
RTOS allows a certain no. of messages to be stored in each mailbox.
Separate functions are used to identify the appropriate mailbox, to add
and read a message from the selected mailbox.
Pipe
Pipes are like queues. RTOS can create them, write to them, read from
them and so on.
Socket
It provides the logical link using a protocol between the tasks in a client-
server or peer-to-peer environment.
29. What is the difference between hardware timer and software timer?
Hardware timer gets the inputs from the internal clock with the processor
or system clock. A device driver program programs it like any other
physical device.
Software timer executes a program which increases or decreases a count
variable on an interrupt from a timer output or from a real-time clock
interrupt.
35. Explain the problem in using malloc() and free() functions for
memory management in RT embedded systems.
In real time embedded systems, malloc() and free() are avoided because
of their slow response and unpredictable execution times. Instead, most of
the RTOS offer fast and predictable functions along with free fixed size
buffers.
36. List the two rules that an interrupt routine must follow in RTOS
environment, that do not apply to task codes.
Rule-1:
An interrupt routine must not call any RTOS function that might block the
caller.
Rule-2:
An interrupt routine may not call any RTOS function that might cause the
RTOS to switch tasks unless the RTOS knows that an interrupt routine,
and not a task is executing.
A readily available, well tested and debugged RTOS thus not only
simplifies the coding process greatly for a developer, but also helps in
building a product fast; it aids in building robust and bug free software by
thorough testing and simulation before locating the codes into the
hardware.
Two C files for ISR and RTOS timer are os_tick.c and os_cpu_c.c
Assembly codes for task switching functions is os_cpu_a.s12
unsigned byte
Must call before running a task
OSTaskCreate (…)
unsigned byte
Called for blocking a task
OSTaskSuspend (..)
unsigned byte
Called for resuming a blocked task
OSTaskResume (..)
void OSTimeset (..) When system time is to be set
unsigned int
Find present count when time is read
OSTimeGet (void)
20. List the tasks involved in Automatic Chocolate Vending Machine (ACVM).
32. List special features needed in embedded software for smart card.
Protected environment (data stored in protected part of ROM)
Restricted Run-time environment
OS must be scalable in all aspects
Code size generated should be optimum
Limited use of data types
Three layered file system for data (master, elementary & dedicated)
Fixed length or variable length file management system with
predefined offset.
It should have classes for networks, sockets, connections, data
grams, character I/O streams, digital certification, DES/AES based
cryptography and digital signatures.