Sei sulla pagina 1di 27

RAJIV GANDHI COLLEGE OF ENGINEERING AND TECHNOLOGY

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING


ECT73 – EMBEDDED SYSTEMS

TWO MARKS PART-A

UNIT – I
1. What is an embedded system?
An embedded system is one that has computer-hardware with software embedded in it as one of
its most important component. It is a computing device that does a specific focused job.
2. What are the components of embedded system?
An embedded system has three main components
a. Hardware
b. Software
c. Real Time Operating System(RTOS)
3. What are the classifications of embedded systems?
a. Small scale embedded system
b. Medium scale embedded system
c. Sophisticated embedded system
4. What are all the application areas of the embedded systems?
a. Consumer Appliances
b. Office Automation
c. Industrial Automation
d. Medical Electronics
e. Computer Networking
f. Telecommunications
g. Wireless Technologies
h. Instrumentation
i. Security
j. Finance
5. What are the special features of embedded systems?
a. They do a very specific task
b. They have very limited resource
c. They work against some deadlines
d. They are constrained for power
e. They need to be highly reliable
6. What are all the specialities of embedded systems?
a. Reliability
b. Performance
c. Power consumption
d. Cost
e. Size
f. Limited user interface
7. What are the three types of architectures for the processor?
a. Von Neumann Architecture
b. Harvard Architecture
c. Super Harvard Architecture
8. What is the Von Neumann Architecture?
This Architecture has one memory chip which stores both instruction and data. The processor
interacts with the memory through address and data buses to fetch instructions and data.
9. What is Harvard Architecture?
It has separate memory blocks, one is program memory and the other is data memory. Program
memory stores only instructions and data memory stores only data.
10. Differentiate CISC and RISC processor?

CISC RISC

i)Complex instruction set computer i)Reduced instruction set computer

ii)It has large instruction set. ii)It has limited number of instruction
set
iii)It needs less memory
iii)It needs large memory
iv)In which software architecture is
simple, hardware architecture is iv) )In which hardware architecture is
complex. simple, software architecture is
complex

11. Define Embedded system processor.


An embedded system processor has two essential units: Program Flow Control Unit and
Execution Unit. The control unit includes a fetch unit for fetching instructions from the memory.
Execution unit has circuits that implement the instructions.
12. What is microcontroller?
A microcontroller is a unit with a processor. It is a single chip VLSI unit which, thought having
limited computational capabilities, possesses enhanced input-output capabilities and a number of
on-chip functional units.
13. What are the functional circuits of a microcontroller?
The functional circuits of a microcontroller are,
a. Processor
b. Data & stack in internal RAM
c. Timers & Watchdog timer
d. ROM / PROM / EPROM
e. External Memories Interfaces
f. Interrupt Controller
g. I/O Ports Control & Interfaces / Drivers
h. Serial UART communication port

14. What are the features of DSP?


