GATE 2023 | OS | COUNTING BINARY SEMAPHORE | GATE TEST SERIES | SOLUTIONS ADDA | EXPLAINED BY VIVEK
Автор: Solutions Adda - One Stop Solution for GATE & PSUs
Загружено: 2023-02-19
Просмотров: 3466
GATE 2023 Q38: consider the two functions incr and decr shown below.
There are 5 threads each invoking incr once, and 3 threads each invoking decr once, on the same shared variable X. The initial value of X is 10.
Suppose there are two implementations of the semaphore s, as follows:
I-1: s is a binary semaphore initialized to 1.
I-2: s is a counting semaphore initialized to 2.
Let V1, V2 be the values of X at the end of execution of all the threads with implementations I-1, I-2, respectively.
Which one of the following choices corresponds to the minimum possible values of V1, V2, respectively?
Website: https://solutionsadda.in/
ISRO / DRDO PYQs: https://solutionsadda.in/isro/
GATE PYQs : https://solutionsadda.in/gate1/
NIC - NIELIT PYQs: https://solutionsadda.in/nielit/
ISRO Complete Analysis: https://solutionsadda.in/isro-complet...
NIC-NIELIT Complete Analysis: https://solutionsadda.in/nielit/
GATE Complete Analysis: https://solutionsadda.in/gate-complet...
For GATE, BARC, ISRO, CIL, AAI, HAL, UGC NET JRF, NIC NIELIT, STQC NIELIT, NVS, KVS, DSSSB PGT/TGT
Test series : https://solutionsadda.in/test-series/
If you have any queries write a mail: [email protected]
Face Book Page: / solutionsaddain-111628724482494
Telegram: https://t.me/solutionsaddaforcse

Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: