I have been working on one thread which manage and control
a couple of circular buffers. It has api for other thread
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
Assume there is a global variable & a static global
variable.Both gets memory allocated from the data segment.
Then how does the visiblity of static global varible gets
limited to the file alone (in which it gets declared) ???
I have a situation where the programme counter(PC) shows
that vxworks msgQreceive function has been called by task A
and Q is full, still I am not picking up the messages. There
is no other task registered to receive messages from this Q.
The sending task B, which is ISR in this case, is getting
timedout everytime it tries posting new message in it. A's
state is PEND which means I am waiting for some resource to
get free but PC shows I have called vxworks msgQReceive and
currently at qJobget+0x018 location. There seems to be two
causes now(identified by me): either vxworks qjobget task is
not able to do semTake or no messages in Q. But Q is full
and semTake failure seems unlikely(though I dont have a
mechanism to check so).
Besides explaining root cause for above, can anyone suggest
how to get my task in READY state again? I also tried
flushing the Q; on doing this, more messages get posted in Q
but A still doesnt pick up any :(
What is the difference b/n any GPOS and RTOS?Give suitable
examples or characteristic of RTOS to support your answer.
What changes can be done in a GPOS to make it work like a
RTOS? What basic features will you support, if you have to
design a RTOS?