valliammai engineering college -...

27
VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANKULATHUR- 603 203 CS2364-EMBEDDED SYSTEMS VI SEM EIE 1 & 2 QUESTION BANK UNIT I - INTRODUCTION TO EMBEDDED SYSTEMS PART A 1. How embedded systems are different from conventional PC? An Embedded system is a specific to a application, whereas a computer system is generic. Though the components are same there is substantial difference in them. A personal computer is not designed to perform a specific function, rather it is able to do many things. The essential difference is that a computer when manufactured is in blank state, the manufacturer does not know what the customer will do with it, while an Embedded system is application specific. An Embedded systems is a component within some large systems. If required each of the embedded systems are connected by a sort of a communication network. Numerous embedded systems make up the computer system The difference between an embedded system and a general purpose computer system is one of purpose, and to a much lesser extent, design. While a general purpose system can be used for many things, an embedded system is only meant for one purpose 2. What are the different types of memory used in embedded system design? RAM (internal External) ,ROM/PROM/EEPROM/Flash ,Cache memory 3. What are the main components of an embedded system? The three main components of an embedded system are 1. Hardware 2. Main application software 3. RTOS 4. What are the various classifications of embedded system? Small scale embedded systems ,Medium scale embedded systems ,Sophisticated embedded systems

Upload: truonganh

Post on 15-Apr-2018

217 views

Category:

Documents


1 download

TRANSCRIPT

VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANKULATHUR- 603 203

CS2364-EMBEDDED SYSTEMS

VI SEM EIE 1 & 2 QUESTION BANK

UNIT I - INTRODUCTION TO EMBEDDED SYSTEMS

PART A 1. How embedded systems are different from conventional PC?

• An Embedded system is a specific to a application, whereas a computer system is generic.

• Though the components are same there is substantial difference in them.

• A personal computer is not designed to perform a specific function, rather it is able to

do many things.

• The essential difference is that a computer when manufactured is in blank state, the manufacturer does not know what the customer will do with it, while an Embedded

system is application specific.

• An Embedded systems is a component within some large systems.

• If required each of the embedded systems are connected by a sort of a communication network.

• Numerous embedded systems make up the computer system

The difference between an embedded system and a general purpose computer system is one of purpose, and to a much lesser extent, design. While a general purpose system can be used for many things, an embedded system is only meant for one purpose

2. What are the different types of memory used in embedded system design?

RAM (internal External) ,ROM/PROM/EEPROM/Flash ,Cache memory 3. What are the main components of an embedded system?

The three main components of an embedded system are 1. Hardware

2. Main application software

3. RTOS

4. What are the various classifications of embedded system? Small scale embedded systems ,Medium scale embedded systems ,Sophisticated embedded systems

5. Mention the major challenges in embedded system design.

Hardware needed

Meeting the deadlines

Minimizing the power consumption Design for upgradeability

6 . Which type of memory is suitable for embedded systems? Justify your answer. Common memory types in Embedded Systems Memory RAM Hybrid ROM DRAM SRAM

N

VRAM Flash EEPROM EPROM PROM Masked

Types of memory

• Many types of memory devices are available for use in modern embedded systems, the difference between them need to be known to use them effectively.

• Other than the ROM and RAM there is a third kind of memory device called

hybrid memory which exhibits some of the characteristics of both.

• Among all the types NVRAM, the non-volatile RAM is fairly common in embedded systems, even after its high cost.

7. List any four Embedded Computory applications.

ACVM

Stepper motor controllers for a robotic system Washing or cooking system Multitasking toys

8 . What is the need for memory management in Embedded Systems?

ide storage for the software that it will run. 9. Why does a program reside in ROM in embedded systems?

Final stage software is also called as ROM image .The final implement able software for a product embeds in the ROM as an image at a frame. Bytes at each address must be defined for creating the image.

10. What is the need for watchdog timer?

A watchdog timer resets the microprocessor and starts the software over from the beginning if the software does not restart it periodically. It is used to rescue the system if a fault develops and the program gets stuck.

11. What are embedded Real time systems? Give an example.

In real time system the task in hand must be completed within a bounded time. Eg.ACVM,

12. 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.

1 3. What types of hardware parts are typically found in ES? Write in brief.

