0% found this document useful (0 votes)
39 views4 pages

Embedde-Question Bank 2 Marks

Uploaded by

skrish0807
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views4 pages

Embedde-Question Bank 2 Marks

Uploaded by

skrish0807
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

EITS51010 - Embedded System Programming

Question Bank

Two Marks all 5 Units

1. Identify the functional blocks involved in real time clock.


RTC's are comprised of a controller, oscillator, and an embedded quartz crystal
resonator.
2. Show the function of structural units in embedded processor.
The structural units of an embedded processor perform a variety of functions,
including:
 Processor: Also known as the CPU, the processor is the brain of the embedded
system, executing instructions and performing calculations. It takes in user data,
processes it, and returns an output.
 Memory: Stores instructions and data.
 I/O modules: Responsible for exchanging data between the processor, memory,
and external devices.
 Control unit: Includes a fetch unit that fetches instructions from memory.
 Execution unit: Contains circuits that implement instructions for data transfer and
conversion.
3. Compare and Contrast decision and control statements.

4. Examine variable scope and functions in C pre-processor.


A variable's scope is the region of code where it can be used. A variable's scope can
be local or global. Local variables are only available within the function or code
where they are declared, while global variables are available throughout the entire
program.
5. List the basic command-line options used in GCC for compiling a C program.
6. Test for debugging with GDB in Embedded system.
To debug embedded systems with GDB, you can try these steps:
Compile your code with the -g option
Type gdb
Type file nameOfExecutable at the prompt
When a bus error or seg fault occurs, the location in your source code will be
displayed
Type quit to exit the debugger
7. Utilize Header files for project with example.
 Define a user-defined header file, such as myheader.h, that contains a function
prototype
 Create a source file, such as myfunctions.c, that contains the function definition
Create another source file, such as section-main.c, that includes the user-defined
header file and uses the function
8. Distinguish between creating loop timeouts and creating hardware timeouts.
loop timeouts
 Use parallel activities to run a loop and a delay activity simultaneously. The delay
activity has a defined timeout, and if the delay ends before the loop, a
TimeoutException is thrown. Loop timeouts can help prevent infinite loops by
time-boxing the loop.
Hardware timeouts
 Use a hardware counter that counts down from a set value and triggers an event
when it reaches zero. The operating system uses hardware timeouts to schedule
tasks and keep track of time. Hardware timers are often used to measure short
time durations, such as those used in sonar sensors.
9. Analyse the concept of scheduling data transmission in embedded system.
 Earliest deadline first (EDF): This algorithm schedules tasks based on the deadline
that is closest. It is ideal for preemptive uniprocessor systems.
 Rate monotonic scheduling (RMS): This algorithm prioritizes tasks based on their
duration. It can guarantee time constraints up to 70% CPU load.
 Least laxity first: This algorithm schedules tasks based on slack time. However, it
doesn't perform well with mixed criticality tasks
10. Model the future of safe embedded system.
The future of embedded systems is inherently linked to sustainable practices. Energy-
efficient designs and power optimization will be critical considerations as embedded
devices become more pervasive.
11. Outline the methods of memory management in embedded systems.
There are two main methods of memory allocation: static and dynamic. Static
allocation means that the memory space is fixed at compile time and does not change
during runtime. Dynamic allocation means that the memory space is determined at
runtime and can vary depending on the program execution.
12. Show the function of a watchdog timer in an embedded system.
The watchdog timer watches the program. Its job is to monitor the CPU to ensure that
there are no faults occurring at a stage in the system. If the watchdog happens to
detect an error, it immediately sends a signal to reset the CPU.
13. Demonstrate the examples of different types of expressions in C and explain their
evaluation.
Expressions in C programing language combine operands, operators, and variables.
The evaluations of an expression in C happen according to the operator's precedence.
Once the expressions are processed, the result will be stored in the variable.
14. Explain the concept of inline assembly in C.
In computer programming, an inline assembler is a feature of some compilers that
allows low-level code written in assembly language to be embedded within a
program, among code that otherwise has been compiled from a higher-level language
such as C or Ada.
15. List the basic command-line options used in GCC for compiling a C program.
gcc filename.c – Compiles filename.c and produces an executable named a.out.
-o output_file – Specify the name of the output file.
16. Discover how to set breakpoints and inspect variables using GDB.
Setting breakpoints A breakpoint is like a stop sign in your code -- whenever gdb gets
to a breakpoint it halts execution of your program and allows you to examine it. To
set breakpoints, type "break [filename]:[linenumber]".
17. Examine why timeout mechanisms are important in real-time systems?
A response timeout determines how long a client should wait for a response from the
server after sending a request. If the server takes too long, the client will stop waiting
and give up. Why it's important: Response timeouts are critical for real-time systems
like online gaming or video calls.
18. Make use of structures and functions how encapsulation be achieved in C?
1. Forward-declare structures or provide handle typedef s to users.
2. Declare an initialization function that can generate an “object” of the appropriate
type and return the handle to the user.
3. Declare a destructor that can free any memory allocated to the “object” with the
associated handle.
19. List the common probability issues in embedded systems, and how can they be
mitigated?
Hardware Failure Probability:

 Issue: Components may fail due to manufacturing defects, environmental


conditions, or wear over time.
 Mitigation:
o Redundancy: Use redundant components or systems to ensure continued
operation in case of failure.
o Monitoring: Implement health monitoring to detect failures early.
o Derating: Operate components below their maximum ratings to enhance
reliability.

Software Bugs and Faults:


 Issue: Software can contain bugs that may lead to unexpected behavior or system
crashes.
 Mitigation:

 Testing: Conduct rigorous testing, including unit testing, integration testing, and
system testing.
 Static Analysis: Use static analysis tools to catch potential errors during
development.
 Formal Verification: Apply formal methods to verify the correctness of critical
algorithms

20. Organize the key components and functionality of an intruder alarm system
implemented using SEOS.
Control Panel.
Alarm Keypad.
Door and Window Contacts.
Glass Break Detectors.
Motion Detectors.
System Interruption Sensors.
Backup Battery.

You might also like