Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


I have been working on one thread which manage and control
a couple of circular buffers. It has api for other thread
to access.
As the thread grows bigger and bigger,
I split it as 3 to 4 threads which need to share common
buffers, and also their api could be used by other threads,
(not these three threads). Inside api, I also allow other
threads to access these three threads' common buffers(more
than one buffer). SO I have to use mutex to avoid race
condition . But I found mutex will be everwhere in all the
threads when they update the common buffer. I am wondering
whether I could reduce mutex usage(more mutex will hure my
system performance). any ideas for how to reduce mutex
usage meanwhile to avoid race condition. Thanks

Answers were Sorted based on User's Feedback



I have been working on one thread which manage and control a couple of circular buffers. It has ap..

Answer / basav (shiv shankar)

Hi,

According to my knowledge, you can use counting semaphores.
You an also use condition variable as well which could be
used to avoid race condition and deadlock too.

Hope my answer gives an idea!

Is This Answer Correct ?    1 Yes 0 No

I have been working on one thread which manage and control a couple of circular buffers. It has ap..

Answer / aswin

taskSpawn in vxWorks will spawn/create a new task with specific priority

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More RTOS AllOther Interview Questions

Give an example of microkernel.

13 Answers   Global Edge, Samsung,


What do you mean by deadlock?

8 Answers   Bosch,


what is difference between IRQ and FRQ ?

4 Answers   Bosch,


what is major concerns about any RTOS selection ?

4 Answers   Bosch,


If two processes which shares same system memory and system clock in a distributed system, What is it called?

7 Answers  


What is the important aspect of a real-time system ?

6 Answers  


What is priority inversion ? and What is the solution ?

6 Answers   Qualcomm, Tandberg, Wipro,


Write a small dc shell script to find number of FF in the design

0 Answers  


What is the state of the processor, when a process is waiting for some event to occur?

14 Answers   MTS,


Explain the difference between microkernel and macro kernel.

5 Answers   Infosys, Tech Mahindra,


What is the difference between Hard and Soft real-time systems ?

11 Answers   Google, Hella, Satyam,


what is the need of creating 4GB of pages in linux?

1 Answers   TCS,


Categories