Embedded Systems 2marks
Embedded Systems 2marks
(i) A class binds all the member functions together for creating objects. The
objects will have memory allocation as well as default assignments to its
variables that are not declared static. Let us assume that each software timer
that gets the count input from a real time clock is an object. Now consider the
codes for a C++ class RTCSWT. A number of software timer objects can be
created as the instances of RTCSWT.
(ii) A class can derive (inherit) from another class also. Creating a child class
from RTCSWT as a parent class creates a new application of the RTCSWT.
(iii) Methods (C functions) can have same name in the inherited class. This is
called method overloading. Methods can have the same name as well as the
same number and type of arguments in the inherited class. This is called
method overriding. These are the two significant features that are extremely
useful in a large program.
5. What are then the disadvantages of C++ ?
Program codes become lengthy, particularly when certain features of the standard C++
are used. Examples of these features are as follows:
(a) Template.
(e) Classes for IO Streams. [Two library functions are cin (for character (s) in) and cout
(for character (s) out). The I/O stream class library provides for the input and output streams of
characters (bytes.
11. What are the Java has advantages for embedded programming ?
1. Java is completely an OOP language.
2. Java has in-built support for creating multiple threads. [For the definition of thread and its
similarity in certain respects to task refer to Section 8.1.] It obviates the need for an operating
system (OS) based scheduler [Section I.5.6] for handling the tasks.
3. Java is the language for most Web applications and allows machines of different types to
communicate on the Web.
4. There is a huge class library on the network that makes program development quick.
5. Platform independence in hosting the compiled codes on the network is because Java
generates the byte codes. These are executed on an installed JVM (Java Virtual Machine) on a
machine. [Virtual machines (VM) in embedded systems are stored at the ROM.] Platform
independence gives portability with respect to the processor used. 6. Java does not permit pointer
manipulation instructions. So it is robust in the sense that memory leaks and memory related
errors do not occur. A memory leak occurs, for example, when attempting to write to the end of a
bounded array.
7. Java byte codes that are generated need a larger memory when a method has more than 3 or 4
local variables. 8. Java being platform independent is expected to run on a machine with an RISC
like instruction execution with few addressing modes only.
2. Briefly Explain about Various types and uses of RAM and ROM for designing embedded
systems.
4. Briefly explain how control data flow graph is used to model a program.
5. Explain how graphs can be used to model partitioning and scheduling of multiprocessors
systems.
8. Explain the role of target system in the design process of an Embedded system.
10. Explain various structural units of a processor in an Embedded system with a neat diagram.
12. Explain the state machine programming models for event controlled program flow.
26. Explain use of scopes and logical analyzer for system hardware test.