A DSP provides fast, discrete-time, signal processing instructions. It has very large instruction
word (VLIW) processing capabilities, it processes Single Instruction Multiple Data (SIMD)
instructions fast, and it processes Discrete Cosine Transformations (DCTs) and inverse DCTs
(IDTs) fast.
15. What is GPP & ASIP?
GPP: A processor from a number of families of processors, microcontroller, embedded
processors and DSPs having a general purpose instruction set and readily available compilers to
enable programming in a high level language is called a General Purpose Processor (GPP).
ASIP: A processor designed for specific application on a VLSI chip is called an Application
Specific Instruction Processor.
16. What is ASSP?
Application Specific System Processor is a processing unit for specific tasks, foe e.g. Image
compression and that is integrated through the buses with the main processor in an embedded
system.
17. What are embedded cores?
More and more vendors are selling or giving away their processors and peripherals in a form that
is ready to be integrated into a programmable logic-based design. They both recognize the
potential for growth in the system-on-a-chip area and want a piece of the royalties or want to
promote the use of their particular FPGA or CPLD by providing libraries of ready-to-use
building blocks. Either way, you will gain with lower system costs and faster time-to-market.
18. Define system on chip(SOC) with an example
Embedded systems are being designed on a single silicon chip called system on chip. SOC is a
new design innovation for embedded system Eg. Mobile phone.
19. Give any two uses of VLSI designed circuits
A VLSI chip can embed IPs for the specific application besides the ASIP or a GPP core. A
system on a VLSI chip that has all of needed analog as well as digital circuits. Eg. Mobile phone.
20. List the important considerations when selecting a processor.
a. Instruction set
b. Maximum bits in an operand
c. Clock frequency
d. Processor ability
21. Classify the processors in embedded system?
a. General purpose processor
b. Microprocessor
c. Microcontroller
d. Embedded processor
e. Digital signal processor
f. Media processor
g. Application specific system processor
h. Multiprocessor system using GPP and ASSP
i. GPP core or ASIP core integrated into either an ASIC or a VLSI circuit or an FPGA core
integrated with processor unit in a VLSI chip.
22. Name some DSP used in embedded systems?
a. TMS320Cxx
b. SHARC
c. 5600xx
23. Name some of the hardware parts of embedded systems?
a. Power source
b. Clock oscillator circuit
c. Timers
d. Memory units
e. DAC and ADC
f. LCD and LED displays
g. Keyboard/Keypad
24. When is Application Specific System processors (ASSPs) used in an embedded system?
An ASSP is used as an additional processing unit for running the application specific tasks in
place of processing using embedded software.
25. What is prototyping?
Many times a CPLD or FPGA will be used in a prototype system. A small device may be present
to allow the designers to change a board\'s glue logic more easily during product Embedded
Systems development and testing. Or a large device may be included to allow prototyping of a
system-on-a-chip design that will eventually find its way into an ASIC. Either way, the basic
idea is the same: allow the hardware to be flexible during product development. When the
product is ready to ship in large quantities, the programmable device will be replaced with a less
expensive, though functionally equivalent, hard-wired alternative
26. Give the internal structure of FPGA
The development of the FPGA was distinct from the PLD/CPLD evolution just described. This is
apparent when you look at the structures inside. There are three key parts of its structure: logic
blocks, interconnect, and I/O blocks. The I/O blocks form a ring around the outer edge of the
part. Each of these provides individually selectable input, output, or bi directional access to one
of the general-purpose I/O pins on the exterior of the FPGA package. Inside the ring of I/O
blocks lies a rectangular array of logic blocks. And connecting logic blocks to logic blocks and
I/O blocks to logic blocks is the programmable interconnect wiring.
27. Define FPGAs
Field Programmable Gate Arrays (FPGAs) can be used to implement just about any hardware
design. One common use is to prototype a lump of hardware that will eventually find its way into
an ASIC.
28. Define PLDs
At the low end of the spectrum are the original Programmable Logic Devices (PLDs). These
were the first chips that could be used to implement a flexible digital logic design in hardware. In
other words, you could remove a couple of the 7400-series TTL parts (ANDs, ORs, and NOTs)
from your board and replace them with a single PLD. Other names you might encounter for this
class of device are Programmable Logic Array (PLA), Programmable Array Logic (PAL), and
Generic Array Logic (GAL).
29. What are dependability requirements of an embedded system?
• Safety
• Critical failure modes
• Certification
• Maintainability
• MTTR in terms of repairs per hour
• Availability
• A = MTTF / (MTTF + MTTR)
• Security
30. Give some examples for small scale embedded systems.
a. ACVM
b. Stepper motor controllers for a robotic system
c. Washing or cooking system
d. Multitasking toys
31. Give some examples for medium scale embedded systems
a. Router, a hub and a gateway
b. Entertainment systems
c. Banking systems
d. Signal tracking systems
32. Give some examples for sophisticated embedded systems
1. Embedded system for wireless LAN
2. Embedded system for real time video
3. Security products
4. Embedded system for space lifeboat.
33. What is instruction pipeline?
An instruction pipeline is a technique used in the design of computers to increase their
instruction throughput (the number of instructions that can be executed in a unit of time). The
basic instruction cycle is broken up into a series called a pipeline. Rather than processing each
instruction sequentially (one at a time, finishing one instruction before starting the next), each
instruction is split up into a sequence of steps – different steps can be executed concurrently (by
different circuitry), and indeed in parallel (at the same time).
34. What are the advantages and disadvantages of pipeline architecture?
Pipelining increases instruction throughput by performing multiple operations at the same time
(in parallel), but does not reduce instruction latency (the time to complete a single instruction
from start to finish) as it still must go through all steps.
35. What are the different stages in pipeline architecture?
The classic RISC pipeline comprises:
 Instruction fetch
 Instruction decode and register fetch
 Execute
 Memory access
 Register write back
36. What is byte ordering?
CPUs represent numbers in different ways in their internal registers. The way they store a 2-byte
(short integer) or four byte (long) integer defines the category of the machine: big endian or little
endian. The category is called the host byte order. A computer that stores the most significant
byte of data first, is a big endian machine. Examples of big endian machines are Sun sparcs,
Motorolas (eg 68000), and PowerPC.
37. What is meant by data alignment?
Different processor targets may also have different word alignment restrictions. Typically, a two
or four byte integer should start on a four-byte address in order to be fetched correctly over a
bus. An access of a misaligned memory element may cause a bus error. A typical example of
alignment problems in networking is an Ethernet header followed by an IP header. If the 14-byte
ethernet header is correctly aligned on a four-byte boundary, the IP header will not be (since it
starts 14 byte after the Ethernet header).
UNIT - II

1. Define bus.
Buses: The exchange of information.
Information is transferred between units of the microcomputer by collections of conductors
called buses.
There will be one conductor for each bit of information to be passed, e.g., 16 lines for a 16 bit
address bus. There will be address, control, and data buses
2. What are the classifications of I/O devices?
a. Synchronous serial input and output
b. Asynchronous serial UART input and output
c. Parallel one bit input and output
d. Parallel port input and output
3. Give some examples for serial input I/O devices.
Audio input, video input, dial tone, transceiver input, scanner, serial IO bus input, etc.,
4. Give the steps for accomplishing input output data transfer
There are three main methods used to perform/control input/output data transfers. They are,
a. Software programming (scanning or polling)
b. interrupt controlled
c. Direct memory access (DMA)
5. What are Data registers in I/O devices?
Data registers hold values that are treated as data by the device, such asthe data read or written
by a disk.
6. What are Status registers in I/O devices?
Status registers provide information about the device’s operation, such as whether the current
transaction has completed.
7. What is baud rate?
The data bits are sent as high and low voltages at a uniform rate. This uniform rate at which data
bits are sent or received is known as baud rate.
8. Give the limitations of polling technique.
The polling technique, however, has limitations.
a. It is wasteful of the processors time, as it needlessly checks the status of all devices all
the time.
b. It is inherently slow, as it checks the status of all I/O devices before it comes back to
check any given one again.
c. When fast devices are connected to a system, polling may simply not be fast enough to
satisfy the minimum service requirements. Priority of the device is determined
9. What do you meant by bus arbitration?
Bus Arbitration
Most processors use special control lines for bus arbitration, ie, controlling the use of the address
and data bus,
a. An input which the DMAC uses to request the bus
b. An output(s) indicating the bus status
c. An output indicating acceptance of the DMAC\'s bus request
10. What are the two characteristics of synchronous communication?
a. Bytes/frames maintain constant phase difference and should not be sent at random time
intervals. No handshaking signals are provided during the communication.
b. Clock pulse is required to transmit a byte or frame serially. Clock rate information is
transmitted by the transmitter.
11. What do you mean by asynchronous communication?
The most basic way of sharing data is by copying the data in question to each server. This will
only work if the data is changed infrequently and always by someone with administrative access
to all the servers in the cluster.
12. What are the characteristics of asynchronous communication?
a. Variable bit rate – need not maintain constant phase difference
b. Handshaking method is used
c. Transmitter need not transmit clock information along with data bit stream
13. What are the three ways of communication for a device?
a. Separate clock pulse along with data bits
b. Data bits modulated with clock information
c. Embedded clock information with data bits before transmitting
14. 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.
15. What are the two characteristics of synchronous communication?
a. Bytes maintain a constant phase difference
b. The clock is not always implicit to the synchronous data receiver.
16. What are the three ways of communication for a device?
a. iso-synchronous communication
b. synchronous communication
c. Asynchronous communication
17. Expand a) SPI b) SCI
a. SPI—serial Peripheral Interface
b. SCI—Serial Communication Interface
18. 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.
19. 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.
20. 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
21. 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.
22. What is USB? Where is it used?
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.
23. What are the 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.
24. What are the four types of data transfer used in USB?
a. Controlled transfer
b. Bulk transfer
c. Interrupt driven data transfer
d. Iso-synchronous transfer
25. Explain briefly about PCI and PCI/X buses.
PCI and PCI/X buses are independent from the IBM architecture .PCI/X is an extension of PCI
and support 64/100 MHZ transfers. Lately, new versions have been introduced for the PCI bus
architecture.
26. Why are SPCI parallel buses important?
SPCI serial buses are important for distributed devices. The latest high speed sophisticated
systems use new sophisticated buses.
27. What is meant by UART?
a. UART stands for universal Asynchronous Receiver/Transmitter.
b. UART is a hardware component for translating the data between parallel
and serial interfaces.
c. UART does convert bytes of data to and from asynchronous start stop bit.
d. UART is normally used in MODEM.
28. What does UART contain?
a. A clock generator.
b. Input and Output shart Registers
c. Buffers.
d. Transmitter/Receiver control.
29. List out the states of timer?
There are eleven states as follows
a. Reset state
b. Idle state
c. Present state
d. Over flow state
e. Over run state
f. Running state
g. Reset enabled state / disabled
h. Finished state
i. Load enabled / disabled
j. Auto reload enabled / disabled
k. Service routine execution enabled / disabled
30. Name some control bit of timer?
a. Timer Enable
b. Timer start
c. Up count Enable
d. Timer Interrupt Enable
31. What is meant by status flag?
Status flag is the hardware signal to be set when the timer reaches zeros.
List out some applications of timer devices?
a. Real Time clock
b. Watchdog timer
c. Input pulse counting
d. TDM
e. Scheduling of various tasks
32. State the special features on I2C?
a. Low cost
b. Easy implementation
c. Moderate speed (upto 100 kbps).
33. What are disadvantages of I2C?
a. Slave hardware does not provide much support
b. Open collector drivers at the master leads to be confused
34. What are the two standards of USB?
a. USB 1.1
b. USB 2.0
35. Draw the data frame format of CAN?
Star Arbitration Control Data CRC Acknowledgement End of
t field field field field field frame
1 12 6 0-64 16 2 7
36. What is the need of Advanced Serial High Speed Buses?
If the speed in the rate of ‘Gigabits per second’ then there is a need of Advanced Serial High
Speed Buses.
37. What is meant by ISA?
ISA stands for Industry standard Architecture. Used for connecting devices following IO
addresses and interrupt vectorsas per IBM pc architecture.
38. What is meant by PCI-X?
a. PCI X offers more speed over PCI.
b. 30 times more speed than PCI.
39. Define CPCI?
a. CPCI stands for Compact peripheral component Interfaces.
b. CPCI is to be connected via a PCI.
c. CPCI is used in the areas of Telecommunication Instrumentation abd data
communication applications.
40. Mention some advanced bus standard protocols
a. GMII (Gigabit Ethernet MAC Interchange Interface)
b. XGMI (10 Gigabit Ethernet MAC Interchange Interface)
c. CSIX-1 6.6 Gbps
d. Rapid IO interconnect specification v1.1 at 8 Gbps
41. Define half-duplex communication.
During communication when data transmission occurs in both the direction, but not
simultaneously is known as half-duplex communication. E.g. Telephone conversation
42. Define full duplex communication.
During communication when data transmission occurs in both the direction and simultaneously
at both directions is called as full duplex communication. E.g MODEM communication
43. Define Real Time Clock (RTC)?
Real time clock is a clock which once the system stats does not stop and cant be reset and its
count value cant be reloaded.
44. Define Time-out or Time Overflow?
A state in which the number of count inputs exceeded the last acquirable value and on reaching
that state, an interrupt c an be generated.
45. Why do we need at least one timer in an Embedded systems?
The embedded system needs at least one timer device. It is used as a system clock for all
reference clock for CPU execution. Apart from the system timer there may be need for many
timers based on applications.
UNIT - III
1. State some advantages of Assembly language?
a. 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.
b. The machine codes are compact.
c. With the help of assembly language the basic concepts could be easily studied.
d. Memory required for the system is less.
e. Minimum assembly languages instruction only needed for device drivers.
2. Write the advantages of high level language?
a. Standard library functions
b. Modular programming approach
c. Bottom up design
d. Top down design
e. Data types
f. Type checking
g. Control structures
h. Portability
3. What is the most important feature in C that makes it a popular HLL for an embedded
system?
a. Inline assembly
b. 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 Interpreter
Translation by the whole at a time. Translation goes by line to line.
Faster operation. Slower operation comparatively.
Error less program helps easier There is no compilation stage.
work
of compilation.

6. What are the steps required for converting assembly language into a ROM image?
a. Assembler
b. Linker
c. Loader
d. Locator & Device Programmer
7. What is ROM image?
The final stage software is also called ROM image, because just as an image is a unique
sequence and arrangement of pixels, embedded software is also a unique placement and
arrangement of bytes for instructions and data.
8. What is the use of code optimizer?
Code optimizer is used in the conversion of high level language into a ROM image for
optimizing the code before linking.
9. What is Compiler?
Compiler is a software tool that converts a high level program (written using programming
languages like C, C++, Java, and so on) into an object code.
10. What is Assembler?
Assembler is a software tool that converts an assembly program (written using mnemonics of a
processor, i.e., instruction set of a specific processor) into an object code.
11. What are the steps required for converting high level language into a ROM image?
a. Compiler
b. Linker
c. Loader
d. Locator & Device Programmer
12. Mention the elements of C program.
1. Files:
a. Header files
b. Source files
c. Configuration files
d. Preprocessor directives
2. Functions:
a. Macro function
b. Main function
c. Interrupt service routines or device drivers
3. Others:
a. Data types
b. Data structures
c. Modifiers
d. Statements
e. Loops and pointers
13. List out some ‘Include’ header files used in ‘C’ language in embedded system?
a. #include<vxwork.h>
b. #include<semlib.h>
c. #include<tasklib.h>
d. #include<syslib.h>
14. What is a Preprocessor Directive?
It is the program statements and directives for the compiler before the main function to define
global variable, global macro, new data type and global constants.
15. Differentiate macros and functions
Macros and functions are used in C programs. 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 are used when short functional codes are to be
inserted in number of places of functions.
16. Define Configuration files.
Configuration files are the files for the configuration of the system. Device configuration codes
can be put in a file of basic variables and included when needed.
17. List the uses of Queues?
a. Print buffer
b. Image frames in a sequence
c. Frames on a network
18. What is list? Give two examples of list data structure.
Contain nodes (element).Each element has a pointer to its next element. Only the first element is
identifiable and it is done by list top pointer. No other element is identifiable and hence is not
accessible directly.
 A series of tasks which are active.
 Menu that point to a sub menu.
19. What is tree? Give an example
There is a root element It has two are more branches each having a daughter element. Each
daughter element has two or more daughter elements. The last one does not have daughters.
 Directory
20. Why do you use infinite loop in embedded system?
Infinite loop is used in embedded system in order to make the main program to execute
continuously with out having a halt state since an exit from the loop will make the system
hardware redundant.
21. Define 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.
22. Explain pass by values.
a. The values are copied into the arguments of the function.
b. Called programs does not change the values of the variables
23. Explain pass by reference.
a. When an argument value to a function is passed through a pointer, then the value can be
changed.
b. New value in the calling function will be returned from the called function.
24. What is recursive and reentrant function?
Recursive Function - It is a function that calls itself. It must be a reentrant function also. Most
often its use is avoided in embedded systems due to memory constraints.
Reentrant Function - It is a function that is usable by the several tasks and routines at the same
time. All its argument values are retrievable from the stack.
25. What is the use of modifier register?
When a modifier register is inside a function block, a CPU register is temporarily allocated when
needed. There is no ROM or RAM allocation.
26. Define Queue.
It is a data structure into which elements can be sequentially inserted and retrieved in a FIFO
mode. It needs two pointers, one for the queue tail for insertion and other for the queue head for
deletion.

27. Define Stack.


A stack is a data structure in which elements can be pushed in or pulled out. It works on the
principle of Last-In-First-Out (LIFO).
28. How interrupts are handled in Queue?
Queuing of pointers to the function on interrupts and later on calling the functions from this
queue is a better approach as it provides the use of short execution time interrupt-service
routines.
29. Explain briefly stack overhead.
The repeated call to recursive function may cause the stack to full. This leads to insufficient
memory. Hence the stack overhead may occur which is primarily due to overflow of the stack.
30. What is meant by inline assembly?
Inserting the assembly language codes in between the high-level language codes are called inline
assembly. It gives the benefits of processor specific instructions and addressing modes.
31. What is Optimization of memory?
When codes are made compact and fitted in small memory without affecting the code
performance, it is called memory optimization.
32. Define scalar data types?
The character, integer, unsigned integer, floating point number, long and double are called scalar
data types. Unlike an array data consists of one single element.
33. Give some examples for reference data types.
Arrays and strings are examples of reference data types.
34. What are the advantages of reentrant functions?
Reentrant function is usable by several task and routines synchronously.
35. What is meant by platform independence?
A code that can port on different machine and operating systems is said to be platform
independent.
36. 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,
a. The header files are well tested and debugged modules.
b. They provide access to standard libraries.
c. The header file can include several text file or C files.
A text file is description of the text that contains specific information.
37. List the Integer data types available in C programming language.

Data Size Range


type
unsigned Char 8 bits 0 to 255
Short int 16 bits 0 to 65,535
Int 16/32 same as unsigned short / long int
Long int bits 0 to 4,294,967,295
32 bits
signed Char 8 bits -128 to +127
Short int 16 bits -32768 to +32767
Int 16/32 same as unsigned short / long int
Long int bits -2,147,483,648 to +2,147,483,647
32 bits

38. Why TYPEDEFS are used in embedded system programming?


C’s primitive data type “ char ” may default to either signed or unsigned, and its primitive data
type “ int ” may have size of 16 or 32 bits. In most of the embedded applications, it’s imperative
to know the number of bits and range of most variables.
Hence, to avoid C’s ambiguity, derived data types are formed using TYPEDEFS and placed in a
text file (Eg. typedefs.h) and included in every source code file that uses them.
39. What are the two types of data conversions?
PROMOTION: A conversion is called a promotion, when there is no potential loss of accuracy
as when assigning an integer value to a floating point variable.
DEMOTION: It is the conversion which causes a loss of accuracy, when a floating point
variable is assigned to an integer variable, or when a 32-bit integer value is assigned to a 8-bit
char. Demotion usually make the compiler to issue a warning.
40. What is the significance of Pointers in C programming?
A Pointer in C is a variable that contains an address. This helps to access the data of a variable
faster in memory.
Eg. Int A, *B, C;
A = 10 ;
B = &A ;
C = *B ;
41. What is an Array?
An Array is an aggregate data type composed of several members of same data type.
Eg. Int a[5];

A[0] A[1] A[2] A[3] A[4]


42. What is a structure?
A Structure is a aggregate data type composed of several distinct members. A single structure
variable can contain member elements that represent a mix of chars, ints, doubles, etc.

Structure declaration in C program


struct PERSON
{
Int age;
Char gender;
};
43. Explain the process of Assembler.
The translation of assembly-language source code into binary object code is a two-step process
in assembler. The assembler makes two complete passes over the source code of the program.
During the first pass - The assembler builds a symbol table that contains the information about
programmer–defined identifiers, such as the labels attached to instructions and the names of
variables stored in memory.
During the second pass - The assembler uses this information to construct the representation of
the individual instructions
44. What are the conditions that a reentrant functions must satisfy?
a. All the arguments pass the values and none of the argument is a pointer, whenever a
calling function calls that function.
b. 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.
c. Reentrant function doesn’t call any other function that is not itself reentrant.
45. What are the advantages of building ISR queues?
Multiple function pointers are queued during ISRs. Each ISR is designed with short set of codes.
It doesn’t execute any unessential codes with in the ISR.
46. What is meant by cross platform development?
The process of developing machine codes for a specific processor of an embedded system from a
high level / assembly level program written on a PC (with different processor) using various
software tools is called cross platform development.
47. List the various hardware development / testing tools.
Digital Multimeter : Measures current, voltage, continuity of connections
Logic Analyzer : Checks the timing of the signals
Oscilloscope : Analyze the waveforms in time domain
Spectrum Analyzer : Analyze the waveforms in frequency domain
48. List the various software development / testing tools.
a. OS Development Suite
b. Cross-platform Development tools (IDE)
c. ROM Emulator
d. EPROM Programmer
e. Instruction Set Simulator (ISS)
f. In-Circuit Emulator (ICE)
49. List the possible boot sequences of an embedded system.
a. Execute from ROM using RAM for data
b. Execute from RAM after loading the image from RAM
c. Execute from RAM after downloading from the host
50. What is meant by Debug port?
Debugging a processor based board is very difficult. Hence, manufacturers provide a
standardized interface for debugging. JTAG (Joint Test Access Group) port is a mechanism
provided to debug the embedded system hardware and also for downloading the software onto
the embedded system board.
51. State the features of OOPS?
a. Since program can be divided into objects, large, medium and small projects can be done
easily.
b. Data security may be maintained.
c. Inclusion of new data and functions are easily done.
d. User defined data types can be easily constructed.
52. What are the Basic Concepts of OOPS?
a. Objects
b. Classes
c. Data encapsulation
d. Data abstraction
e. Single inheritance
f. Multiple inheritance
g. Polymorphism
h. Dynamic binding
i. Message passing
53. What are the disadvantages of C++?
Program codes become lengthy when certain features of the standard C++ are used. Example for
these features includes.
 Template
 Multiple inheritance
 Exceptional handling
 Virtual base class
 Classes for I/O streams.
54. What is cross compiler?
Cross compiler is a compiler which runs on the host system and produce object codes for target
system.
55. What is meant by optimization of memory?
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.
56. What are the characteristics of OOPs?
a. An identity – reference to a memory block
b. A state – data, field and attributes
c. A behavior – methods to manipulate the state of the object
57. Define Class.
A class declaration defines a new type that links code and data. It is then used to declare objects
of that class. Thus a class is an logical abstraction but an object has physical existence.
58. What is Multiple Inheritance?
Inheritance is the process by which objects of one class acquire the properties of objects of
another class. In OOP, the concept of inheritance provides the idea of reusability.
59. What is an in-circuit-emulator?
The microprocessor in-circuit emulator (ICE) is a specialized hardware tool that can help debug
software in a working embedded system. At the heart of an in-circuit emulator is a special
version of the microprocessor that allows its internal registers to be read out when it is stopped.
The in-circuit emulator surrounds this specialized microprocessor with additional logic that
allows the user to specify breakpoints and examine and modify the CPU state.
60. What is a logic analyzer?
A logic analyzer is an array of inexpensive oscilloscopes—the analyzer can sample many
different signals simultaneously (tens to hundreds) but can display only 0, 1, or changing values
for each. All these logic analysis channels can be connected to the system to record the activity
on many signals simultaneously.
61. What are the two modes in which logic analyzer can acquire data?
A logic analyzer can acquire data in either of two modes that are typically called state and timing
modes.
62. What is a simulator?
A simulator is a software tool that runs on your host and simulates the behavior of the
microprocessor and memory in your target system.

63. What is a Monitor?


Monitors are debugging tools which are used to run the software on the actual target
microprocessor while still giving a debugging interface similar to that of an in-circuit emulator.
64. Why debugging is a challenge in real time systems?
Real-time programs are required to finish their work within a certain amount of time; if they run
too long, they can create much unexpected behavior. The exact results of missing real-time
deadlines depend on the detailed characteristics of the I/O devices and the nature of the timing
violation. This makes debugging real-time problems especially difficult.
UNIT – IV

1. Name the important terms of RTOS?


a. Task
b. State
c. Scheduler
d. Shared data
e. 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?

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. Explain Task scheduler.
It is part of a RTOS. It keeps track of the state of each task and decides which one task should go
into the running state. Scheduler in an RTOS looks at the priorities assigned to tasks, and among
the tasks that not in the blocked state, the one with highest priority is allowed to run and the rest
of them are made to wait in the ready state.
9. When a blocked task is allowed to run on a processor?
When a task is blocked, it never gets the processor. Therefore, an interrupt routine or some
another task in the system should signal that whatever the blocked task waiting for has happened.
Otherwise, the task will be blocked forever.
10. How does a scheduler know whether a task is blocked or not?
RTOS provides a collection of functions that tasks can tell a scheduler what events they wait for
and to signal that events have happened.
11. What happens if all the tasks are blocked?
If all the tasks are blocked, then the scheduler will spin in some tight loop somewhere inside the
RTOS, waiting for something to happen. If nothing ever happens, then it ends in an infinite loop.
Therefore care must be taken by programmer to invoke a interrupt routine that call some RTOS
function that unblocks a task.
12. 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.
13. 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.
14. Compare OS and RTOS.
OS: On a PC, OS takes control of the PC as soon as it is turned on and then it lets the application
program to start. OS checks any pointer which passes into a system function for its validity. OS
consumes lot of memory space and it contains all in-built functions.
RTOS: Application program is linked to the RTOS. At boot-up, application usually gets control
first and then it starts RTOS. Many RTOS don not protect themselves and skip the checking
process for better performance. To save memory, RTOS has only the functions needed for an
application.
15. 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.
16. 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.
17. List the semaphore related problems.
a. Forgetting to take the semaphore
b. Forgetting to release the semaphore
c. Taking the wrong semaphore
d. Holding a semaphore too long

