HOME ] UP ] TM ] RAM ] Sequence ] Skip List ] Search ] Josephus ] SOE ] [ PCP ] Hanoi ] Queens ] Maze ] RPN ] Pattern ] Huffman ] BST ] AVL ] Splay ] Red-Black ] B-Tree ] Trie ] Quadtree ] Heap ] PQ ] Hashing ] Sorting ] Insertionsort ] Mergesort ] Shellsort ] Heapsort ] Tournamentsort ] Quicksort ] Binsort ] Radixsort ] Graph Traversal ] Critical Path ] Shortest Path ] MST ] Maxflow ] DynaProg ] DSN ] TSP ]


Producer Consumer Program


Producer Consumer Program@Oregonstate

A producer thread places jobs in a bounded-buffer, and these jobs are retrieved by a consumer thread.

  • When initially started up, the program creates a producer thread object and a consumer thread object. The threads then can be started by pressing the Step button.
  • You can kill and recreate the producer and consumer threads by pressing the Restart button and start them with the Step button.
  • The Delay and Continue buttons have no effects.
  • The producer produces 20 jobs, the last 10 of them slowly.
  • The consumer consumes 20 jobs, the first 10 of them slowly.

(Courtesy of http://web.engr.oregonstate.edu/~minoura/cs261/)



TOP

HOME ] UP ] TM ] RAM ] Sequence ] Skip List ] Search ] Josephus ] SOE ] [ PCP ] Hanoi ] Queens ] Maze ] RPN ] Pattern ] Huffman ] BST ] AVL ] Splay ] Red-Black ] B-Tree ] Trie ] Quadtree ] Heap ] PQ ] Hashing ] Sorting ] Insertionsort ] Mergesort ] Shellsort ] Heapsort ] Tournamentsort ] Quicksort ] Binsort ] Radixsort ] Graph Traversal ] Critical Path ] Shortest Path ] MST ] Maxflow ] DynaProg ] DSN ] TSP ]

Copyleft (c) 2003-3002, Junhui Deng
Last updated on 05.30.2012