Thread: i need help??

  1. #1
    Unregistered
    Guest

    i need help??

    A particular distributed service is envisaged for implementation by means of a program which will run on each of the hosts on which the service is to be available.

    This program is divided conceptually into the application and the protocol entity (PE). The task of the PE is to provide a simple locking service invoked by the application side.

    Your task is to develop sufficient of the PE logic to provide for consistent operation of the lock according to the protocol rules given below. There are other issues, such as failure detection and recovery, which you aren't required to address.

    The locking mechanism is based on token passing, i.e. all participating PE's form a logical ring, sending/receiving messages to/from just one other PE in such a way that a message from any one PE can reach any other PE; being forwarded as necessary by any intervening PE's. A distinguished message represents the token, and the PE at present holding the token, and only that PE, can grant the lock to its application.

    To prevent the token from "buzzing" and thereby consuming communications capacity, it will be held at some PE if there are no outstanding lock requests. A PE requested for the lock may send a demand message around the ring to notify the token holding PE that the token is required.

    The PE's observe the following rules:


    on lock request: if holding token unset holding token; grant lock

    on unlock: unset demand flag; forward token

    on lock needed: circulate demand if demand flag is unset

    on receiving demand message: set demand flag; forward token if holding token

    on receiving token: if waiting for lock then grant lock;
    if demand flag set then unset demand flag; forward token {else hold token}

    demand flag, holding token, etc. are boolean local variables for each participating PE.

    Notes:


    It is not necessary to develop the solution on a network: a single host will be all that's required. Any testing which involves more than a single PE should use additional processes on the one host.

    You may make assumptions to complete the above set of protocol rules if you deem it necessary.

    You are advised to structure your solution logic as an event loop, i.e. using the

    case wait-event ( ... ) of

    structure dealt with in lectures.

    You are required to produce a complete program, but note that the above specification is silent on the application side of the program, so you therefore need to supply only sufficient logic to exercise the PE side. However the application side must have an independent thread of execution capable of interacting with its environment asynchronously with the PE. In other words, the application side and the PE must run as separate processes.

    Black box testing will be insufficent for this exercise, so you will need to include trace statements in your development code to verify that the PE responds correctly to events.

    The PE is make function calls to send/receive messages to/from the ring; these functions must necessarily be stubs in your implementation. You may consider using message queues within these stubs to simulate interaction with the ring.

    You are to assume that the message passing on the ring is asynchronous


    Can anyone start me off here if its not too much trouble please....

    or give me some links where i can find some information for this project, i am a novice programmer in C, and am trying to learn UNIX also...

    Cheers,
    SAAB

  2. #2
    Unregistered
    Guest

    Protocol Entity (PE)?

    Hi does anyone here know anything about processes, synchronization, lock(), unlock(), PID, Protocol Entity(PE)

    i need help with these topics as i have a project coming up...
    can anyone provide some links so that i can get started right away..

    Thanks

    Syed

  3. #3
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Originally posted by Salem
    I assume that you paid as much attention in class as you did to the "READ THIS FIRST" at the top of the board.


    Originally posted by Unregistered
    can anyone provide some links .....
    Yep, there's one at the bottom of the page, it's titled "Programming FAQ".
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  4. #4
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    >does anyone here know anything about processes,
    >synchronization, lock(), unlock(), PID, Protocol Entity(PE)

    What do you exactly want to know about that?

    BTW, shouldn't this be in the General Discussions?

  5. #5
    >>BTW, shouldn't this be in the General Discussions?

    Yes, however, as the poster is Unregistered, I have no way off notifying him of the movement of his thread. ... Guess I'll leave a redirect.

    [To Poster] In future, please post threads to the appropriate board.
    "There's always another way"
    -lightatdawn (lightatdawn.cprogramming.com)

  6. #6
    Unregistered
    Guest

    Unhappy CHIZZZZZZY

    DOnt worry man..
    im failing SP1 as well.....

  7. #7
    Unregistered
    Guest

    need help in implementation of distributed service

    HI? is it possible if you can show me how to write the logic in an algorithm. so that way i have an idea how to write the source code in C.

    Regards,
    SAAB

  8. #8
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    The theory of process synchronisation, deadlocks etc is described in almost every (modern) operating systems book. When it comes to protocols, check out books on distributed operating systems or computer networks.

    Using Google you can find a lot of info on process synchronisation and all those things.

    http://www.lab.arcor.de/Docu/Shell/g...is/node69.html

  9. #9
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,130
    >CHIZZZZZZY
    >DOnt worry man..
    >im failing SP1 as well.....

    If all you can manage is take your load of work and dump it in someone else's lap, then I have no problem with you failing courses, because that means I won't have to work with you.

    Do you have textbooks where you can read up on this ? Do you have notes from your seminars where this stuff was explained ? Could you explain in your own words what this assignment wants you to do ?

    If all three answers are NO, then I cannot help you. Well, I could, but that would be a full time job. If one of them is YES, then head in this direction and come back here if specific questions arise from your research.

    We are quite helpful and polite when we notice you are trying to do stuff on your own. We are not that charming when we think you use us as a shortcut for your assignments.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  10. #10
    Unregistered
    Guest
    our lecturer.. is a diick.... who hasnt got a clue..ive asked him several times... our book it totally useless...waste of 90 bucks...
    so please if u have a clue... ill give ya 20 bucks..just tell me.. what i need to use..

  11. #11
    Registered User
    Join Date
    Sep 2001
    Location
    Fiji
    Posts
    212
    A new or better book if the one you got sucks, and/or a search engine.

Popular pages Recent additions subscribe to a feed