What are counting semaphores and resource semaphore?
Show More Ask Question

1 Answer

Answer :

If a task tries to take the semaphore when the integer is equal to zero, then the task will block. These semaphores are called counting semaphore.

Some system offer semaphore that can be released only by the task that took them. These semaphore are useful for the shared data problem, but they cannot be used to communicate between two tasks. Such semaphores are called resource semaphore.
Like 0 like
Next Page →


Answer : A semaphore is called binary semaphore when its value is 0, it is assumed that it has been taken (or accepted) & when its value is 1, it is assumed that it has been released & no ... that are not themselves reentrant.3. A reentrant function may does not use the hardware in a nonatomic way.

Description : There are three processes P1, P2 and P3 sharing a semaphore for synchronising a variable. Initial value of semaphore is one. Assume that negative value of semaphore tells us how many processes are waiting in queue. Processes access ... The final value of semaphore will be: (1) 0 (2) 1 (3) -1 (4) -2 

Answer : Answer: 1

Description : State the methods of task synchronization. Describe semaphore with suitable example.

Answer : The methods of task synchronization are: Semaphore Message queue. Mutual exclusion.  Dead lock. Mailboxes. Message Queues. Semaphores: It is a system of sending message by using flags. Multiple concurrent threads of execution ...   signal(Sem);  }  in process P2  {  wait(Sem);  S2;  }

Description : What is the relationship between human resource development and staffing? a. Human resource management is bigger than staffing b. Staffing is bigger than human resource management c. Both are equal d. There is no relation between the two

Answer : a. Human resource management is bigger than staffing

Description : Suppose there are four processes in execution with 12 instances of a Resource R in a system. The maximum need of each process and current allocation are given below: With reference to current allocation, is system safe? If so, ... B) Yes, P1 P2 P3 P4 (C) Yes, P4 P3 P1 P2 (D) Yes, P2 P1 P3 P4

Answer : (C) Yes, P4 P3 P1 P2