In context of semaphores choose the option with valid codes for wait() and signal() functions :
सेमाफोर के संदर्भ में Wait() तथा Signal() फलनों के लिए उचित कोड वाले विकल्प का चुनाव कीजिए :
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: B. Wait (s) { while (s) < = 0; s – – } and signal (s) { s + +; }
Explanation
wait(S): while (S <= 0); S--; signal(S): S++; — wait blocks while the semaphore is not positive, then decrements it; signal increments it.
wait(S): while (S <= 0); S--; signal(S): S++; — wait सेमाफोर धनात्मक होने तक रुकता है फिर घटाता है, signal बढ़ाता है।
More Operating System & System Software questions
- In …………........ page replacement algorithm, page that will not be used for longest period of time is replaced whenever a page fault occurs.
- Calculate number of page faults for reference string 3, 2, 4, 1, 3, 5, 2, 1, 7, 3, 0 considering four frames and eight pages of equal size…
- Under personalization in windows we can create .......... to change desktop background, color, sound and screen saver all at once.
- In windows 8.1 which of the following options in control panel is related to adjustment of display brightness, volume and power options ?
- Terms NTFS and FAT 32 are closely related to which action on computer ?
- An integrated set of programs that controls the resources of computer system and provides its users an interface that is easy to use :