Initial semaphore value = 7
Each P operation decreases the value by 1.
Each V operation increases the value by 1.
So,
$7 - 20 + x = 5$
$x - 13 = 5$
$x = 18$
Online Test Series, Information About Examination,
Syllabus, Notification
and More.
Online Test Series, Information About Examination,
Syllabus, Notification
and More.