0% found this document useful (0 votes)
28 views1 page

04 Quiz 1

123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views1 page

04 Quiz 1

123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Part I

1.Semaphore is a nonnegative integer count. Semaphores are typically used to


coordinate access to resources, with the semaphore count initialized to the number of
free resources. By default, there is no defined order of unblocking if multiple threads are
waiting for a semaphore.
2. Counting Semaphore has no mutual exclusion whereas Binary Semaphore has
Mutual exclusion. Semaphore means a signaling mechanism whereas Mutex is a
locking mechanism.
Part II
3. function decrements by one the value of the semaphore. The semaphore will be
decremented when its value is greater than zero. A scanning electron microscope scans
a focused electron beam over a surface to create an image.
4.am going to pick figure 2 because Counting semaphores are often used to keep track
of changes in the state of objects shared by multiple threads in a process. For instance,
they can record the occurrence of a particular event.
Part III
5.Local data is not visible or accessible to any program outside of the one where it is
declared this includes both contained and containing programs. All data is considered to
be local data unless it is explicitly declared as being global data.
6.I guess yes because the monitor is one of the ways to achieve Process
synchronization. The monitor is supported by programming languages to achieve
mutual exclusion between processes. Only one process at a time can execute code
inside monitors.

You might also like