For reasons undisclosed,We are asked by our clients to design a
> counting semaphore for their propreitory RTOS.I have some ideas
> presented here,I would like to know all your expert opinion whether
> this could be a proper design to go ahead and implement.
If you must ask, I'm afraid you're out of your depth. So is your client.
If somebody believes they should be making their own proprietary RTOS, yet feels the need to refer to outside expertise to implement such a fundamental feature of an RTOS instead of doing it themselves, *and* that outside expert doesn't have enough expertise on the subject to trust his own judgement more than a random Usenet poll, those are at least two strong signs of serious trouble in project management.
More bluntly put: if that thing doesn't already have fully functional semaphores, it's probably not worth being called an RTOS to begin with. And if they need outside help to do it, they shouldn't be trying to make their own RTOS.
b) A queue data structure to load all the tasks requesting for semaphore
That IMHO has nothing to do with the implementation of the semaphore. That only concerns how the RTOS *uses* the semaphore. A semaphore can be used by a scheduler --- it's not a scheduler in and of itself.
This looks like you're being asked to write the entire RTOS for them, not just the semaphore.
1)What should be maximum size of task addition queue used with in this[...]
> datastructure ?
Impossible to tell from what little detail you gave.
Incase this is not the right group to discuss this issue,please excuse
> me and direct me to a right group.
Which "this" group are you asking that about? You posted to three.