web viewanand institute of higher technology. kazhipattur. department of electronics &...

35
ANAND INSTITUTE OF HIGHER TECHNOLOGY KAZHIPATTUR Department of Electronics & Instrumentation Engineering Staff Name: P.KAMALI/V.S.DHANUSHA Year/Sem : III / VI Sub/ Code : Embedded System/CS2361 PART A UNIT I - INTRODUCTION TO EMBEDDED SYSTEMS 1. List any four Embedded Computory applications. (EI May’12) 2. What is the need for memory management in Embedded System? (EI May’12) 3. What are embedded Real time systems? Give an example. (EI May’11, EI NOV’ 13) 4. What is the advantage of running a processor at reduced speed in certain section of instructions and full speed at other section of the instructions? (IT’ May 08) Soln: The advantage of running a processor at reduced speed in certain section of instructions and full speed at other section of the instructions is Reduced electrical power consumption. Reduced heat generation. Longer hardware lifespan. Increased stability. Reduced noise from cooling parts due to reduced heat dissipation requirements. Increased battery life. Better compatibility with old applications. The disadvantage is system performance reduces slightly. 1

Upload: phungduong

Post on 30-Jan-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Web viewANAND INSTITUTE OF HIGHER TECHNOLOGY. KAZHIPATTUR. Department of Electronics & Instrumentation Engineering. Staff . Name: P.KAMALI/V.S.DHANUSHA. Year/Sem : III / VI

ANAND INSTITUTE OF HIGHER TECHNOLOGYKAZHIPATTUR

Department of Electronics & Instrumentation Engineering

Staff Name: P.KAMALI/V.S.DHANUSHA Year/Sem : III / VISub/ Code : Embedded System/CS2361

PART A

UNIT I - INTRODUCTION TO EMBEDDED SYSTEMS

1. List any four Embedded Computory applications. (EI May’12)2. What is the need for memory management in Embedded System? (EI May’12)3. What are embedded Real time systems? Give an example. (EI May’11,

EI NOV’ 13)4. What is the advantage of running a processor at reduced speed in certain section of

instructions and full speed at other section of the instructions? (IT’ May 08)

Soln:

The advantage of running a processor at reduced speed in certain section of instructions and full speed at other section of the instructions is

Reduced electrical power consumption. Reduced heat generation. Longer hardware lifespan. Increased stability. Reduced noise from cooling parts due to reduced heat dissipation requirements. Increased battery life. Better compatibility with old applications.

The disadvantage is system performance reduces slightly.

5. Why do you need a cross compiler? (IT’ May 08, May’07)

Soln:Cross compiler is a compiler capable of creating executable code for a platform other

than the one on which the compiler is run. The object code produced by the cross compiler executes on the target and not on the host. The target is usually boards/platforms that do not have display or keyboard. Cross compiler tools are used to generate executables for embedded system or multiple platforms. It is used to compile for a platform upon which it is not feasible to do the compiling, like microcontrollers that don't support an operating system.

1

Page 2: Web viewANAND INSTITUTE OF HIGHER TECHNOLOGY. KAZHIPATTUR. Department of Electronics & Instrumentation Engineering. Staff . Name: P.KAMALI/V.S.DHANUSHA. Year/Sem : III / VI

6. What is an embedded system?

Soln: An embedded system is a computer system designed to perform one or a few dedicated functions often with real-time computing constraints. It is embedded as part of a complete device often including hardware and mechanical parts. Embedded systems are controlled by one or more main processing cores that are typically either microcontrollers or digital signal processors (DSP). The key characteristic, however, is being dedicated to handle a particular task, which may require very powerful processors

5. What is difference between desktop computer OS & the real time OS of an ES?

Soln: The key difference between general-computing operating systems and real-time operating systems is the need for “deterministic " timing behavior in the real-time operating systems. Formally, "deterministic" timing means that operating system services consume only known and expected amounts of time. In theory, these service times could be expressed as mathematical formulas. These formulas must be strictly algebraic and not include any random timing components. Random elements in service times could cause random delays in application software and could then make the application randomly miss real-time deadlines – a scenario clearly unacceptable for a real-time embedded system. Many non-real-time operating systems also provide similar kernel services.

Many RTOS proponents argue that a real-time operating system must not use virtual memory concepts, because paging mechanics prevent a deterministic response. Examples for embedded systems include combustion engine controllers or washing machine controllers and many others. Desktop PC and other general-purpose computers uses desktop computer OS.

6. What are the types of memories?

Soln: Memories can be broadly classified as Random Access Memory (RAM) and Read Only Memory (ROM).

RAM can be classified as Dynamic RAM (DRAM) and Static RAM (SRAM). DRAM can be further classified as Synchronous Dynamic RAM (SDRAM), Asynchronous Dynamic RAM Synchronous (ADRAM) and Double Data Rate Synchronous Dynamic RAM (DDRAM).

ROM can be further classified as Programmable Read Only Memory (PROM), Erasable Programmable Read Only Memory (EPROM), Electrically Erasable Programmable Read Only Memory (EEPROM) and Flash.

7. What is an assembler?

Soln: An assembler is a program for translating assembly mnemonics into binary opcodes (i.e) into an executable file called binary file and for making a list file that can be printed. The list file has

2

Page 3: Web viewANAND INSTITUTE OF HIGHER TECHNOLOGY. KAZHIPATTUR. Department of Electronics & Instrumentation Engineering. Staff . Name: P.KAMALI/V.S.DHANUSHA. Year/Sem : III / VI

address, source code (assembly language mnemonics) and hexadecimal object codes. The file has addresses that reallocate during the actual run of the assembly language program.

8. What is a Linker?

Soln: A linker or link editor is a program that takes one or more objects generated by a compiler

and combines them into a single executable program. It does the following functions:

It resolves the external symbols or variables and links. It links the references to functions that are defined in other source files and libraries. It takes care of assigning correct addresses to different variables in different files. It will search the library and link appropriate code with the application.

9. What is a Loader?

Soln:Loader is a program that reallocates the physical memory address for loading into the

system RAM memory. Reallocation is necessary, as the available memory may not start from 0x0000 at any given instant of processing in a computer. The loader is part of OS in computer.

10. What is a Locator?

Soln:The final step in the build process is locating. This step adds the target specific

information into the executable. Locating must be done because development is done on hardware platforms unique to each project. The programmer must explicitly provide the hardware specific information of location of ROM, RAM etc. and their sizes. The information can be provided as a command line option or in linker scripts. The locater may be available as a separate program or bundled together with the linker. The output file is the ROM image.

11. List any five software tools of an embedded system.

The software tools for an embedded system may be compiler, linker, locator, assembler and loader.

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

Soln:The main hardware parts found in Embedded System are Processor, Power Source and

managing the power dissipation and consumption, Clock oscillator and clocking unit, Real Time Clock and various Timers, Reset Circuit, Power-up reset, Watchdog Timer Reset, memories, I/O Ports, DAC and ADC, LCD and LED displays, Keypad or Keyboard, Pulse dialer, Modem and GPIB link.

13. Draw the h/w architecture used in embedded system.

3

Page 4: Web viewANAND INSTITUTE OF HIGHER TECHNOLOGY. KAZHIPATTUR. Department of Electronics & Instrumentation Engineering. Staff . Name: P.KAMALI/V.S.DHANUSHA. Year/Sem : III / VI

14. What is the difference between Hard RealTime and Soft Real Time systems?

Soln: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.

15. What do you mean by pre-processing?(or)

What are preprocessor macros?(EI NOV 2013)

Soln: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.

16. What are the steps involved in the build process?

Soln:The steps involved are

1. Preprocessing2. Compiling3. Linking4. Locating

17. What is an Editor?

Soln: 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.

18. What is a compiler?

Soln: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.

19. What is Heap Fragmentation?

4

Page 5: Web viewANAND INSTITUTE OF HIGHER TECHNOLOGY. KAZHIPATTUR. Department of Electronics & Instrumentation Engineering. Staff . Name: P.KAMALI/V.S.DHANUSHA. Year/Sem : III / VI

20. What is Heap compaction?

21. What are the steps involved in the Embedded system design process?

Soln:1. Abstraction2. Hardware and software Architecture3. Extra functional properties4. System related family of designs5. Modular design6. Mapping7. User Interface design8. Refinements.

UNIT II - EMBEDDED SYSTEM ORGANIZATION

1. What are the different modes of DMA transfer? Which one is suitable for embedded system? (EI May’12)

2. What is a CAN bus? List the main features of CAN bus. (EI May’12)

3. How suitable memory will be selected for the design of the embedded system? (EI May’11)

4. What are the additional structural units in advanced embedded processor? (EI May’11)

Soln:

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.

5. State the major function of timer device in an embedded system. (EI May’11)

Soln:

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.

