Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Which of the following does NOT make sense regarding defining data structure(s) to implement semaphores by disabling interrupts? The data structure should have an integer

image text in transcribed

Which of the following does NOT make sense regarding defining data structure(s) to implement semaphores by disabling interrupts? The data structure should have an integer variable to keep the value of the a semaphore. The data structure should keep a list of processes which can be used to maintain a list of blocked processes associated with the semaphore. To do a semaphore operation, the operating system first disables interrupts. Then it reads the value of the semaphore. If it is doing a down and the semaphore value is decreased by 1 . When the operation is completed, interrupts can be enabled again. To do a semaphore operation, the operating system first disables interrupts. Then it reads the value of the semaphore. If it is doing an up, it must check to see if any processes are blocked on the semaphore. If one or more processes are blocked, one of them is removed from the list of blocked processes and made runnable. When the operation is completed, interrupts can be enabled again

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions