Você está na página 1de 88

Scribd Upload a Document

Search Documents

Explore

Bharati Raja

We need your email!


We will never, ever spam you we promise. We just want to ensure that you don't lose your documents.
Send

Welcome to Scribd - Where the world comes to read, discover, and share...
Were using Facebook to give you reading recommendations based on what your friends are sharing and the things you like. We've also made it easy to connect with your friends: you are now following your Facebook friends who are on Scribd, and they are following you! In the future you can access your account using your Facebook login and password.

Learn moreNo thanks Some of your friends are already on Scribd:

/ 36

Download this Document for Free

Embedded Systems- QB NSS, VVCET. 2010


25

22. Explain briefly Deadly embrace situation. Consider a situation in which two tasks (task1 and task2) are using twosemaphores, semaphore_A and

semaphore_B. When task1 is run, it takessemaphore_A and before it proceeds further and takes semaphore_B,RTO S switches to task2.

Now task2 takes semaphore_B and it waits forrelease of semaphore_A by task1. None of these tasks are able to proceedfurther. This situation is

called Deadly embrace. 23. What is priority inversion problem? How it can be solved? A problem in which a low priority task unintentionally do

not release thesemaphore for a higher priority task. This makes the high priority task towait for low priority task to release the semaphore. This is called

PriorityInversion. This problem can be solved by temporarily boosting the lowpriority task to higher priority task which is called

as priority inheritance. 24. Explain the term (i) Message Queue (ii) Mailbox (iii) Pipe (iv) Socket. Message QueueRTOS allows

a task to send multiple messages into a FIFO queue for useby another task(s) using queue message as an input.MailboxRTOS allows a certain no. of messages to be

stored in each mailbox.Separate functions are used to identify the appropriate mailbox, to addand read a message from the selected mailbox.PipePipes

are like queues. RTOS can create them, write to them, read fromthem and so on.SocketIt provides the logical link using a protocol between the tasks in a client-server

or peer-to-peer environment.

Embedded Systems- QB

NSS, VVCET. 2010


26

25. List the pitfalls in using Mailbox, Message queues and Pipes.

Most of the RTOS do not restrict which tasks can read from or write toany given queue, mailbox or pipe. Therefore, programmer must ensurethat tasks use

the correct one each time. RTOS cannot ensure that data written onto a queue, mailbox or a pipewill be properly

interpreted by the tasks that read it. Running out of space in queues, mailboxes or pipes is usually a disasterfor embedded software.

Passing pointers from one task to another through a queue, mailbox orpipe is one of the several ways to create shared data inadvertently.

26. What is Timer and counting devic es? A Timer gets the inputs from the internal clock of a processor or fromsystem clock and generates a

required time delay.Counting device is a unit for getting the countinputs on the occurrence of events that may be at irregular intervals.

27. What are the types of Timer? There are two types of timer. They are, Hardware timer Software timer

28. What is Timer Overflow or TimeOut? A state in which the number of count inputs exceeded the last acquirablevalue and on reaching that state, an interrupt

can be generated. This stateis called Time-Out or Timer Overflow. 29. What is the difference between hardware timer and software timer?

Hardware timer gets the inputs from the internal clock with the processoror system clock. A device driver program programs it like any otherphysical

device.Software timer executes a program which increases or decreases a countvariable on an interrupt from a timer output or from

a real-time clockinterrupt. 30. What are the different states in a timer? The different states in a timer are, Reset State

Idle State Present State Overflow State

Active or Blocked State Done State

Embedded Systems- QB

NSS, VVCET. 2010


27

31. Is it necessary to have a hardware timer device in a system?How does it work?

Yes, it is necessary to have atleast one hardware timer device in a system.It is used as a system clock. The hardware timer gets the input from aclock out signal from the

processor and activates the system clock as perthe num ticks preset at the hardware timer. 32. What is an Event? An event is essentially a

Boolean flag that tasks can set or reset and thatother tasks can wait for. Event invokes a interrupt routine that runs awaiting task. 33. Compare Semaphores,

Events and Queues/Mailbox/Pi pe. Semaphores are usually the fastest and simplest methods. However, notmuch information can be

passed through a semaphore, which passes justa 1-bit message saying that it has been released.Events are a little more complicated than semaphores and

take little moreof processor time. The advantage of events over semaphores is that a taskcan wait for any one of the several events at the same time and it canwait for only one

semaphore.Queues (also mailboxes & pipes) allow sending a lot of information fromone task to another. The drawback of queues (also mailboxes and

pipes) isthat adding and reading a message is more processor intensive and moreprone to insert bugs while programming them.

34. How a block of data is passed using queue? Passing a pointer to a buffer from one task to another through a queue isa common way to pass a block of data.

35. Explain the problem in using malloc() and free() functions formemory management in RT embedded systems. In real time embedded systems,

malloc() and free() are avoided becauseof their slow response and unpredictable execution times. Instead, most of the RTOS offer fast and predictable

functions along with free fixed sizebuffers. 36. List the two rules that an interrupt routine must follow in RTOSenvironment , that do not apply

to task codes.Rule1: An interrupt routine must not call any RTOS function that might block thecaller. Rule-2:

An interrupt routine may not call any RTOS function that might cause theRTOS to switch tasks unless the RTOS knows that an interrupt

routine,and not a task is executing.

Embedded Systems- QB NSS, VVCET. 2010


28

Embedded Systems- QB NSS, VVCET. 2010


29

UNIT VREAL TIME OPERATING SYSTEMS TOOLS

AND CASE STUDIES1. Name t he important RTO S used in embedde d systems. MUCOS, Vxworks, PSoS, RTX51, WinCE, RT Linux, Nucleus, Symbian

arethe important RTOS. 2. List the Main fun ctions of RTOS. (i) Handling of inter rupts.(ii) Task scheduling.

3. List the basic fu nctions in an RTO S. The basic functions in an RTOS are, Kernel (Task Scheduler)

Error handling functions System level functions

System clock functions Time and delay functions Task state switch functions

ISR functions Memory related functions IPC functions.

4. List the need for well tested & debug ged RTOS. When designing a complex embedded system, one needs the thoroughlytested bug free codes for the following

software components. Multiple task functions in Embedded C or C++

Real time clock based software timers employing system clock Software for cooperative scheduler to

maintain time deadlines If cooperative scheduler is not suitable, then software for Preemptivescheduler

Device drivers and device managers Functions for IPC Networking functions

Error handling and Exception handling functions Testing and system debugging softwareA readily

available, well tested and debugged RTOS thus not onlysimplifies the coding process greatly for a developer, but also helps inbuilding a product fast; it aids

in building robust and bug free software bythorough testing and simulation before locating the codes into thehardware.

Embedded Systems- QB NSS, VVCET. 2010


30

5. Explain II (MUCOS) RTOS .

-II is a freeware RTOS, developed by Jean J. Labrosse in 1992. -II is designed for noncommercial use.

-II is well documented for developers reference.

-II codes are written in C and in assembly language. -II code ports on any processor that are used for embeddedsystems

6. What are the file s associated with C/OS-II RTOS? The source files of -II are categorized into two groups. a)

Processor dependent source file: Two header files at the master are the following. os_cpu.h

is the processor definitions header file os_cfg.h is the kernel building configuration fileTwo C files for

ISR and RTOS timer are os_tick.c and os_cpu_c.c Assembly codes for task switching functions is os_cpu_a.s12

b) Processor independent source file: Two files, MUCOS header and C files are ucos.ii.h

and ucos.ii.c .The C files for RTOS core, timer and task are os_core.c, os_time.c and os_task.c

The memory partitioning, semaphore, queue and mailbox codes are os_mem.c, os_sem.c, os_q.c and os_mbox.c

respectively. 7. List the features of II (MUCOS) RTOS . The features of MUCOS are as follows.

MUCOS operating system functions has a prefix of OS or OS_. MUCOS is a scalable OS.

For multitasking, MUCOS employs pre-emptive scheduler. MUCOS has system level functions.

MUCOS has task service functions. MUCOS has task delay functions.

MUCOS has memory allocation functions. MUCOS has InterProcess Communica tion (IPC) functions.

MUCOS has semaphore functions. MUCOS has mailbox functions.

MUCOS has queue functions.


Embedded Systems- Question Bank (AU-CBE, ECE-R2007)
Download this Document for FreePrintMobileCollectionsReport Document
Info and Rating
ece embedded systems Question Bank two marks q&a vii semester au regulation 2007

raja_ns

Share & Embed Related Documents

PreviousNext
1.
p.

p.

p.

2.
p.

p.

p.

3.
p.

p.

p.

4.
p.

p.

p.

5.
p.

p.

p.

6.
p.

p.

p.

7.
p.

p.

p.

8.
p.

p.

More from this user

PreviousNext
1.
104 p.

18 p.

56 p.

2.

52 p.

61 p.

157 p.

3.
105 p.

13 p.

8 p.

4.

54 p.

54 p.

54 p.

5.
25 p.

39 p.

36 p.

6.

38 p.

71 p.

36 p.

7.
20 p.

35 p.

Add a Comment

Upload a Document
Search Documents

Follow Us!
scribd.com/scribd twitter.com/scribd facebook.com/scribd

About Press Blog Partners Scribd 101 Web Stuff Support FAQ Developers / API Jobs Terms Copyright Privacy
Copyright 2011 Scribd Inc. Language: English

Você também pode gostar