18. 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.
19. 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.
20. What are the problems that may arise while using semaphores?
The problems that may while using semaphores are,
a. Sharing of two semaphores creates a deadlock problem.
b. Without a timeout an ISR worst-case latency may exceed the deadline.
c. If a semaphore is not taken, and another task uses a shared variable.
d. When using multiple semaphores, if an unintended task takes the semaphore, it creates a
problem.
e. It may introduce priority inversion problem.
21. List the ways to protect the shared data.
a. Disabling the interrupts
b. Taking semaphores
c. Disabling the task switches
22. What is priority inversion problem? How it can be solved?
A problem in which a low priority task unintentionally do not release the semaphore for a higher
priority task. This makes the high priority task to wait for low priority task to release the
semaphore. This is called Priority Inversion. This problem can be solved by temporarily boosting
the low priority task to higher priority task which is called as priority inheritance.
23. 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.
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.
25. Compare Semaphores, Events and Queues/Mailbox/Pipe.
Semaphores are usually the fastest and simplest methods. However, not much information can be
passed through a semaphore, which passes just a 1-bit message saying that it has been released.
Events are a little more complicated than semaphores and take little more of processor time. The
advantage of events over semaphores is that a task can wait for any one of the several events at
the same time and it can wait for only one semaphore.
Queues (also mailboxes & pipes) allow sending a lot of information from one task to another.
The drawback of queues (also mailboxes and pipes) is that adding and reading a message is more
processor intensive and more prone to insert bugs while programming them.
26. List the pitfalls in using Mailbox, Message queues and Pipes.
a. Most of the RTOS do not restrict which tasks can read from or write to any given queue,
mailbox or pipe. Therefore, programmer must ensure that tasks use the correct one each
time.
b. RTOS cannot ensure that data written onto a queue, mailbox or a pipe will be properly
interpreted by the tasks that read it.
c. Running out of space in queues, mailboxes or pipes is usually a disaster for embedded
software.
d. Passing pointers from one task to another through a queue, mailbox or pipe is one of the
several ways to create shared data inadvertently.
27. Define Remote Procedure Call.
A method used for connecting two remotely placed methods by using a protocol. Both systems
work in the peer to peer communication mode and not in the client server mode.
28. What are the goals of RTOS?
 Facilitating easy sharing of resources
 Facilitating easy implantation of the application software
 Maximizing system performance
 Providing management and organization functions for the devices and files and file like
devices.
 Portability
 Interoperability
 Providing common set of interfaces.
29. What is RTOS?
An RTOS is an OS for response time controlled and event controlled processes. RTOS is an OS
for embedded systems, as these have real time programming issues to solve.
30. Name the important RTOS used in embedded systems.
MUCOS, Vxworks, PSoS, RTX51, WinCE, RT Linux, Nucleus, Symbian are the important
RTOS.
31. List the functions of a kernel.
a. Process management
i. Process creation to deletion
ii. Processing resource requests
iii. Scheduling
iv. IPC
b. Memory management
c. I/O management
d. Device management
32. What are the two methods by which a running requests resources?
 Message
 System call
33. What are the functions of device manager?
a. Device detection and addition
b. Device deletion
c. Device allocation and registration
d. Detaching and deregistration
e. Device sharing
34. List the set of OS command functions for a device
 Create and open
 Write
 Read
 Close and delete
35. List the set of command functions of POSIX file system
 Open
 Write
 Read
 Lseek
 close
36. What are the three methods by which an RTOS responds to a hardware source
call on interrupt?
 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.
Providing management functions for the processes, memory, and I/Os and for other functions for
which it is designed.
37. What is Round Robin or cyclic scheduling?
A scheduling algorithm in which the tasks are scheduled in sequence from a list of ready tasks.
38. Explain briefly about Preemptive scheduling.
A scheduling algorithm in which a higher priority task is forced (Preempted) to block the low
priority task by the scheduler.
39. What is Time Slicing and Fixed real time scheduling?
Time Slicing Scheduling - A scheduling algorithm in which each task is allotted a time slice after
which it is blocked and waits for its turn on the next cycle.
Fixed Real Time Scheduling - A scheduling strategy in which the time for each task is fixed.
UNIT – V
1. What are the major design goals of Embedded Systems?
The major goals of the design:
 manufacturing cost;
 performance (both overall speed and deadlines); and
 power consumption.
 Time-to-market
 Quality
2. What are the functional requirements?
A functional requirement states what the system must do, such as compute an FFT.
3. Describe the nonfunctional requirements of Embedded Systems
Typical nonfunctional requirements include:
■ Performance: The speed of the system is often a major consideration both for the usability of
the system and for its ultimate cost. As we have noted, performance may be a combination of
soft performance metrics such as approximate time to perform a user-level function and hard
deadlines by which a particular operation must be completed.
■ Cost: The target cost or purchase price for the system is almost always a consideration. Cost
typically has two major components: manufacturing cost includes the cost of components and
assembly; nonrecurring engineering (NRE) costs include the personnel and other costs of
designing the system.
■ Physical size and weight: The physical aspects of the final system can vary greatly depending
upon the application. An industrial control system for an assembly line may be designed to fit
into a standard-size rack with no strict limitations on weight. A handheld device typically has
tight requirements on both size and weight that can ripple through the entire system design.
■ Power consumption: Power, of course, is important in battery-powered systems and is often
important in other applications as well. Power can be specified in the requirements stage in terms
of battery life the customer is unlikely to be able to describe the allowable wattage.
4. What is the need Design Methodologies?
If you are designing embedded systems in your basement by yourself, having your own work
habits is fine. But when several people work together on a project, they need to agree on who
will do things and how they will get done. Being explicit about process is important when people
work together. Therefore, since many embedded computing systems are too complex to be
designed and built by one person, we have to think about design processes.
5. What is meant by design flow?
A design flow is a sequence of steps to be followed during a design. Some of the steps can be
performed by tools, such as compilers or CAD systems, other steps can be performed by hand.
6. What are the different stages in a waterfall model?
 Requirements
 Architecture
 Coding
 Testing
 Maintenance
