Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
P
Producer_Consumer
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
areej.mohammad
Producer_Consumer
Commits
e8b57671
Commit
e8b57671
authored
Dec 02, 2025
by
areej.mohammad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update README.md
parent
cd054755
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
1 deletion
+35
-1
README.md
README.md
+35
-1
No files found.
README.md
View file @
e8b57671
# Producer_Consumer
# Producer_Consume
Producer/Consumer Word Stemming Project
This project implements a concurrent Producer/Consumer model in Java for processing large
text files. Its primary goal is to accelerate the Word Stemming process by distributing the
workload across multiple threads and efficiently separating I/O operations from in-memory
processing.
🌟 Key Features
Concurrent Processing:
Uses multiple worker threads (Consumers) to distribute the
stemming workload and achieve high throughput.
Producer/Consumer Pattern:
Organizes data flow across two synchronized queues
(BlockingQueue) to prevent race conditions and manage flow control.
Decoupled I/O:
Separates slow file reading/writing (I/O) from fast, in-memory processing
(Stemming).
Target Output:
Extracts and collects a final list of unique stems found in the input file.
⚙️ Project Architecture
The system is divided into three main stages connected via two blocking queues.
Stemming
Class Role Input Output
Stemming (Main) Setup N/A Starts the threads
and Initialization
Producer File Reader Text File (Lines) Queue 1 (BlockingQueue
<String>
)
MultipleConsumers Concurrent Stemming Queue 1 (Lines) Queue 2 (BlockingQueue
<List
<
String
>
>)
SingleConsumerWrite Collector Queue 2 (Lists of Stems) Final Output File (output.txt)
and Writer
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment