Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Parallelcompression library was updated to version 2.16 ...

0 views
Skip to first unread message

aminer

unread,
May 19, 2012, 6:26:49 PM5/19/12
to

Hello,

Parallelcompression library was updated to version 2.16 , i have
just changed the code inside my threadpool.pas engine inside the
parallel compression zipfile to not use work-stealing , cause work-stealing
will cause a deadlock in parallelcompression library, so please use the
threadpool engine that i have provided you inside the parallelcompression
zipfile.

Description:

Parallel compression library implements Parallel Gzip , Parallel Bzip ,
Parallel LZMA and Parallel LZ algorithms using my Thread Pool Engine.


You can download my ParallelCompression library version 2.16 from:

http://pages.videotron.com/aminer/




Thank you.

Amine Moulay Ramdane.






aminer

unread,
May 19, 2012, 5:30:44 PM5/19/12
to

aminer

unread,
May 19, 2012, 7:27:05 PM5/19/12
to

Hello,

I will try to clarify more this problem that i have solved in
version 2.16 ...

If you take a look inside the parallelcompression zipfile,
inside the file parallelgzip.pas, you will notice that i am using a
threadpool
engine and inside the TCallbacks.GzipCompress() method i am using
GZCompressStream() outside the critical section , this is good for
scalability, but inside the same method i am using also a critical section
like this:

repeat
If TParallelGzip(Tjob(obj).obj).count_compress = Tjob(obj).index
then
begin
// i am using some code here
Inc(TParallelGzip(Tjob(obj).obj).count_compress);
break;
end;
sleep(0);
until false;

as you have noticed , in this critical section i am testing like this:
If TParallelGzip(Tjob(obj).obj).count_compress = Tjob(obj).index
and if you read carefully the code inside parallelgzip.pas you will
notice that since i am using a critical section like this , and using
a threadpool engine, the threadpool engine must not use work-sealing
or this will cause a deadlock inside the TCallbacks.GzipCompress() method,
so to correct this problem i had to use for example a FIFO queue for
each worker thread to enhance the scalability and completly avoid
work-stealing (from the LIFO Stacks.or FIFO Queues).


Thank you for your time.



Amine Moulay Ramdane.






"aminer" <amin...@gmail.com> wrote in message
news:66958cc4-bb13-433b...@s27g2000yqd.googlegroups.com...

Gerald Breuer

unread,
May 26, 2012, 7:02:38 PM5/26/12
to
Pascal is a rather exotic language today.
Rewrite it in C or C++ and then republish your work here.
0 new messages