er source 14. List the h/w architecture used in embedded system. Input,output,CPU,RAM.ROM.Application specific IC 15. What is the difference between Hard RealTime and Soft Real Time systems?

Hard Real Time system is a Real Time system where missing a deadline could cause drastic

results that could lead to loss of life and / or property is called a hard real-time system.

Examples are aircraft, biomedical instruments (like pacemakers), nuclear reactors etc.

SoftReal Time system is a realtime system where a few missed deadlines may not cause any

significant inconvenience to the use. Examples are TV, multimedia etc.

16. What do you mean by pre-processing?(or)What are preprocessor macros?

This is the first step in the build process. The preprocessor strips the comments, expands the include files and expands MACRO and replaces symbolic constants

17. What are the steps involved in the build

process? The steps involved are

1. Preprocessing

2. Compiling

3. Linking

4. Locating 18. What is an Editor?

It is software for writing C codes or assembly mnemonics using the keyboard of PC for

entering the program. It allows entry, deletion, insert, appending previously written lines or files, merging record and files at specific positions.

19. What is a compiler?

Compiler is a program that creates an object file from the source codes. It checks the language grammar/semantics. For eg: tcc. It converts high level language codes into machine codes.

2 0. List out the factors to be considered while writing embedded application programs.

The various factors that must be considered while writing embedded

application program are:

Throughput Response Testability

Debug ability Reliability

PART B

1. Explain the memory management concepts in embedded system design.(8)Explain how real

time systems differ from conventional system? What is the necessity of real time system in

embedded applications?(8) 2. (i)With neat block diagram explain the embedded system design process.(8) (ii) Explain the

significance of EEPROM and SRAM in an embedded system.(8) 3. List and explain the various hardware units that must be present in the embedded

systems.(16) 4. (i) Explain the various form of memories present in an embedded system.(8) (ii)Explain the

software tools in designing of an embedded system.(8) 5. Explain in brief about the various steps involved in the Embedded System design

process.(10) . Describe the basic block diagram of embedded real time system.(6) 6. Explain the need for memory management .Discuss in detail about the different memory

management methods.(10) .Discuss in detail about embedded computory applications.(6). 7. Explain in detail about the different ‘Embedded Processors’ in a system.(16) 8. Explain the different types of single purpose processors.(8) . Discus the different modules

of modern embedded system.(8) 9. Explain the components of embedded system hardware in a cell phone and contact-less

smart card.

10. Explain the process of converting high level language application software in to a ROM image for an embedded system .

UNIT II - EMBEDDED SYSTEM ORGANIZATION

PART A 1. Why device drivers are necessary for interfacing a device with a processor?

A system has number of physical devices. A device may have multiple functions. Each device function requires a driver. A common driver or separate drivers for each device function are required. It plays a key role in most embedded system as these provide software layers between application and devices. Drivers control almost all devices except the memory devices and processors in a system.

2 . List the major features of USB bus. The Universal Serial Bus has the following features:

• The computer acts as the host. • Up to 127 devices can connect to the host, either directly or by way of USB

hubs. • A device can be attached, configured and used, reset, reconfigured and

used, share the bandwidth with other devices, detached and attached. • Individual USB cables can run as long as 5 meters; with hubs, devices can be

