Professional Documents
Culture Documents
Noorul Islam College of Engineering Kumaracoil: Question Bank
Noorul Islam College of Engineering Kumaracoil: Question Bank
KUMARACOIL
EIGHTH SEMESTER
QUESTION BANK
Prepared By
J.Benita/I. Sowmy
Lecturer/ECE
RISC
It provides very few addressing
modes
It has a hardwired unit without a
control memory
Complex compiler design
Provide precise and intensive
calculations faster than a CISC
Unit-II
Devices and Buses for Devices Network
1. Differentiate synchronous communication and iso-synchronous communication.
Synchronous communication
When a byte or a frame of the data is received or transmitted at constant
time intervals with uniform phase difference, the communication is called synchronous
communication.
iso-synchronous communication
iso-synchronous communication is a special case when the maximum time
interval can be varied.
2. What are the two characteristics of synchronous communication?
Bytes maintain a constant phase difference
The clock is not always implicit to the synchronous data receiver.
3. What are the three ways of communication for a device?
iso-synchronous communication
synchronous communication
Asynchronous communication
4. Expand a) SPI b) SCI
SPIserial Peripheral Interface
SCISerial Communication Interface
5. Define software timer.
This is software that executes and increases or decreases a count variable on an
interrupt from a timer output or form a real time clock interrupt. A software timer can
also generate interrupt on overflow of count value or on finishing value of the count
variable.
6. What is I2C?
I2C is a serial bus for interconnecting ICs .It has a start bit and a stop bit like an
UART. It has seven fields for start,7 bit address, defining a read or a write, defining byte
as acknowledging byte, data byte, NACK and end.
5. What are the bits in I2C corresponding to?
It has seven fields for start,7 bit address, defining a read or a write, defining byte
as acknowledging byte, data byte, NACK and end
6. What is a CAN bus? Where is it used?
CAN is a serial bus for interconnecting a central Control network. It is mostly
used in automobiles. It has fields for bus arbitration bits, control bits for address and data
length data bits, CRC check bits, acknowledgement bits and ending bits.
Address
Control
Data
FCS
Flag
Arbitration Control
field
field
12
6
Data
field
0-64
CRC
field
16
Acknowledgement End of
field
frame
2
7
Unit III
Programming Concepts and Embedding Programming in C,C++
1. State some advantages of Assembly language?
It gives a precise control of the processor internal devices and full use of
processor specific features in its instruction set and its addressing modes.
The machine codes are compact.
With the help of assembly language the basic concepts could be easily
studied.
Memory required for the system is less.
Minimum assembly languages instruction only needed for device drivers.
2. Write the advantages of high level language?
Standard library functions
Modular programming approach
Bottom up design
Top down design
Data types
Type checking
Control structures
Portability
3. What is the most important feature in C that makes it a popular HLL for an
embedded system?
Inline assembly
Readily available modules and library functions.
4. Define In-line assembly
C is a language between low and high level language. Inserting the assembly
language codes in between is called in line assembly.
5. Distinguish the interpreter and compiler?
Compiler
1. Translation by the whole at a time.
2. Faster operation.
3. Error less program helps easier work
of compilation.
Interpreter
Translation goes by line to line.
Slower operation comparatively.
There is no compilation stage.
6. .List out some Include header files used in C language in embedded system?
#include<vxwork.h>
#include<semlib.h>
#include<tasklib.h>
#include<syslib.h>
When an operation is not atomic that function should not operate on any
variable which is declared outside the function or which an interrupt
service routine uses or which is a global variable but passed by reference
and not passed by value as an argument in to the function.
Reentrant function doesnt call any other function that is not itself
reentrant.
Unit IV
Real time Operating Systems Part -1
1. Name the important terms of RTOS?
Task
State
Scheduler
Shared data
Reentrancy
2. Define process.
Process is a computational unit that processes on a CPU under the control of a
scheduling kernel of an OS. It has a process structure, called Process control block.
A process defines a sequentially executing program and its state.
3. What is meant by PCB?
Process Control Block is abbreviated as PCB.PCB is a data structure which
contains all the information and components regarding with the process.
4. Define task and Task state.
A task is a set of computations or actions that processes on a CPU under the
control of a scheduling kernel. It also has a process control structure called a task control
block that saves at the memory. It has a unique ID. It has states in the system as follows:
idle, ready, running, blocked and finished
5. Define Task Control Block (TCB)
A memory block that holds information of program counter, memory map, the
signal dispatch table, signal mask, task ID, CPU state and a kernel stack.
6. Draw the process state transitions?
Aw ake
D is p a tc h
R u n n in g
B lo c k
T im e tu rn o u t
Ready
B lo c k e d
A s le e p
W akeup
7. What is a thread?
Thread is a concept in Java and UNIX and it is a light weight sub process or
process in an application program. It is controlled by the OS kernel. It has a process
structure, called thread stack, at the memory. It has a unique ID .It have states in the
system as follows: stating, running, blocked and finished.
8. Define Inter process communication.
An output from one task passed to another task through the scheduler and use of
signals, exception, semaphore, queues, mailbox, pipes, sockets, and RPC.
9. What is shared data problem?
If a variable is used in two different processes and another task if interrupts before
the operation on that data is completed then the value of the variable may differ from the
one expected if the earlier operation had been completed .This ids known as shared data
problem.
10. Define Semaphore.
Semaphore provides a mechanism to let a task wait till another finishes. It is a
way of synchronizing concurrent processing operations. When a semaphore is taken by a
task then that task has access to the necessary resources. When given the resources
unlock. Semaphore can be used as a event flag or as a resource key.
11. Define Mutex. A phenomenon for solving the shared data problem is known as
semaphore.
Mutex is a semaphore that gives at an instance two tasks mutually exclusive
access to resources.
12. Differentiate counting semaphore and binary semaphore.
Binary semaphore
When the value of binary semaphore is one it is assumed that no task has taken it
and that it has been released. When the value is 0 it is assumed that it has been taken.
Counting semaphore
Counting semaphore is a semaphore which can be taken and given number of
times. Counting semaphores are unsigned integers.
13. What is Priority inversion?
A problem in which a low priority task inadvertently does not release the process
for a higher priority task.
14. What is Deadlock situation?
A set of processes or threads is deadlocked when each process or thread is
waiting for a resource to be freed which is controlled by another process.
15. Define Message Queue.
A task sending the multiple FIFO or priority messages into a queue for use by
another task using queue messages as an input.
Unit V
Real time Operating Systems Part -2
1. Name any two important RTOS.
MUCOS
VxWorks
2. Write short notes on Vxworks?
Vxworks is a popular Real-time multi-tasking operating system for embedded
microprocessors and systems.
Vxworks can run on many target processors.
It is a UNIX like Real time operating system.
More Reliable
More faster
3. What is meant by well tested and debugged RTOS?
An RTOS which is thoroughly tested and debugged in a number of situations.
4. What is sophisticated multitasking embedded system?
A system that has multitasking needs with multiple features and in which the
tasks have deadlines that must be adhered to.
5. What are the features of UC/OS II?
Preemptive
Portable
Scalable
Multitasking
6. What is MICRO C/OS II?
It stands for micro-controller operating system(UC/OS II).
It is a real time kernel
The other names of MICROC/OS II are MUCOS and UCOS.
The codes are in C and Assembly language.
7. What are the real time system level functions in UC/OS II? State some?
1 Initiating the OS before starting the use of the RTOS fuctions.
2 Starting the use of RTOS multi-tasking functions and running the states.
3 Starting the use of RTOS system clock.
8. Write the interrupt handling functions?
int connect ( ) is the function for handling the Interrupt.
int Lock ( ) -> Disable Interrupts.
int unlock( ) -> Enable functions.
intVectGet()
intContext()
16 MARKS QUESTIONS
UNIT-I
Introduction to Embedded Systems
1. List the hardware units that must be present in the embedded systems.
Power source
Clock oscillator circuit
RTC
Reset ckts
Input ,output and I/O ports
Timers
Memory units
DAC and ADC
LCD and LED displays
Keyboard/Keypad
Interrupt handler
Pulse dialer
Modem and transceiver
2. i) Explain the Exemplary applications of each type of embedded system. (8)
Small Scale Embedded system
ACVM
Stepper motor controllers for a robotic system
Washing or cooking system
Multitasking toys
medium scale embedded systems
Router, a hub and a gateway
Entertainment systems
Banking systems
Signal tracking systems
Sophisticated embedded systems
Embedded system for wireless LAN
Embedded systems for real time video
Security products
ES for space lifeboat.
ii) Explain the different program layers in the embedded software and also the
process of converting a C program into the file for ROM image with suitable
block diagrams. (8)
Program layers
Preprocessor commands
Main functions
ISR
Tasks
Kernel and Scheduler
Library functions
Diagram: The process of converting a C program in to the file for ROM image.
Steps:
3. Explain the Embedded System on Chip (SoC) & in VLSI circuit.
Exemplary SoC for cell-phone
ASIP
IP core
Embedding a GPP
FPGA
Components in an Exemplary SoC
4. With a neat diagram Explain the components on an SoC for a contact less smart
card. (8)
Diagram
Components
ASIP
RAM
ROM
EEPROM
Timer and interrupt handler
A carrier frequency generating circuit and ASK Modulator
Interfacing circuit for the I/Os
Charge pump
Explanation
8. i) Explain the various form of memories present in a system (8)
Various forms of memories are
Explanation
RAM(internal External)
ROM
PROM
EEPROM
Flash
Cache memory
Editor
Interpreter
Compiler
Assembler
Cross assembler
Simulator
Source code engg software
RTOS
Stethoscope
Trace Scope
IDE
Prototyper
Locator
Explanation
9. Explain the processors in an Embedded System(16)
Processors in an ES
Unit-II
Devices and Buses for Devices Network
1. i) Explain the parallel port devices. (8)
Diagrams:
i) Parallel input port, output port and a bidirectional port for connecting
the device
ii) The handshaking signals when used by the I/O ports.
Characteristics taken into consideration when interfacing a device port.
ii) Characteristics taken into consideration when interfacing a device port. (8)
A port device may have Multibyte data input buffer and output buffer
A port may have a DDR.
Port may have LSTTL driving capability and port loading capability
Multiple functionality in ports
iii) Explain the sophisticated interfacing features in device ports. (8)
Schmitt trigger
Data Gate
HSTL,SSTL
XCITE
Multigigabyte Transceivers
SerDes
Multiple I/O standards
PCS
PMA
2. Explain the timer and counting devices
Definition
States
There are eleven states as follows
o Reset state
o Idle state
o Present state
o Over flow state
o Over run state
o Running state
o Reset enabled state / disabled
o Finished state
o Load enabled / disabled
o Auto reload enabled / disabled
o Service ratine execution enabled / disabled
Forms of timer
Diagram
Applications
Real Time clock
Watchdog timer
Input pulse counting
TDM
Scheduling of various tasks
3. i) Explain the signal using a transfer of byte when using the I2C bus and also the
format of bits at the I2C bus with diagram. (8)
Signals of I2C
SCL
SDL
Bit Format
Diagram
Explanation
ii) Explain the internal serial communication devices. (8)
1) I2C
Features
Low cost
Easy implementation
Moderate speed (upto 100 kbps).
disadvantages of I2C
Slave hardware does not provide much support
Open collector drivers at the master leads to be confused
Signals of I2C
o SCL
o SDL
Bit Format
Diagram
Explanation
2) CAN BUS
Definition
CAN is a serial bus for interconnecting a central Control network. It is mostly
used in automobiles. It has fields for bus arbitration bits, control bits for address and data
length data bits, CRC check bits, acknowledgement bits and ending bits.
Frame format
Start
Arbitration Control
field
field
Data
field
CRC
field
Acknowledgement End of
field
frame
Explanation
3) USB BUS
Definition
USB is a serial bus for interconnecting a system. It attaches and detaches a device
from the network. It uses a root hub. Nodes containing the devices can be organized like
a tree structure. It is mostly used in networking the IO devices like scanner in a computer
system.
Features of the USB protocol
A device can be attached, configured and used, reset, reconfigured and used, share
the bandwidth with other devices, detached and reattached
Versions
USB 1.1
USB 2.0
4. Explain the following parallel communication devices:
i) ISA bus (8)
ii) PCI and PCI/X (8)
ISA bus (8)
Explanation
IAS stands for Industry standard Architecture.
Used for connecting devices following IO addresses and interrupt vectors
as per IBM pc architecture.
Addresses allocated for devices
PCI and PCI/X (8)
PCI X offers more speed over PCI.
30 times more speed than PCI.
5. Explain the characteristics of asynchronous, synchronous and iso synchronous
transmission?
Synchronous communication
When a byte or a frame of the data is received or transmitted at constant
time intervals with uniform phase difference, the communication is called synchronous
communication.
iso-synchronous communication
iso-synchronous communication is a special case when the maximum time
interval can be varied.
characteristics of synchronous communication
Bytes maintain a constant phase difference
The clock is not always implicit to the synchronous data receiver.
Unit III
Programming Concepts and Embedding Programming in C,C++
1. i) Tabulate program elements: Macros and Functions and their uses. (8)
Macros and functions are used in C programs.
Functions
Functions are used when the requirement is that the codes should be compiled
once only. However on calling a function the processor has to save the context and on
return restore the context. Further a function may return nothing or an integer or any
primitive or reference type of data.
Macros
Macros are used when short functional codes are to be inserted in number of
places of functions.
ii) Explain the use of pointers, NULL pointers (8)
Pointer:
Reference to memory
NULL pointers
When a pointer points to NULL it means there is no reference to the memory. A
memory occupied by an element or object or data structure can be freed by pointing it to
the NULL.
2. i) Explain the multiple function calls in the cyclic order in the main. Also write the
advantages of building ISR queues. Explain (8)
Diagram
Explanation
Advantages of ISR Queues
Multiple function pointers are queued during ISRs. Each ISR is designed with
short set of codes. It doesnt execute any unessential codes with in the ISR.
ii) Explain the C program compiler and cross compiler. (8)
Compiler
Definition
Examples
Cross compiler
Definition
Cross compiler is a compiler which runs on the host system and produce
object codes for target system.
Example
GNU C/C++ compiler
3. i) Explain the optimization of memory codes. (8)
Certain steps changed to reduce the need for memory and having a compact code.
It reduces the total size of the memory needed. It also reduces the total number of CPU
cycles, and thus total energy requirements.
Explanation
Methods for optimizing memory
ii) Explain the Embedded programming in C++. (8)
Advantages of C++
Features of C++
4. Explain the function pointers, function queues and ISR queues. (16)
Definition
Explanation
5. Give two examples to depict the use of queue in ES?
Print buffer
Bytes on network
Unit IV
Real time Operating Systems Part -1
1.Explain the goals of operating system services. (8)
Facilitating easy sharing of resources
Facilitating easy implantation of the application software
Maximizing system performance
Providing management functions for the processes, memory, and I/Os and
for other functions for which i9t is designed.
Providing management and organization functions for the devices and
files and file like devices.
Portability
Interoperability
Providing common set of interfaces.
2. Explain the three alternative systems in three RTOS for responding a hardware
source call with the diagram. (8)
Direct call to ISR by an interrupt source
Direct call to RTOS by an interrupt source and temporary suspension of a
scheduled task.
Direct call to RTOS by an interrupt source and scheduling of tasks as well
as ISRs by the RTOS.
3. i) Explain the scheduler in which RTOS insert into the list and the ready task for
sequential execution in a co-operative round robin model. (8)
Diagram
Explanation
4. Explain the fifteen point strategy for synchronization between the processes,
ISRs, OS functions and tasks for resource management. (8)
Explain the points.
5. i) Explain the critical section service by a preemptive scheduler. (8)
Diagram
Explanation
ii) Explain the Rate Monotonic Co-operative scheduling. (8)
Diagram
Explanation
Unit V
Real time Operating Systems Part -2
1. Draw and explain basic system of an Automatic chocolate vending system
Diagram
Case definition, multiple tasks and their function
Creating a list of tasks, functions and IPCs.
2. Explain the case study of an embedded system for a smart card. (8)
Embedded hardware
Embedded software
diagram
3. Explain the features of Vx Works. (8)
Features
VxWorks is a scalable OS
RTOS hierarchy includes timers, signals, TCP/IP sockets, queuing
functions library, Berkeley ports and sockets, pipes, UNIX compatible
loader, language interpreter, shell, debugging tools, linking loader for
UNIX.
Explanation
4.Explain the RTOS programming tool MicroC/OS-II.
Features
Use of MUCOS
System level functions
Task functions
Semaphore related functions queue related functions.
5. Explain the case study of an embedded system for sending application layer
byte on a TCP/IP network
Diagram
Case definition, multiple tasks and their function
Creating a list of tasks, functions and IPCs.