Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Write a note on semaphores
A semaphore is a tool meant for synchronizing multiple processes trying to access a shared variable. That is a semaphore is used to deal with the critical section problem or in other words to evade the race condition. A semaphore S is in fact an integer variable that apart from initialization is accessed only through two standard atomic operations:
*Wait and signal.
The traditional definition of wait in pseudo code is:
wait (S) {
while (S<=0)
; // no-op
S--;
}
The traditional definition of signal in pseudo code is:
signal (S) {
S++;
For each process P,
do {
WAIT
Critical Section
SIGNALS
} while (1);
A semaphore is able to be defined as:
typedef struct {
int value;
struct process *L;
} semphore;
Once more, the wait semaphore operation can be defined as:
void wait (semaphore S) {
S.value--;
if (S.value < 0) {
add this process to S.L;
block();
As well, the signal semaphore operation is able to be defined as:
void signal( semaphore S) {
S.value++;
if (S.value <= 0) {
remove a process P from S.L;
wakeup(P);
Swapping : Whole process is moved from the swap machine to the main memory for execution. Process size must be equal or less than to the used main memory. It is easier to exe
What are the steps followed in testing? i. Unit testing - The individual components are tested in this type of testing. ii. Module testing - Related collection of independen
Scalability : Scalability is the competence of the system to adapt to increased service load. A scalable system will respond more gracefully to increased load than a non-sc
Explain the Sleep (ms) Function This call places the current thread in a suspended state for the number of milliseconds passed as the parameter (ms). After that Windows NT wil
Q. What kinds of networking does Windows XP support? How does Windows XP execute transport protocols? Describe two networking protocols. Answer: Support is offer for bo
Determine the syntax of the Fork and Join Primitive Answer: Syntax of the Fork and Join Primitive is as follow: Fork Join
You have been requested by your Senior Engineer to design an Engine Control Unit (ECU) and prepare a report detailing your proposed solution. The client requires a design for a mic
What is reference string We evaluate an algorithm by running it on a definite string of memory reference and computing the number of page faults. The string of memory reference
Define what can be used as a criterion for classification of data structures utilized in language processing Answer: nature of a data structure, lifetime of a dat
Safety algorithm : This is to make sure if the system is in safe state or not. It may need an order of m x n2 operation to determine if the state of the system is safe or not.
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd