Good ole Semaphores.......

This is a discussion on Good ole Semaphores....... within the A Brief History of Cprogramming.com forums, part of the Community Boards category; I'm taking an Operating Systems class and stuck on a problem with Semaphores. Here it is: Suppose a machine's instruction ...

  1. #1
    Registered User
    Join Date
    Apr 2003
    Posts
    3

    Good ole Semaphores.......

    I'm taking an Operating Systems class and stuck on a problem with Semaphores.
    Here it is:
    Suppose a machine's instruction set includes an instruction named swap that operates as follows (as an indivisible instruction):

    swap(boolean *a, boolean *b)
    {
    boolean t;
    t = *a;
    *a = *b;
    *b = t;
    }

    Show how swap can be used to implement the p and v operations.

  2. #2
    cereal killer dP munky's Avatar
    Join Date
    Nov 2002
    Posts
    655
    >>the p and v operations.
    what?

    i think this is a c/c++ board post...smells like homework
    guns dont kill people, abortion clinics kill people.

  3. #3
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825
    And a horrible worded one at that. Do your own homework.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. In a game Engine...
    By Shamino in forum Game Programming
    Replies: 28
    Last Post: 02-19-2006, 10:30 AM
  2. Good books for learning WIN32 API
    By Junior89 in forum Windows Programming
    Replies: 6
    Last Post: 01-05-2006, 04:38 PM
  3. Good resources for maths and electronics
    By nickname_changed in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 12-22-2004, 03:23 PM
  4. i need links to good windows tuts...
    By Jackmar in forum Windows Programming
    Replies: 3
    Last Post: 05-18-2002, 11:16 PM
  5. A rather unique problem, involving the good ole gb
    By Scourfish in forum Game Programming
    Replies: 2
    Last Post: 09-09-2001, 09:00 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21