7. What is the goal of requirements?
The overall goal of creating a requirements document is effective communication between the
customers and the designers. The designers should know what they are expected to design for the
customers; the customers, whether they are known in advance or represented by marketing,
should understand what they will get.
8. How is a spiral model different from waterfall model?
While the waterfall model assumes that the system is built once in its entirety, the spiral model
assumes that several versions of the system will be built. Early systems will be simple mock-ups
constructed to aid designers’ intuition and to build experience with the system.
9. What is successive refinement model?
In successive refinement design methodology approach, the system is built several times. A first
system is used as a rough prototype, and successive models of the system are further refined.
This methodology makes sense when you are relatively unfamiliar with the application domain
for which you are building the system. Refining the system by building several increasingly
complex systems allows you to test out architecture and design techniques. The various iterations
may also be only partially completed.
10. What is concurrent engineering approach?
When designing a large system along with many people, it is easy to lose track of the complete
design flow and have each designer take a narrow view of his or her role in the design flow.
Concurrent engineering attempts to take a broader approach and optimize the total flow.
Reduced design time is an important goal for concurrent engineering, but it can help with any
aspect of the design that cuts across the design flow, such as reliability, performance, power
consumption, and so on.
11. What are the elements involved in concurrent engineering approach?
Concurrent engineering efforts are comprised of several elements:
 Cross-functional teams include members from various disciplines involved in the process,
including manufacturing, hardware and software design, marketing, and so forth.
 Concurrent product realization process activities are at the heart of concurrent engineering.
Doing several things at once, such as designing various subsystems simultaneously, is critical
to reducing design time.
 Incremental information sharing and use helps minimize the chance that concurrent product
realization will lead to surprises. As soon as new information becomes available, it is shared
and integrated into the design. Cross-functional teams are important to the effective sharing
of information in a timely fashion.
 Integrated project management ensures that someone is responsible for the entire project, and
that responsibility is not abdicated once one aspect of the work is done.
 Early and continual supplier involvement helps make the best use of suppliers’ capabilities.
 Early and continual customer focus helps ensure that the product best meets customers’
needs.
12. What are requirements and specifications?
Requirements are informal descriptions of what the customer wants, while specifications are
more detailed, precise, and consistent descriptions of the system that can be used to create the
architecture. Both requirements and specifications are, however, directed to the outward behavior
of the system, not its internal structure.
13. Mention the tests to be satisfied by the requirement set.
 Correctness: The requirements should not mistakenly describe what the customer wants.
Part of correctness is avoiding over-requiring—the requirements should not add conditions
that are not really necessary.
 Unambiguousness: The requirements document should be clear and have only one plain
language interpretation.
 Completeness: All requirements should be included.
 Verifiability: There should be a cost-effective way to ensure that each requirement is
satisfied in the final product. For example, a requirement that the system package be
“attractive” would be hard to verify without some agreed upon definition of attractiveness.
 Consistency: One requirement should not contradict another requirement.
 Modifiability: The requirements document should be structured so that it can be modified to
meet changing requirements without losing consistency, verifiability, and so forth.
 Traceability: Each requirement should be traceable in the following ways:
—We should be able to trace backward from the requirements to know why each
requirement exists.
—We should also be able to trace forward from documents created before the requirements
(e.g., marketing memos) to understand how they relate to the final requirements.
—We should be able to trace forward to understand how each requirement is satisfied in the
implementation.
—We should also be able to trace backward from the implementation to know which
requirements they were intended to satisfy.
14. What is state-chart?
The State-chart is one well-known technique for state-based specification that introduced
some important concepts. The State-chart notation uses an event-driven model. State-charts
allow states to be grouped together to show common functionality.
15. What are the two basic groupings in a state-chart?
There are two basic groupings: OR and AND.
16. Give an example of control-oriented specification language.
An widely used state machine specification language is the SDL language, which was developed
by the communications industry for specifying communication protocols, telephone systems, and
so forth. SDL specifications include states, actions, and both conditional and unconditional
transitions between states. SDL is an event-oriented state machine model since transitions
between states are caused by internal and external events.
17. What does the acronym CRC stands for?
CRC stands for Classes, Responsibilities and Collaborators.
 Classes - define the logical groupings of data and functionality.
 Responsibilities - describe what the classes do.
 Collaborators -are the other classes with which a given class works.
18. What are the steps to be followed in a CRC card methodology?
a. Develop an initial list of classes:, Write an initial list of responsibilities and
collaborators
b. Create some usage scenarios, Walk through the scenarios Refine the classes,
responsibilities, and collaborators
19. Why is the verification of specification very important?
Verifying the requirements and specification is very important for the simple reason that
bugs in the requirements or specification can be extremely expensive to fix later on. A bug
introduced in the requirements or specification and left until maintenance could force an
entire redesign of the product
20. What is prototype?
Prototype is the model of the system being designed. Prototypes are a very useful tool when
dealing with end users—rather than simply describe the system to them in road, technical
terms, a prototype can let them see, hear, and touch at least some of the important aspects of
the system.
21. List the symbols used in SDL specification language.

Potrebbero piacerti anche