up to 30 meters (six cables' worth) away from the host. 3. 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

4. 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

5. List the main features of PCI/X bus.

PCI X offers more speed over PCI. 30 times more speed than PCI.

6 . What are the different modes of DMA transfer? Which one is suitable for embedded system?

Single transfer at a time and then release of the hold on the system bus. Burst transfer at a time and then release of the hold on the system bus. A burst may be of a few kB. Bulk transfer and then release of the hold on the system bus after the transfer is completed.

7. Define pipelining?

A form of computer organization in which successive steps of an instruction sequence are executed in turn by a sequence of modules able to operate concurrently, so that another

instruction can be begun before the previous one is finished. 8. What do you mean by device register and device address?

A Device Register is the view any device presents to a programmer. Each programmable bit in the device is presented with a logical address and it appears as a part of a byte in the device registers. Then programming of these bits can be achieved by reading from or writing to these device registers. Most devices have at least these two device registers:

1. Data Register: to which the data to be input/output is read from/written to the device. 2. Control/Status: Which selects/shows the mode of operation of the device.

A device address is a memory location from where a computer component can read data or send data. 9. What is a CAN bus? List the main features of CAN bus. Controller–area network (CAN or CAN-bus) is a vehicle bus standard designed to allow microcontrollers and devices to communicate with each other within a vehicle without a ost computer. h

It has fields for bus arbitration bits, control bits for address and data length data bits, CRC check bits, acknowledgement bits and ending bits. 10. How suitable memory will be selected for the design of the embedded system?

Software designer coding is over and the ROM image file is ready, a hardware designer of a system is faced with the a questions, of what type of memory and what to use, how much size of each, should be to used.

Following are the factors that are to be considered while selecting the memory devices,

• Speed • Data storage size and capacity • Bus width • Latency • Power consumption • Cost

SRAM’s have lower data storage and capacity hence they are suitable for lower end systems where as SDRAM for higher end systems with complex requirements. 11. What are the additional structural units in advanced embedded processor?

Additional structural units in advanced embedded processor which may be used are FLPU (Floating point processor Unit), MMU (Memory Management Unit), PFCU (Prefetch control Unit) etc. It also includes instruction pipelining unit, which improves performance by processing instruction in multiple stages and RISC architecture which executes most instructions in single cycle.

12. State the major function of timer device in an embedded system.

The system clock in configured from a hardware timer. One of the hardware timer ticks from the inputs form the internal clock of the processor and generates the system clock. Using the system clock, number of hardware timers can be driven.

1 3. What are the advantages of USB bus?

With USB 2.0, the bus has a maximum data rate of 480 megabits per second.

A USB cable has two wires for power (+5 volts and ground) and a twisted pair of wires to carry the data.

On the power wires, the computer can supply up to 500 milliamps of power at 5 volts.

Low-power devices (such as mice) can draw their power directly from the bus. High-power devices (such as printers) have their own power supplies and draw minimal power from the bus. Hubs can have their own power supplies to provide power to devices connected to the hub.

USB devices are hot-swappable, meaning you can plug them into the bus and unplug them any time.

Many USB devices can be put to sleep by the host computer when the computer enters a power-saving mode.

The devices connected to a USB port rely on the USB cable to carry power and data. A device can be attached, configured and used, reset, reconfigured and used, share the bandwidth with other devices, detached and reattached.

14. Write the function of One Time Device programmer?

A one-time programmable device can only be programmed once. Once programmed, it cannot be re-programmed. All fuse- and anti-fuse-based devices are one-time programmable. EPROM-based devices in plastic packages are one-time programmable.

1 5. Give any two uses of timer devices.

Timer devices are needed for a number of uses in a system.

(i) There are can be only a limited number of hardware timers present in the system. The system clock in configured from this. One of the hardware timer ticks from the inputs form the internal clock of the processor and generates the system clock. Using the system clock, number of hardware timers can be driven.

(ii) A software timer is software that executes and increases or decreases a count variable on

an interrupt on a timer output or real time clock interrupt. It can also generate interrupt on overflow of count value or finishing value of count variable.

16. What is CAN Bus?

Controller–area network (CAN or CAN-bus) is a vehicle bus standard designed to allow

microcontrollers and devices to communicate with each other within a vehicle without a host

computer. It is a standard bus in a distributed network. It has a serial line, which is

bidirectional. It receives or sends a bit at an instance by operating at a maximum rate of 1

Mbps. It employs twisted pair connection to each node.CAN is a message based protocol,

designed specifically for automotive applications but now also used in other areas such as

industrial automation and medical equipment. 1 7. Give any 3 examples of advanced serial high speed buses.

The examples of advanced serial high speed buses are as follows:

1. IEEE 802.3-2000[1 Gbps bandwidth Gigabit Ehternet MAC) 2. IEE P802.3oe draft 4.1[10 Gbps bandwidth Gigabit Ehternet MAC 3. XAUI(10 Gigabit Attachment Unit) 4. XSBI(10 Gigabit Serial Bus Interchange) 5. SONET OC-48 6. SONET OC-192 7. SONET OC-768 8. ATM OC-12/46/192

1 8. What are the difference between a half & full duplex data transfer?

Half duplex: Transmission occurs in both the direction, but not simultaneously.

Ffull duplex : Transmission occurs in both the direction, simultaneously

1 9. Justify embedded system design is so complex.

An embedded system has software designed to keep in view three constraints: (i) available systemmemory, (ii) available processor speed and (iii) the need to limit power dissipation when running the system continuously in cycles of wait for events, run, stop and wake-up.

2 0. 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.

PART B 1.(i)Draw the CAN data frame format and explain the bus arbitration process in CAN protocol(8)

(ii) Why PCI/X buses are used for high speed data transfer?List the major features of

PCI/X bus.(8) 2. (i)Compare the features of timers and counters .List any four embedded application which ses timers.(8) (ii)How to transfer a byte using I

2 C. u

3 . Explain the following parallel communication devices: (16) (i) ISA bus (ii)PCI and PCI/X

4. Explain the timer and counting devices in an embedded system organization.(16) 5. Discuss in detail the function of major structural units in embedded systems?(16)

6. Explain the functions of device drivers(6).Explain how data is transferred between USB and PCI bus?(10). 7. Explain in detail about the allocation of memory to program segments, blocks and memory

ap of a system. m 8. Explain the features of buses and common modes used for serial communication. 9. Describe the various components of synchronous serial input and output ports.(8).Explain the features and characteristics of asynchronous serial input and output ports.(8) 10. Explain how suitable processor and memory devices are selected for an embedded system design. (8).Explain the function of timing and counting devices in embedded systems(8).

UNIT III PROGRAMMING AND SCHEDULING

PART A 1. What are the advantages and disadvantages of maskable and non-maskable interrupts?

A maskable interrupt may be prevented from executing by setting a bit in a cpu

register. A NMI is a hardware thing, and will load the program counter with its

execute address regardless of settings

Maskable interrupts : Hardware interrupts that can be enabled and disabled by software.

Non-maskable interrupt : It is a computer processor interrupt that can not be ignored by

standard interrupt masking techniques in the system.

2. What is context switching? What are the advantages of context switching?

The actual process of changing from one task to another is called a context switch.

3. Define semaphores.

It is special variable used to take note of certain actions to prevent another task or event

from proceeding

4. Differentiate preemptive and non-preemptive multitasking.

Non-Preemptive: Non-preemptive algorithms are designed so that once a process enters the

running state (is allowed a process), it is not removed from the processor until it has

completed its service time (it explicitly yields the processor).

Preemptive: Preemptive algorithms are driven by the notion of prioritized computation. The

process with the highest priority should always be the one currently using the processor. If a

process is currently using the processor and a new process with a higher priority enters, the ready list, the process on the processor should be removed and returned to the ready list until

it is once again the highest-priority process in the system.

5. What are non maskable interrupts? State how NMI’s are important for embedded systems?

Non-maskable interrupt : It is a computer processor interrupt that cannot be ignored by

standard interrupt masking techniques in the system. It is typically used to signal attention

for non-recoverable hardware errors.

6. What are the advantages and disadvantages of interrupt driven data transfer?

The advantage of interrupt-driven input or output is that it is efficient. It avoids polling loops

and waiting for an I/O transaction to occur. Moreover, it can be turned off (temporarily) to

defer to higher interrupt priorities; that is, requests from a keyboard, mouse or printer can be

made to defer to interrupt requests from a disk which is a higher-priority device.

Interrupt-driven I/O is slightly more complicated that memory-mapped (i.e., polled) I/O.

However, its only real disadvantage is that in a complex system with many I/O devices, it is

possible that some low-priority devices may have to wait for a long time before they are

serviced 7. Define interrupt latency.

In computing, interrupt latency is the time that elapses from when an interrupt is

generated to when the source of the interrupt is serviced. For many operating systems,

devices are serviced as soon as the device's interrupt handler is executed. Interrupt

latency may be affected by microprocessor design, interrupt controllers, interrupt

masking, and the operating system's (OS) interrupt handling methods. 8. What is the importance of disability of interrupts in Embedded System ?

When entering an interrupt handler, we first "disable interrupts" on that cpu. During the

time that interrupts are disabled, assume say the user pressed the letter 'a' on the keyboard

that would usually cause an interrupt. But since interrupts are disabled, does that mean

that: 1. the interrupt handler for 'a' would never be invoked, since interrupts are disabled

in the critical section or 2. be handled by the os but delayed, until interrupts are enabled

again. Specifically, will the user need to press 'a' again, if the first time he pressed 'a' was

at a time when interrupts were disabled . 9. Define Context switching. How it will affect the system performance ?

A context switch is a procedure that a computer's CPU (central processing unit) follows

to change from one task (or process) to another while ensuring that the tasks do not

conflict. Effective context switching is critical if a computer is to provide user-friendly

multitasking. Most modern CPUs perform context switches by means of software

(programming). A modern CPU can perform hundreds of context switches per second.

Therefore, the user gets the impression that the computer is performing multiple tasks in

a parallel fashion, when the CPU actually alternates or rotates between or among the

tasks at a high rate of speed. 1 0. What are the different thread states?

a. Running

b. Ready

c. Waiting 11. List out the various components of process control blocks.

Process state: new, ready, running, waited, halted, etc. Program counter: contents of the PC

CPU registers: contents of the CPU registers

Memory 12. Mention the consequences of context switching.

Time taken for switching from one process to other is pure over head. Because the system does no useful work while switching. So one of the solutions is to go for threading when ever possible.

13. Compare and contrast the binary semaphore and counting semaphore.

Counting semaphore can range over infinite domain whereas the binary semaphore can range between 0 and 1. Binary semaphore can be used to deal with multiple processes (more than 2).

14. What is a thread?

A thread is a light weight process and a task can call another task but a thread cannot.

15. Define Synchronization.

Synchronization refers to one of two distinct but related concepts: synchronization of

processes, and synchronization of data. Process synchronization refers to the idea that

multiple processes are to join up or handshake at a certain point, so as to reach an

agreement or commit to a certain sequence of action. Data synchronization refers to the

idea of keeping multiple copies of a dataset in coherence with one another, or to maintain

data integrity. Process synchronization primitives are commonly used to implement data. 16. Define Inter process communication.

Inter-process communication (IPC) is a set of techniques for the exchange of data among

multiple threads in one or more processes. Processes may be running on one or more

computers connected by a network. IPC techniques are divided into methods for message

passing, synchronization, shared memory, and remote procedure calls (RPC). 17. What is shared data problem?

When several functions share a variable, and at an instant the value of that variable

operates and during the operations on it, only a part of the operation is completed and a

part remains incomplete and at that moment assume that there is an interrupt. Now, if

there is another function that also shares the same variable that also shares the same

variable, the value of variable may differ from the one expected if the earlier operation

had been completed. The incomplete operation can also occur.

Shared data problem can arise in a system when another high priority task finishes an operation and modifies the data or variable. Disabling interrupt mechanism, using semaphores and using reentrant functions are some solutions.

18. Define Semaphore. What are the uses of semaphores?

A semaphore is a protected variable or abstract data type that provides a simple but

useful abstraction for controlling access by multiple processes to a common resource in a

parallel programming environment. It records the number of units of a particular resource

are available, coupled with operations to safely (i.e. without race conditions) adjust that

record as units are required or become free, and if necessary wait until a unit of the

resource becomes available.

Semaphores are a useful tool in the prevention of race conditions and deadlocks,

however their use is by no means a guarantee that a program is free from these problems.

Semaphores which allow an arbitrary resource count are called counting semaphores,

whilst semaphores which are restricted to the values 0 and 1 (or locked/unlocked,

unavailable/available) are called binary semaphores. 19. Distinguish between process and task.

A process is a code that has its independent program counter values and an independent

stack. It is a computational unit that processes on a CPU under the control of a scheduling

kernel of an operating system

It is a computational unit or a set of codes, actions or functions that processes

on a CPU under the control of a scheduling kernel of an operating system. Every

task has a TCB. 2 0. Define multithreading.

The process by which one threads forks out many threads and a job is

assigned to each thread.

PART B

1. (i)What is shared data problem? How to prevent shared data problem?Explain with an

example (ii)Give an example to justify the necessity of preemptive and non-preemptive

multitasking in an embedded system.(16) 2. What is interrupt latency? How to prevent interrupt overrun and disable interrupts?(8)Explain multithreaded programming with an example.(8) 3. (i) Explain the critical section operation by a pre-emptive scheduler.(8) (ii) Explain any one real time scheduling mechanism.(8) 4. Explain what is interrupt overrun? Describe how to prevent the interrupt overrun. Discuss about multithreaded programming.(16) 5. Explain the principle of preemptive and non preemptive multitasking. Discuss about the cheduling algorithms suitable to these two types of multitasking.(16) s

6. Explain in detail about the interrupt servicing mechanism in embedded real time systems.(16) 7. Explain in detail about the use of semaphores for the critical sections of a task with necessary diagram.(16) 8. Discuss about the Intel I/O instructions. Explain the effect of synchronization and data transfer ate on I/O operations.(16) r

9. Describe the interrupt driven I/O operations. Explain different types of interrupts. 10. Discuss the following:

a. Non Maskable Interrupts (6) b. Prevention of Interrupt overrun(5)

c. Interrupt driven I/O (5)

UNIT IV REAL-TIME OPERATING SYSTEMS

PART A 1. Compare the difference between RTOS and Operating System.

A regular OS focuses on computing throughput while an RTOS focuses on very fast

response time. OS are used in a wide variety of applications while RTOSes are generally

embedded in devices that require real time response

OS use a time sharing design to allow for multi-tasking while RTOSes either use a time

sharing design or an even driven design. The coding of an RTOS is stricter compared to

a standard OS 2. List any four commercial RTOS.

VxWorks

QNX

µCos

RTLinux 3. What is active task in the context of Vx works?

Active task means that it is in one of the three states, ready, running, or waiting. 4. Name some benchmarks related to RTOS.

Cooperative context switching

Preemptive context switching Interrupt processing Interrupt processing with preemption Message passing Semaphore processing Memory allocation and deallocation .

5. State the significant features of QNX.

QNX is a product from QNX Software System Ltd. QNX Neutrino offers POSIX-compliant APIs and is implemented using microkernel architecture.

Because of the fine grained scalability of the micro- kernel architecture, it can be

configured to a very small size – a critical advantage in high volume evices, where even a

1% reduction in memory costs can return millions of dollars in profit

6. List the functions of kernel. 7

. What are the functions performed by Realtime OS in an embedded system?

Task Functions:

• OSTaskCreate --- Creates a new task

• OSSimpleTaskCreate --- A macro that sets up the stack and starts the task at the proper priority

• OSTaskDelete --- Deletes a task

• OSChangePrio --- Changes a tasks priority

Time Delay Functions:

• OSTimeDly --- Delay or sleep for a fixed interval

• OSChangeTaskDly --- Changes the interval for a waiting task

Task Locking Routines:

• OSLock --- Locks the OS and prevents task switches

• OSUnlock --- Unlocks the OS

• OSLockObj --- A C++ class to make task locking easy

Semaphore Routines:

• OSSemInit --- Initializes an OS_SEM structure

• OSSemPost --- Post to a semaphore

• OSSemPend --- Pend on a semaphore

• OSSemPendNoWait --- Pend on a semaphore without waiting

8. Mention the features of RT Linux.

Scheduling.

Resource Allocation. Interrupt Handling.

Other issues like kernel size.

9. What are the goals of operating

system? The goals of OS are

• Facilitating easy sharing of resources as per schedule and allocations.

• Facilitating easy implementation of application software

• Optimally scheduling the processes on one or more CPUs if available by providing appropriate context switching mechanism

• Providing management functions for the processes, memory and I/Os and for other

functions for which it is designed. 10. What are the two structures modes of OS?

The two structure modes of OS are User mode and supervisor mode. 1 1. What are the structural units of an OS?

The structural units are

a. Application software

b. API

c. System software

d. Hardware-OS

e. Interface Hardware 12. What is the need for a well tested and debugged RTOS?

A readily available RTOS package provides an advantage that the previously tested and

debugged RTOS functions and error and exception handling functions can be ported directly

as these are already well tested by thousands of users. Tools for the source code engineering,

testing, simulating and debugging may also be available with an RTOS package. 13. When is an RTOS necessary and when it is not necessary in an embedded system?

An RTOS becomes essential when there is processing and servicing of multiple devices and

therefore of multiple tasks with real time constraints in a sophisticated application. Two

essential services of RTOS are inter-process communication and scheduling in addition to

other OS services. 14. What is POSIX? List its main features.

POSIX stands for Portable Operating System Interface. Its main features are the family of

standards specified by the IEEE for maintaining compatibility between operating systems.

POSIX defines the application programming interface (API), along with command line shells

and utility interfaces, for software compatible with variants of Unix and other operating

systems.

• Open Software which includes interoperability and portability

• Defines the interfaces to OS

• Defines the semantics of different system calls Specifies the system calls that an OS need to support

15. List few memory allocation related functions.

malloc()

calloc()

realloc()

free() 1 6. Write the advantages of mail boxes in RTOS.

A message mailbox is an IPC queue that can be used only by a single destined task. 1 7. What are the features of Vx WORKS?

The uses of VxWORKS are the following.

• Multitasking Environment

• Inter-process Communication

• Synchronization using event flag, mutually exclusive access using resource key(mutex) and counting mechanism using three types of semaphores in the tasks and ISRs.

• Synchronization using POSIX standard semaphore and other IPCs

• Watchdog Timers

• Virtual I/O devices using pipes

• Virtual memory management functions

18. What are the task service functions supported by MUCOS?

void OSInit (void) void OSStart(void) voidOSTickInit(void)

void OSIntEnter(void)

void OSIntExit(void) 19. What is RPC? Remote procedure call is method used for connecting two remotely placed methods

by first using a protocol for connecting the processes. It is used in the case of

distributed tasks. 20. What are the three methods by which an RTOS responds to a hardware source call on interrupt?

n of a scheduled task. by the RTOS

PART B 1. List the major features of Windows RTOS. What is the significance of benchmarking real time systems? How Vx works is different from µc OS-II?(16) 2. (i)Explain the goals of operating system services.(8) (ii) Explain the three alternative systems in RTOS for responding a hardware source call with a neat sketch.(8) 3. (i)Explain the features of Vx works RTOS.(8) (ii) Explain the case study of an embedded system for a smart card.(8) 4. Explain the services of UNIX based real time operating systems. Compare its features with Windows based real time operating systems(16) 5. Discuss in detail the contemporary real time operating systems VxWorks, Linux and PSOS.(16) 6. Explain the features of windows based RTOS(8).Explain interrupt handling in POSIX RTOS(8) 7. Describe the features of various Contemporary Real Time Operating Systems.(16). 8. Describe the basic concepts of RTOS.What are the different types of RTOS? Explain the features of Micro OS-II (16). 9. Explain interrupt handling in RTOS environment(8).Discuss about the services of Unix based

TOS(8). R 10. Explain the 3 co-operative scheduling mechanisms used by RTOS schedulers.(16)

UNIT V PIC MICROCONTROLLER BASED EMBEDDED SYSTEM DESIGN

PART A

1. Compare CISC and RISC architectures. Give an example for each

architecture. CISC instructions utilize more cycles than RISC

CISC has way more complex instructions than RISC

CISC typically has fewer instructions than RISC

CISC implementations tend to be slower than RISC implementations

Computers typically use CISC while tablets, smartphones and other devices use RISC 2. List any four embedded applications where PIC is used as a major hardware

part.

Digital watches, elevators, automobile engines, thermostats & instruments

that are driven by microcontrollers and their software. 3. Why we need Flash memory?.

Flash memory is for porting the program very fastely in the targeted hardware. 4. What is a preprocessor directive?

A preprocessor directive starts with ‘#’ sign. The following are the types of preprocessor

directives: 1. Preprocessor global variables

2. Preprocessor constants 5. What are the major structural units in PIC Microcontroller? Processing

engine, Program memory, data memory and Input/Output. 6. What is the function of MBASIC compiler?

MBasic compiler is a professional version software in which we are having assembler, debugger, compiler and all the development tools integrated in an IDE.

7. What is a cross compiler?

A cross compiler is a compiler capable of creating executable code for a platform other than

the one on which the compiler is running. For example, a compiler that runs on a Windows 7

PC but generates code that runs on Android smartphone is a cross compiler.

8. List any three applications of PIC based embedded system. HVAC,VCRs,digital watches, elevators, automobile engines, thermostats & instruments that are driven by microcontrollers and their software.

9. Specify the size of memory supported by PIC Microcontroller

PIC16F887 Microcontroller- 8K ROM memory in FLASH technology, 256

bytes EEPROM memory , 368 bytes RAM memory.

10. Mention the major components on PIC Microcontroller based development board.

In-circuit debugger Free integrated development environment (IDE) Free Assembler and Simulator

11. List the features which make PIC microcontroller suitable for embedded system.

In fact a PIC microcontroller is an amazingly powerful fully featured processor with internal RAM, EEROM FLASH memory and peripherals.

12. Mention the three components of MBASIC

compiler. MBasic compiler comprises of three main

elements. MBasic compiler software

The computer requires an RS232 port for connection to ISP-PRO programmer board. A second RS232 port is useful to capture any serial information from the program developing.

ISP-PRO programmer

MBasic after the assembly stage completes generates Microchip compatible standard

Hex file that must be loaded into PIC. Basic Micro offers a programmer ISP-PRO

integrated with the MBASIC compiler that automatically loads HEX code file.

Development Board Basic Micro offers plug board style development boards and solder-in prototype boards

for 8 pin, 18-, 28- and 40 pin PICs. These boards have an RJ11 connector for the ISP-PRO

connection and an RS232 port that may be used by PIC for communications to the outside

world.

13. What is the difference between a compiler and interpreter? The interpreter takes one statement then translates it and executes it and then takes another

statement. While the compiler translates the entire program in one go and then executes it.

· Compiler generates the error report after the translation of the entire page while an

interpreter will stop the translation after it gets the first error.

· Compiler takes a larger amount of time in analyzing and processing the high level

language code comparatively interpreter takes lesser time in the same process.

· Besides the processing and analyzing time the overall execution time of a code is faster for

compiler relative to the interpreter.

14. List the naming rule for constants, variables and subroutine names for the MBasic :

MBasic permits variables and constants to have names upto 1024 long. Reserved words should not be used. All names are case insensitive

15. Write the various addressing modes of PIC micro controller. Direct Addressing Indirect Addressing

16. List some I/O ports of PIC microcontroller.

Port is medium through which controller communicates with the outside orld. Pic microcontroller has 5 I/O ports.

17. List the temperature ranges of PIC microcontroller.

C-Commercial 00

C to 85 0

C Industrial -40

0C to 85

0C

E-Extended -400

C to1250

C 18. What is the family number available in PIC

icrocontroller? Pic12, Pic14, Pic16, Pic18 are the family members.

19. Explain “E” in PIC microcontroller?

It is the temperature range designator, E-Extended -400

C to1250

C 20. Explain Harvard Architecture?

PICs use the Harvard Architecture, Used mostly in RISC CPUs Separate program

bus and data bus: can be different widths! For example, PICs use:Data memory

(RAM): a small number of 8 bit registers.Program memory (ROM): 12bit, 14bit or

16bit wide (in EPROM, FLASH, or ROM)

PART B 1. Draw the functional block diagram of PIC microcontroller and explain the function of each lock.(16) b

2. How to generate PWM using PIC Microcontroller? Explain it with an example. Explain

how to interface keyboard and LED’s with PIC microcontroller (16)

3. Explain MBasic compiler related to PIC microcontroller.(16) 4. Explain any one embedded application with PIC based microcontroller.(16) 5. a. Explain the architecture of PIC Microcontroller and describe the function of its structural nits. (10) b. Discuss about the applications of PIC Microcontroller based Embedded Systems. u

(6) 6. Discuss about MBasic compiler features and functions.(8) .Describe the Basic output and igital input.(8) d

7 . Explain benefits of using Vx work for the development of ES with appropriate diagram.(16)

8. Explain the PIC microcontroller based embedded system design(16). 9. Explain the use of microcontroller based embedded development boards(10).Write a short note on basic output and digital input system(6). 10. (i) Explain the elements of MBasic compiler.(6) (ii) Write the pseudo code version of

the program.(5) (iii) Draw the flow diagram of program compilation.(5).