Professional Documents
Culture Documents
Assignment 2 Embedded System (2) Update
Assignment 2 Embedded System (2) Update
1. How does the processor, RAM, ROM and I/O units organized?
2. What is the significance of ARM processor?
-----Advanced RISC Machine (ARM) Processor is considered to be family of
Central Processing Units that is used in music players, smartphones,
wearables, tablets and other consumer electronic devices.
The architecture of ARM processor is created by Advanced RISC Machines,
hence name ARM. This needs very few instruction sets and transistors. It has
very small size. This is reason that it is perfect fit for small size devices. It has
less power consumption along with reduced complexity in its circuits.
They can be applied to various designs such as 32-bit devices and embedded
systems. They can even be upgraded according to user needs.
The main features of ARM Processor are mentioned below
1. Multiprocessing Systems –
ARM processors are designed so that they can be used in cases of
multiprocessing systems where more than one processors are used
to process information. First AMP processor introduced by name of
ARMv6K had ability to support 4 CPUs along with its hardware.
2. Tightly Coupled Memory –
Memory of ARM processors is tightly coupled. This has very fast
response time. It has low latency (quick response) that can also be
used in cases of cache memory being unpredictable.
3. Memory Management –
ARM processor has management section. This includes Memory
Management Unit and Memory Protection Unit. These management
systems become very important in managing memory efficiently.
4. Thumb-2 Technology –
Thumb-2 Technology was introduced in 2003 and was used to create
variable length instruction set. It extends 16-bit instructions of initial
Thumb technology to 32-bit instructions. It has better performance
than previously used Thumb technology.
5. One cycle execution time –
ARM processor is optimized for each instruction on CPU. Each
instruction is of fixed length that allows time for fetching future
instructions before executing present instruction. ARM has CPI
(Clock Per Instruction) of one cycle.
6. Pipelining –
Processing of instructions is done in parallel using pipelines.
Instructions are broken down and decoded in one pipeline stage. The
pipeline advances one step at a time to increase throughput (rate of
processing).
Large number of registers –
Large number of registers are used in ARM processor to prevent large amount
of memory interactions. Registers contain data and addresses. These act as
local memory store for all operations
4. What is a thread?
A thread on the other hand is defined as “a semi-independent program
----
segment that executes within a process”. For embedded software developers
working with microcontrollers, a process is essentially the entire application that
runs on the system. A thread is then a small program that has a specific function
and purpose within the overall application. Threads tend to be lower level than
tasks and have minimal overhead.
6. What is an exception?
--- Exceptions and interrupts are unexpected events which will disrupt the normal flow of
execution of instruction(that is currently executing by processor). An exception is an
unexpected event from within the processor. Interrupt is an unexpected event from
outside the process.
7. What is meant by a pipe?
--- A pipe is simply a set of storage locations, each big enough to hold a single data
item of user-defined byte length, access to which is controlled so that it may be
safely utilized by multiple tasks.
1 Concept The pipe is the Unix IPC form to Message Queue is a System VIPC
provide a flow of information in one form to store a list of messages.
Sr. Key Pipe Message Queue
No.
direction.
Creation A pipe can be created using pipe() A message queue is created using
function which returns two file msgget() function which returns a
2
descriptors, one is for reading and queue identifier.
another is for writing.
Data Data can be fetched in FIFO, First In Data can be fetched in any order.
4
Fetching First Out manner.
Priorities Priorities are not present in pipes. A message can have a priority by
5 attaching a priority number to
type(s) of the message(s).
Persistence A pipe is deleted from the system if A message queue remains active in
7 there is no linked receiver/sender the system until explicitly deleted
process is present. by some process.
Message A pipe message size can be up to 4096 A message queue message size can
8
Size Bytes. be up to 8192 Bytes.
Transactions
1. The token packet is the header defining the transaction type and direction, the
device address, and the endpoint.
2. Data is transferred in a data packet.
3. The final status of the transaction is acknowledges in the handshake packet.
Pipe Model
In a transaction, data is transferred either from the USB Host to an USB Device or vice-
versa. The transfer direction is specified in the token packet that is sent from the USB
Host. Then, the source sends a data packet or indicates it has no data to transfer. In
general, the destination responds with a handshake packet indicating whether the
transfer was successful.
Packet Model
Packets
A special packet is the Start-of-Frame packet (SOF) that splits the USB bus into time
segments. Each pipe is allocated a slot in each frame. The Start-of-Frame packet is sent
every 1ms on full speed links. At high speed, the 1ms frame is divided into 8
microframes of 125μs each. A Start-of-Frame packet is sent at the beginning of each
microframe using the same frame number. The frame number increments every 1ms.
12. Critically investigate about the utility of context, interrupt latency and interrupt service deadline
in the field of embedded systems.
13. Describe properly about interrupt-servicing mechanism. What do you mean by nonmaskable
and maskable interrupts?
14. State and explain about the design challenges faced during the design process of an embedded
system.
15. What is a serial port?
----. In computing, a serial port is a serial communication interface through which
information transfers in or out sequentially one bit at a time. This is in contrast to a
parallel port, which communicates multiple bits simultaneously in parallel.
S.
No. Synchronous Transmission Asynchronous Transmission
In Asynchronous transmission,
In Synchronous transmission, data data is sent in form of bytes or
1. is sent in form of blocks or frames. characters.
Asynchronous transmission is
2. Synchronous transmission is fast. slow.
While in Asynchronous
Efficient use of transmission lines transmission, the transmission
is done in synchronous line remains empty during a gap
7. transmission. in character transmission.
In fact, USB has become so common that you'll find the connection
available on nearly any computer-like device such as video game
consoles, home audio/visual equipment, and even in many
automobiles.
There are the scenarios in which more than one processes need to execute in critical
section simultaneously. However, counting semaphore can be used when we need to
have more than one process in the critical section at the same time.
In this mechanism, the entry and exit in the critical section are performed on the basis
of the value of counting semaphore. The value of counting semaphore at any point of
time indicates the maximum number of processes that can enter in the critical section
at the same time.
A process which wants to enter in the critical section first decrease the semaphore
value by 1 and then check whether it gets negative or not. If it gets negative then the
process is pushed in the list of blocked processes (i.e. q) otherwise it gets enter in the
critical section.
When a process exits from the critical section, it increases the counting semaphore by
1 and then checks whether it is negative or zero. If it is negative then that means that
at least one process is waiting in the blocked state hence, to ensure bounded waiting,
the first process among the list of blocked processes will wake up and gets enter in the
critical section.
The processes in the blocked list will get waked in the order in which they slept. If the
value of counting semaphore is negative then it states the number of processes in the
blocked state while if it is positive then it states the number of slots available in the
critical section.
GCC contains support for many languages (C, C++, Fortran, to name but a few). It's highly
portable, and widely used, and tends to produce good code. It can also be used as a
cross-compiler (compiling for a system other than the one running GCC).
It's the default compiler choice for most Unix-type systems because most vendors don't
bother to write their own compilers anymore - GCC is just too good for general use.
Under Windows, Microsoft's own dev tools are often preferred because they get support
for new technologies quicker.
34. Explain the importance of the following declarations for real time application model: static,
volatile and interrupt in embedded C.
35. What is System-on-Chip (SoC) and IrDA?
---. A system on a chip, also known as an SoC, is essentially an integrated circuit or an
IC that takes a single platform and integrates an entire electronic or computer system
onto it. It is, exactly as its name suggests, an entire system on a single chip. The
components that an SoC generally looks to incorporate within itself include a central
processing unit, input and output ports, internal memory, as well as analog input and
output blocks among other things. Depending on the kind of system that has been
reduced to the size of a chip, it can perform a variety of functions including signal
processing, wireless communication, artificial intelligence and more.
42. Why the new age microcontrollers are smarter than the older ones?
43. Make a classification of PIC microcontrollers on the basis of internal structures.
44. What are the different memory options available for PIC microcontrollers?
--- PIC memory organization divided into 3 types of memories: Program Memory, Data
Memory, and Data EEPROM.
45. Which is the entity controlling (scheduling) the transitions from one state to another in a task?
--- Schedulers are responsible for transferring a process from one state to the other.
50. Any application based embedded software of a given system is built up after selecting an
appropriate programming languge. What are the criterias of choosing the appropriate
programming language?
51. Analyse the feature in C that makes it popular high level language for an embedded system.
---- Although not originally designed for embedded software development, the C
language allows a range of programming styles from high-level application code
down to direct low-level manipulation of hardware registers. As a result, C has
become the most popular programming language for embedded systems today.
52. Why do you break a program into header files, configuration files, modules and function?
53. Why do you use an infinite loop in embedded software? Explain with proper justification.
----- Infinite loops are used in embedded systems so as to repeat the task required to be
performed by the system. By this the embedded system designed remains functional
through out its usage.
Personal computers have an operating system and once the program is executed, It
returns control on the operating system, where as on the other hand Embedded systems
do not have an operating system and therefore we cannot let the control fall out of the
program.
56. What is the difference between serial port and parallel port?
------
Serial Key
Ports
Purpose Serial Port is used for serial Parallel Port is used for
1
data transmission. parallel data transmission.
Serial Key
Ports
No. Of Wires Wire connections to serial port No. of wires that are
are quiet less as compared to connected to parallel port
4
parallel port. are quiet high as compared
to serial port.
Basic Principle Flip-flop utilizes an edge triggering Latch follows a level triggering
approach. approach.
Clock Signal The clock signal is present. The clock signal is absent.
Designed You can design it using Latches along You can design it using Logic gates.
Using with a clock.
Sensitivity Flip-flop is sensitive to the applied input Latches are sensitive to the applied
and the clock signal. input signal- only when enabled.
Classification You can classify a flip-flop into a A user cannot classify the Latch this
synchronous or asynchronous flip-flop. way.
Even if your chip is ARM and you have MB of RAM, 1 Gbit data rate from a CMOS camera
chip can max you out pretty fast. The best example that comes to mind is processing
image flow on ARM9 processor.
I have coded a consumer thread function that would run multiple consumers in order to
process large amount of data without draining RAM. I can see lots of uses of re-entrant
functions in protocol stacks in the embedded , personal computer, and server world.
In my case, I could split a large data pieces into smaller pieces and use the same thread
call as 8 consumers. RAM consumption and memory manipulation on smaller data pieces
had a significantly smaller footprint.
My bottle neck was IO on both sides of the re-entrant function(s). Having multiple
consumers enabled me to have IO going pretty much non-stop. While one consumer is
processing data, another consumer is using IO read/write calls.
---- Polymorphism in C++ allows us to reuse code by creating one function that's usable
for multiple uses. We can also make operators polymorphic and use them to add not only
numbers but also combine strings. This saves time and allows for a more streamlined
program.
62. State the utilities and features of JAVA that makes it a highly useful high level language for an
embedded system in many network related applications.
63. Each process or task has an endless loop in preemptive scheduler. How does the control of
resources transfer from one task to another?
64. What do you understand by throwing an exception? Evaluate the exception function handling
during execution of a routine.
---- The object, called an exception object, contains information about the error,
including its type and the state of the program when the error occurred. Creating an
exception object and handing it to the runtime system is called throwing an
exception.
65. Examine about the uses of hardware and software assigned priorities in an interrupt
mechanism.
---- Hardware interrupts are used by devices to communicate that
they require attention from the operating system. Internally,
hardware interrupts are implemented using electronic alerting
signals that are sent to the processor from an external device,
which is either a part of the computer itself, such as a disk
controller, or an external peripheral.
A software
interrupt
is caused either by an exceptional condition in the processor itself, or a special
instruction in the instruction which causes an
interrupt
when it is executed. The former is often called a trap or
exception and is used for errors or events occurring during
program executions that are exceptional enough that they
cannot be handled within the program itself.