6. List the features of USB bus. (IT’ May 08)Soln:

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.

5

Page 6: Web viewANAND INSTITUTE OF HIGHER TECHNOLOGY. KAZHIPATTUR. Department of Electronics & Instrumentation Engineering. Staff . Name: P.KAMALI/V.S.DHANUSHA. Year/Sem : III / VI

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.

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.

7. What are the advantage of USB bus?( EI NOV 2013)

8. Why do you need atleast one timer device in an embedded system? (IT’ May 08)

Soln:

Counter/timer hardware is a crucial component of most embedded systems. In some cases, a timer measures elapsed time (counting processor clock ticks). In others, we want to count or time external events. Hardware Timer is used as a system clock.

9. Write the function of one Time Device programmer? (EI NOV 2013)

10. What are the characteristics of PCI bus? (IT’ May 07)

Soln:The characteristics of PCI bus are

It provides three types of synchronous parallel interfaces. It has 32 bit data bus extendible to 64 bits. PCI driver can access hardware automatically as well as by programmer assigned

addresses.

6

Page 7: Web viewANAND INSTITUTE OF HIGHER TECHNOLOGY. KAZHIPATTUR. Department of Electronics & Instrumentation Engineering. Staff . Name: P.KAMALI/V.S.DHANUSHA. Year/Sem : III / VI

A PCI controller must access one device at a time.

11. Define device driver.

Soln: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.

12. Give examples of Serial output.

13. Give any two uses of timer devices.

Soln: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.

14. What is I2C Bus?

Soln:

I²C (Inter-Integrated Circuit) generically referred to as "two-wire interface" is a multi-master serial single-ended computer bus. One line is for clock and other for bidirectional data. In a plant if there are number of processes and some devices for measuring temperatures and some for measuring pressures, these Ics can be mutually networked through I2C bus.

15. What is CAN Bus?

Soln:

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

7

Page 8: Web viewANAND INSTITUTE OF HIGHER TECHNOLOGY. KAZHIPATTUR. Department of Electronics & Instrumentation Engineering. Staff . Name: P.KAMALI/V.S.DHANUSHA. Year/Sem : III / VI

automotive applications but now also used in other areas such as industrial automation and medical equipment.

16. What is USB Bus?

Soln:

The Universal Serial Bus (USB) is a bus between a host system and a number of interconnected peripherals. It provides fast (upto 12 Mbps) and as well as low speed (upto 1.5 Mbps) serial transmission and reception between host and serial devices like keyboard, scanner, ISDN etc. In USB protocol, a device can be attached, configured and used, reset, reconfigured and used, share the bandwidth with other devices, detached and attached.

17. Give any 3 examples of advanced serial high speed buses.

Soln:

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 MAC3. XAUI(10 Gigabit Attachment Unit)4. XSBI(10 Gigabit Serial Bus Interchange)5. SONET OC-486. SONET OC-1927. SONET OC-7688. ATM OC-12/46/192

18. What is ISA Bus?

Soln:ISA( used in Industry Standard Architecture) connects only to a card that has an 8086 or

80186 or 80286 processor. They are used for connecting devices following IO addresses and interrupt vectors as per IBM PC architecture.

19. What are the advances of PCI/X buses over PCI buses?

Soln:

PCI-X revised the conventional PCI standard by doubling the maximum clock speed (from 66 MHz to 133 MHz)[1] and hence the amount of data exchanged between the computer processor and peripherals. Conventional PCI supports up to 64 bits at 66 MHz (though anything above 32 bits at 33 MHz is only seen in high-end systems) and additional bus standards move 32 bits at 66 MHz or 64 bits at 33 MHz. The theoretical maximum amount of data exchanged between the processor and peripherals with PCI-X is 1.06 GB/s, compared to 133 MB/s with

8

Page 9: Web viewANAND INSTITUTE OF HIGHER TECHNOLOGY. KAZHIPATTUR. Department of Electronics & Instrumentation Engineering. Staff . Name: P.KAMALI/V.S.DHANUSHA. Year/Sem : III / VI

standard PCI. PCI-X also improves the fault tolerance of PCI allowing, for example, faulty cards to be reinitialized or taken offline.

A PCI card can be installed in a PCI-X slot provided it has the correct voltage keying for the slot and (if inserting into a 32-bit slot) nothing obstructs the overhanging part of the edge connector. Originally the PCI bus was a 5-volt bus. Later, in PCI Revision 2.x, the PCI bus was a dual-voltage interconnect. In 3.0 this was changed to 3.3 volts only. The PCI-X bus is not compatible with the older 5-volt cards but newer 3.3-volt PCI cards will work in a PCI-X slot. Apart from this, PCI and PCI-X cards can generally be intermixed on a PCI-X bus, but the speed will be limited to the speed of the slowest card. For example, a PCI 2.3 device running at 32 bits and 66 MHz on a PCI-X 133-MHz bus will limit the total throughput of the bus to 266 MB/s. To get around this limitation and the voltage compatibility issue, many motherboards have separate PCI-X channels that can be dedicated to different PCI hardware families if needed, allowing for better backward compatibility while maintaining higher total system bandwidth.

20. Explain briefly about PCI and PCI/X bus.

21. What are the difference between a half & full duplex data transfer? (EI NOV’ 13)

22. What are the criteria for the selection of memory devices?

Soln:

Simple systems like ACVM or robots need no external memory. The designer selects a microcontroller that has onchip memory required by the system. The data acquisition system needs EEPROM or flash. A mobile phone or digital camera system needs 1MB plus RAM device. Image or voice or video recording systems require a large flash memory.

23. What are criteria for the selection of the processor?

Soln:

1. A processor which can operate at higher clock speed, processes more instructions per second.

2. A processor giving high computing performance when there exist pipelines, superscalar architectures, prefetch cache unit, MMU and RISC architecture.

3. A processor with register windows provides fast context switching in a multitasking system.

4. A processor that has burst mode accesses external memories reads fast and writes fast.

24. What are the structural units in a processor?

Soln:

The structural units in a processor are ALU, Control Unit, Program Counter, Stack Pointer, Memory Address Register, Memory Data Register, I-Cache, D-Cache, Instruction Register,

9

Page 10: Web viewANAND INSTITUTE OF HIGHER TECHNOLOGY. KAZHIPATTUR. Department of Electronics & Instrumentation Engineering. Staff . Name: P.KAMALI/V.S.DHANUSHA. Year/Sem : III / VI

Instruction Queue, Instruction Decoder, Prefetch Unit, MMU, Address Bus, Data Bus, Control Bus and Bus Interface Unit.

25. Justify embedded system design is so complex. (EI NOV’ 13)

26. What is Big Endian and Little Endian modes?

Soln:In a Little Endian system, the LSB of a word is written into the lowest addressed byte and

other bytes are written in increasing order of significance.In a Big Endian system, the byte order is reversed, with the MSB being written

into the byte with lowest address. The other bytes are written in decreasing order of significance.For eg: 0x90ABCDEF would be stored in LE and BE mode as follows:

Address 0x9000 0x9001 0x9002 0x9003LE EF CD AB 90BE 90 AB CD EF

UNIT III PROGRAMMING AND SCHEDULING

1. What is the importance of disability of interrupts in Embedded System ? (EI May’12)

2. Define Context switching. How it will affect the system performance ? (EI May’12)

3. What are the different thread states? (EI May’11)

4. List out the various components of process control blocks. (EI NOV’ 13)

5. Mention the consequences of context switching. (EI May’11)

6. What are the uses of semaphores? (IT’ May 07)

Soln:

The uses are

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

10

Page 11: Web viewANAND INSTITUTE OF HIGHER TECHNOLOGY. KAZHIPATTUR. Department of Electronics & Instrumentation Engineering. Staff . Name: P.KAMALI/V.S.DHANUSHA. Year/Sem : III / VI

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.

7. What are the steps involved in memory management?

8. Compare and contrast the binary semaphore and counting semaphore. (EI NOV’ 13)

9. List few semaphore related functions.

Soln:

The few semaphore related functions are

a. P-semaphore function: requires a resource if not available waits for it.b. V semaphore function: signal passes to the operating system that the resource is now free

to the other users.

10. What are the types of Scheduling?

Soln:The types of scheduling are 1. First in First out2. Shortest Remaining time3. Fixed priority pre-emptive scheduling4. Round robin scheduling5. Multilevel queue scheduling

11. What is a thread?

Soln:

Thread of execution is the smallest unit of processing that can be scheduled by an operating system. It generally results from a fork of a computer program into two or more concurrently running tasks. The implementation of threads and processes differs from one operating system to another, but in most cases, a thread is contained inside a process. Multiple threads can exist within the same process and share resources such as memory, while different processes do not share these resources. In particular, the threads of a process share the latter are instructions (its code) and its context (the values the various variables have at any given moment). To give an analogy, multiple threads in a process are like multiple cooks reading off the same cook book and following its instructions, not necessarily from the same page.

12. Define Synchronization.

11

Page 12: Web viewANAND INSTITUTE OF HIGHER TECHNOLOGY. KAZHIPATTUR. Department of Electronics & Instrumentation Engineering. Staff . Name: P.KAMALI/V.S.DHANUSHA. Year/Sem : III / VI

Soln: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

13. Define Inter process communication.

Soln: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).

14. What is shared data problem?

Soln: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.

15. Define Semaphore.

Soln:

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.

12

Page 13: Web viewANAND INSTITUTE OF HIGHER TECHNOLOGY. KAZHIPATTUR. Department of Electronics & Instrumentation Engineering. Staff . Name: P.KAMALI/V.S.DHANUSHA. Year/Sem : III / VI

16. Differentiate counting semaphore and binary semaphore. (EI NOV’ 13)

Soln: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).

17. What do you mean by context switching?

Soln:A context switch is the computing process of storing and restoring state (context) of a

CPU so that execution can be resumed from the same point at a later time. This enables multiple processes to share a single CPU. The context switch is an essential feature of a multitasking operating system. Context switches are usually computationally intensive and much of the design of operating systems is to optimize the use of context switches. A context switch can mean a register context switch, a task context switch, a thread context switch, or a process context switch.

18. What do you mean by pre-emptive and non pre-emptive multitasking?

Soln:

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.

19. What do you mean by scheduling?

Soln:

Scheduling is a key concept in computer multitasking, multiprocessing operating system and real-time operating system designs. Scheduling refers to the way processes are assigned to run on the available CPUs, since there are typically many more processes running than there are available CPUs. This assignment is carried out by software known as a scheduler and dispatcher.

The scheduler is concerned mainly with:

CPU utilization - to keep the CPU as busy as possible. Throughput - number of processes that complete their execution per time unit. Turnaround - total time between submission of a process and its completion.

13

Page 14: Web viewANAND INSTITUTE OF HIGHER TECHNOLOGY. KAZHIPATTUR. Department of Electronics & Instrumentation Engineering. Staff . Name: P.KAMALI/V.S.DHANUSHA. Year/Sem : III / VI

Waiting time - amount of time a process has been waiting in the ready queue. Response time - amount of time it takes from when a request was submitted until the first

response is produced. Fairness - Equal CPU time to each thread.

20. What do you mean by transfer rate?

21. write short notes on interrupt service routine

22. List the ways in which an RTOS handles ISR in a multitasking environment.

23. What is meant by queue-scheduling? What are the objectives of scheduling?

24. What are the advantages of reentrant functions in embedded system software? (IT May’08)

25. Distinguish between process and task. (EI NOV’ 13)

UNIT IV REAL-TIME OPERATING SYSTEMS

1. What are the functions performed by Realtime OS in an embedded system? (EI May’12)2. Mention the features of RT Linux. (EI May’12)

3. What are the goals of operating system?

Soln: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.

4. What are the two structures modes of OS?

Soln:The two structure modes of OS are User mode and supervisor mode.

5. What are the structural units of an OS?

Soln:

14

Page 15: Web viewANAND INSTITUTE OF HIGHER TECHNOLOGY. KAZHIPATTUR. Department of Electronics & Instrumentation Engineering. Staff . Name: P.KAMALI/V.S.DHANUSHA. Year/Sem : III / VI

The structural units are

a. Application softwareb. APIc. System softwared. Hardware-OSe. Interface Hardware

6. What is the need for a well tested and debugged RTOS?

Soln: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.

7. List few RTOS system level functions.8. What is a real time Operating System? (IT May’11)9. When is an RTOS necessary and when it is not necessary in an embedded system? (EI

May’11)10. What is POSIX? List its main features.

Soln: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

11. List few memory allocation related functions.

12. Write the advantages of mail boxes in RTOS. (EI NOV’ 13)

13. What are the uses of VxWORKS?

Soln:

The uses of VxWORKS are the following.

Multitasking Environment

15

Page 16: Web viewANAND INSTITUTE OF HIGHER TECHNOLOGY. KAZHIPATTUR. Department of Electronics & Instrumentation Engineering. Staff . Name: P.KAMALI/V.S.DHANUSHA. Year/Sem : III / VI

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 Separate contexts for tasks and ISRs

13. What are the features of VxWORKS?

