Results 1 to 6 of 6

Thread: About Operating Systems concepts

  1. #1
    Join Date
    Jun 2012
    Location
    Iran , Tehran
    Posts
    93
    Thanks
    5
    Platforms
    Unix/X11 Windows Android

    Question About Operating Systems concepts

    hi all
    i have question about concurrency processing in operating systems concepts
    suppose that we have two process A,B that running concurrently in a computer.
    we have the following algorithm. (this is for A , for B replace a to b)
    Qt Code:
    1. :retry
    2. flag[a]=false;
    3. if (flag[b] != false ) goto retry;
    4. flag[a]=true;
    5. if (flag[b] != false ) goto retry;
    6. // critical section
    7. flag[a]=false;
    To copy to clipboard, switch view to plain text mode 
    we know each ideal algorithm for critical section accessing must have three constraints : 1.mutual exclusion , 2.progress , 3.bounded waiting
    my question is: for the above algorithm which of these constrain(s) have?

    best regards...
    Life is about making the right decisions and moving on.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: About Operating Systems concepts

    Is this some kind of school task?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jun 2012
    Location
    Iran , Tehran
    Posts
    93
    Thanks
    5
    Platforms
    Unix/X11 Windows Android

    Default Re: About Operating Systems concepts

    yes , this is a university assignment for course OS
    i think this algorithm has not "Progress" constraint, but not sure!
    by this algorithm the "Mutual Exclusion" has been met.
    what about Progress cons. ??
    thanks Mr Wysota
    Life is about making the right decisions and moving on.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: About Operating Systems concepts

    I'm sorry, we're not allowed to solve school tasks.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Jun 2012
    Location
    Iran , Tehran
    Posts
    93
    Thanks
    5
    Platforms
    Unix/X11 Windows Android

    Default Re: About Operating Systems concepts

    please suppose this is not a school task !
    just tell me this algorithm satisfy "Progress" or not ?

    thanks Mr Wysota
    Life is about making the right decisions and moving on.

  6. #6

    Default Re: About Operating Systems concepts

    You may also check the video to get basic idea of semaphore and shared resource.

    https://www.youtube.com/watch?v=VQFJQJGmixM

Similar Threads

  1. Replies: 2
    Last Post: 1st December 2011, 20:09
  2. Replies: 1
    Last Post: 27th September 2011, 07:08
  3. Replies: 1
    Last Post: 14th February 2010, 16:56
  4. QListWidget - inconsistency across operating systems?
    By scwizard in forum Qt Programming
    Replies: 20
    Last Post: 20th February 2007, 01:45

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.