Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Question on bounded buffer

  1. #1
    Junior Member
    Join Date
    Jan 2013
    Location
    Canada
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Question on bounded buffer

    Hello,

    I am new to this forum and would love to really start programming in Java.

    Am taking a class in concurrent computing and it is really difficult to understand as I don't have any programming background.

    I would really use your help on this.

    Secondly I was given an assignment which goes like this


    Using pthreads, implement a bounded buffer. Use condition variables for full and empty and a lock on the entire buffer (and our condition variables). Each producer will take the string "Now is the time for all good people to come to the aid of their country" and write it to the shared buffer, one character at a time. Your consumer will read a character from the buffer and write it standard output (one at a time). Be careful: the consumer must finish when all of the producers are done. How can the consumer know when a producer is finished?


    Please I would like someone to help me with is programming.

    Thank you


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Question on bounded buffer

    Do you have any specific questions about your assignment?
    Please post your code and any questions about problems you are having.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Java String Buffer
    By anonb in forum Object Oriented Programming
    Replies: 3
    Last Post: December 19th, 2012, 02:59 AM
  2. Bound Buffer Problem
    By hockeyplayer in forum What's Wrong With My Code?
    Replies: 0
    Last Post: November 21st, 2012, 04:01 PM
  3. Help with Bounded Buffer problem
    By Stockholm Syndrome in forum What's Wrong With My Code?
    Replies: 6
    Last Post: April 4th, 2012, 07:02 PM
  4. PLEASE HELP ME with double buffer
    By DouboC in forum What's Wrong With My Code?
    Replies: 2
    Last Post: January 10th, 2011, 05:32 PM
  5. The Bounded Buffer Problem
    By skatescholar in forum Java Theory & Questions
    Replies: 0
    Last Post: April 8th, 2010, 11:22 AM