Soln:The important features of VxWORKS are

It is a scalable OS Preemptive priority or time slicing scheduling can be used It schedules the RTOS separately and has special functions for interrupt handling If a task is expecting a message from another task, which is being deleted by using task

delete functions, then RTOS inhibits the deletion. It has task service functions.

14. Name any two important RTOS.

Soln:The two important RTOS are VxWorks and µCOS

15. What is meant by well tested and debugged RTOS?

16. What is sophisticated multitasking embedded system?

17. Name some application for the Vx Works RTOS.

18. How is Vx Works TCB helpful for tasks?

19. What is an active task in the context of Vx Works?20. What are the task service functions supported by Vx Works?21. Name any four interrupt service functions supported by Vx Works?

22. What are the different types of scheduling supported by Vx Works?

Soln:Vx Works supports both preemptive priority and time slicing scheduling.

16

Page 17: Web viewANAND INSTITUTE OF HIGHER TECHNOLOGY. KAZHIPATTUR. Department of Electronics & Instrumentation Engineering. Staff . Name: P.KAMALI/V.S.DHANUSHA. Year/Sem : III / VI

23. When is an RTOS needed in embedded software?Soln:

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.

24. List MUCOS time delay functions.25. When do you use OS_ENTER_CRITICAL( ) and OS_EXIT_CRITICAL( ) ?

26. List some of the uses MUCOS RTOS? (Nov10, AU Coimb)

UNIT V- PIC MICROCONTROLLER BASED EMBEDDED SYSTEM DESIGN

1. Specify the size of memory supported by PIC Microcontroller. (EI May’12)

2. Mention the major components on PIC Microcontroller based development board. (EI

May’12)3. What is a PIC ?

4. List the features which make PIC microcontroller suitable for embedded system. (EI May’11)

5. Mention the three components of MBASIC compiler. (EI May’11)

Soln:

The main elements of PIC are

Processing Engine:The CPU performs logic and arithmetic functions of the PIC following instructions it

reads from program memory. It reads from or writes to the data memory and input/output module.

Program Memory:It holds the instructions of CPU. It reads the program memory.

Data Memory:Holds memory that the programmer may use for variables. The CPU reads from or writes

to the data memory.’Input/Output:

These are the pins through which PIC communicates with the outside world.

Peripherals:

17

Page 18: Web viewANAND INSTITUTE OF HIGHER TECHNOLOGY. KAZHIPATTUR. Department of Electronics & Instrumentation Engineering. Staff . Name: P.KAMALI/V.S.DHANUSHA. Year/Sem : III / VI

Special purpose functions built into the PIC such as timers, A/D converters and PWM modulators.

6. Microchip identifies PIC with a multipart identifier as 16F877A-E/P.

7. What are elements of program memory?

8. List the features which make PIC microcontroller suitable for embedded system. (EI May’11)

9. What is the difference between a compiler and interpreter?

Soln:Compiler Interpreter

Definition Compiler takes a high level language source code and translates all of it at once to machine code.

Interpreter translates high level language statements one at a time.

Fast Slow

10. Mention the three component of MBasic compiler. (EI May’11) Soln:MBasic compiler comprises of three main elements.

MBasic compiler softwareThe 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

18

Page 19: Web viewANAND INSTITUTE OF HIGHER TECHNOLOGY. KAZHIPATTUR. Department of Electronics & Instrumentation Engineering. Staff . Name: P.KAMALI/V.S.DHANUSHA. Year/Sem : III / VI

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.

9. What are the naming rule for constants, variables and subroutine names for the MBasic ?

Soln:

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

11. Write a program using MBasic to output a 1000 Hz square wave for 1000 ms on RB0.

Soln:Main; burst of 1000 Hz for 1 sec endless loopSound B0,[1000000\1000]GoTo MainEnd

12. Write the various addressing modes of PIC micro controller

14. list some I/O ports of PIC microcontroller

19

Page 20: Web viewANAND INSTITUTE OF HIGHER TECHNOLOGY. KAZHIPATTUR. Department of Electronics & Instrumentation Engineering. Staff . Name: P.KAMALI/V.S.DHANUSHA. Year/Sem : III / VI

PART B

UNIT I

1. Explain the design process of an embedded system.(8) (EI May’11/EI May’12)

2. Explain in detail about the different ‘Embedded Processors’ in a system.(16) (EI NOV’ 13)

3. Explain the different types of single purpose processors.(8) (EI NOV’ 13)

4. Discus the different modules of modern embedded system.(8) (EI NOV’ 13)

5. Explain the basic concepts of Embedded Real time systems(8) (EI May’12)

6. Discuss about the different types of memory. Compare their features, merits and demerits in

detail. (16) (EI May’12)

7. Discuss about the types and applications of embedded systems.(8) (EI May’11)

8. Describe the various memory components used in embedded systems. (8) (EI May’11)

9. Explain the different memory management methods.(8) (EI May’11)

10. Explain the various form of memories present in a system (8)(IT May’07)

11. List the hardware units that must be present in the embedded systems. (8) (IT May’07, May

‘08)

12. Write a note on various software tools used in designing an embedded system. ? (8)(IT May ’08)

13. Explain in about the various steps involved in the build process.

14. Give a brief note on Exemplary applications of each type of Embedded System.(8)

15. Explain in brief about the various steps involved in the Embedded System design process.(16)

16. Explain the different program layers in the embedded software also the process of converting a C program into the file for ROM image.(8)

17. Give a brief note on Exemplary application of each type of embedded system.(8)

18. Explain the features of assemblers, compilers and cross compilers used in Embedded Systems.(8)

20

Page 21: Web viewANAND INSTITUTE OF HIGHER TECHNOLOGY. KAZHIPATTUR. Department of Electronics & Instrumentation Engineering. Staff . Name: P.KAMALI/V.S.DHANUSHA. Year/Sem : III / VI

UNIT II

1. Explain the function of timing and counting devices in embedded system. (8)

(EI May’12)

2. Describe the various components of synchronous serial input and output ports.(8) (EI

NOV’ 13)

3. Explain the features and characteristics of asynchronous serial input and output ports. (EI

NOV’ 13)

4. Explain how suitable processor and memory devices are selected for an embedded system

design. (8)(EI May’12)

5. Explain in detail the function of any one serial communication bus and one parallel

communication bus. (16)(EI May’12)

6. What are the different I/O devices used in embedded system? Explain(4) (EI May’11)

7. Explain how serial data communication is performed in I2C and CAN bus.(12)

(EI May’11)

8. Write a detailed technical short note on the characteristics of the I2C and CAN bus.

(16) (EI NOV’ 13)

9. Discuss about the features and functions of PCI and PCIX bus systems. (8)

(EI May’11)

10. Explain the various functions performed by device drivers. (8) (EI May’11)

11. List the uses of timer device. (6) (IT May’08)

12. Give the format of CAN frame and explain the bus arbitration method involved. (4+6)

13. Tabulate the uses of timer device with applications and explanations.(IT May’07) (8)

14. Explain the signals during a transfer of a byte when using I2C bus and also the format of the bits at the I2C bus with diagrams.(8)

15. Explain the parallel port devices. (8)

16. Explain the sophisticated interfacing features in device ports. (8)

17. Explain the signal using a transfer of byte when using the I2C bus and also the format of bits at the I2C bus with diagram. (16)

18. Explain the internal serial communication devices. (16)

21

Page 22: Web viewANAND INSTITUTE OF HIGHER TECHNOLOGY. KAZHIPATTUR. Department of Electronics & Instrumentation Engineering. Staff . Name: P.KAMALI/V.S.DHANUSHA. Year/Sem : III / VI

19. Explain the following parallel communication devicesi) ISA bus (8)ii) PCI and PCI/X (8)

20. Describe the functions of a DMA in embedded systems with a neat diagram. (6)

21. Describe the functions of UART in detail. (8)

UNIT III

1. Discuss about the Intel I/O instructions. Explain the effect of synchronization and data transfer rate on I/O operations. (8) (EI May’12)

2. Describe the interrupt driven I/O operations. Explain different types of interrupts(EI

May’12)

3. Discuss the following: (EI May’11)

a. Non Maskable Interrupts (6)b. Prevention of Interrupt overrun (5)c. Interrupt driven I/O (5)

4. Discuss about preemptive and non preemptive multitasking. (8) (EI May’11)

5. What are semaphores? What are the different semaphore operations? Explain the use of semaphores.(8) (EI May’11)

6. Discuss the challenges of embedded computing design. (8) (IT May’11)7. Discuss the context switch mechanism with example. (16) (IT May’11)8. Discuss the various scheduling policies with example. (16) (IT May’11)

9. Explain the fifteen point strategy for synchronization between the processes, ISRs, OS functions and tasks for resource management. (16)

22. Explain stack data structures is useful to embedded system programming.(16) (EI NOV’

13)

10. Explain the critical section service by a preemptive scheduler. (8)

11. Explain the Rate Monotonic Co-operative scheduling. (8)

12. Explain the scheduler in which RTOS insert into the list and the ready task for sequential execution in a co-operative round robin model. (16)

22

Page 23: Web viewANAND INSTITUTE OF HIGHER TECHNOLOGY. KAZHIPATTUR. Department of Electronics & Instrumentation Engineering. Staff . Name: P.KAMALI/V.S.DHANUSHA. Year/Sem : III / VI

13. Discuss with the diagram task synchronization model for a specific application.(IT May’07)

14. Explain how interrupt service routines are serviced in an Embedded system?(8)i. (IT May’08)

15. Differentiate process, task and Threads. (IT May’08)

16. Explain interrupts driven data transmission and reception in detail.

17. What is an interrupt? What are the different types of interrupt? Explain. (6)18. What is interrupt latency? Explain (4)

19. Explain the various RTOS task scheduling models. (10)20. What is priority inversion problem? How does it occur?

21. What are the features of interrupt? Describe interrupt vector and priority interrupt in detail.(6)

23. Explain following data structures with suitable diagram. (EI NOV’ 13)

i. Circular queue(4)ii. Pipe (6)

iii. Hash Table (6)

22. Explain scheduling architecture and algorithm in detail.

23. Explain interrupt routines in an RTOS environment. (6)24. Explain the following:25. Task and Task States26. Message queue27. Timer function28. Real time task scheduling

29. Identify the tasks for an automatic chocolate vending machine. Explain the various interprocess communication methods required in implementing the application?

UNIT IV

1. Explain the services of UNIX based real time operating systems. (EI May’11)Compare its features with Windows based real time operating systems(16)

2. Discuss in detail the contemporary real time operating systems VxWorks, Linux and PSOS.(16) (EI May’11)

3. Explain about benchmarking of RTOS. (10)

23

Page 24: Web viewANAND INSTITUTE OF HIGHER TECHNOLOGY. KAZHIPATTUR. Department of Electronics & Instrumentation Engineering. Staff . Name: P.KAMALI/V.S.DHANUSHA. Year/Sem : III / VI

4. Explain the goals of operating system services. (16)

6. Draw and explain basic system of an Automatic chocolate vending system.(May’07,’08)

7. Explain the case study of an embedded system for a smart card. (8)

8. Explain the features of Vx Works. (8)

9. Explain the RTOS programming tool MicroC/OS-II..

10. List and explain the service functions for tasks provided by any RTOS of your choice.(16)(IT May’08)

11. Draw the architecture of automatic chocolate vending machine using µCOS RTOS and explain in detail.

12. Discuss in detail the memory management in RTOS with suitable sketches.

13. What is RTOS? Describe the operation of real time operating systems in detail. (10)

14. Explain the three alternative systems in RTOS for responding a hardware source call with the diagram. (16)15. Explain round robin with interrupt architecture with eg.(8) (EI NOV’ 13)

16. Explain real time operation system architecture differ with other software architectures.(8)

(EI NOV’ 13)

17. What is shared data problem? Explain how shared data problem will be handled in real time

system. (EI NOV’ 13)

18. Discuss how ES is used in the modern automobiles.(8) (EI NOV’ 13)

19. Explain how to divide the work into RTOs task with suitable examples.(8) (EI NOV’ 13)

UNIT V- PIC MICROCONTROLLER BASED EMBEDDED SYSTEM DESIGN

1. a. Explain the architecture of PIC Microcontroller and describe the function of its structural units. (10) (EI May’11)b. Discuss about the applications of PIC Microcontroller based Embedded Systems. (6)

2. Discuss about MBasic compiler features and functions. (8) (EI May’11)

24

Page 25: Web viewANAND INSTITUTE OF HIGHER TECHNOLOGY. KAZHIPATTUR. Department of Electronics & Instrumentation Engineering. Staff . Name: P.KAMALI/V.S.DHANUSHA. Year/Sem : III / VI

3. Describe the Basic output and digital input. (8) (EI May’11)

4. Write a program to test the keypad reading.

5. Write a program to debounce switch in software.

6. Write a program for Hardware debouncing.

6. List out the interrupts in the PIC microcontroller and explain.7. Explain benefits of using Vx work for the development of ES with appropriate diagram.(16)

(EI NOV’ 13)

25