Usetutoringspotscode to get 8% OFF on your first order!

Operating Systems

Operating Systems

5.12. Consider the following definition of semaphores:
void semWait(s)

if (5 count > 0)
s.count-;

else
place this process in s.queue;
block;

252 CHAPTER 5 / CONCURRENCY: MUTUAL EXCLUSION AND SYNCHRONIZATION
void semsignal (s)

if (there is at least one process blocked on
semaphore S)
remove a process P from s.queue;
place process P on ready list;

else
s.count++;

Compare this set of definitions with that of Figure 5.3. Note one difference: With the
preceding definition, a semaphore can never take on a negative value. Is there any
difference in the effect of the two sets of definitions when used in programs? That
is. could you substitute one set for the other without altering the meaning of the
program?

You can leave a response, or trackback from your own site.

Leave a Reply

operating systems

The URL for the assignment is:
http://www.cs.binghamton.edu/~kchiu/cs550/prog/2/

Unfortunately, you are not allowed to run QEMU on the remote cluster, so you need to go to the lab.

However, it’s not hard to get it to run on your own machine inside a Linux VM.

Responses are currently closed, but you can trackback from your own site.

Comments are closed.

operating systems

The URL for the assignment is:
http://www.cs.binghamton.edu/~kchiu/cs550/prog/2/

Unfortunately, you are not allowed to run QEMU on the remote cluster, so you need to go to the lab.

However, it’s not hard to get it to run on your own machine inside a Linux VM.

Responses are currently closed, but you can trackback from your own site.

Comments are closed.

Powered by WordPress | Designed by: Premium WordPress Themes | Thanks to Themes Gallery, Bromoney and Wordpress Themes