Last update January 25, 2012
Welcome !
Hope you will enjoy the modules. Your comments, suggestions and feedback are welcome.
Sincerely,
Amine Moulay Ramdane
aminer@videotron.ca![]()
Modules/Authors |
Files |
|
A page that i wrote about a Jackson Network problem: Jackson Network. And take a look at my article on how to analyze parallel applications with Petri Nets: Petri Nets. An webpage that i wrote about availability and efficiency, click here: Availability and Efficiency
|
||
| Linear
programming modeling examples in Object Pascal Click here to
download the zip file: Zip Operating Systems: Win , (x86). Description: Linear programming modeling examples in Object Pascal. Please look inside the zip at the example SP.pas (shortest-path problem) in Object Pascal, i have provided you with the LPSolve library, but the examples that i have included do generate and MPS file , so you can use a faster software than LPSolve , example SCIP or CLP from COIN-OR , and just pass them the MPS ouput file that the LPSolve library does generate and they will execute them without any problem... Please look more information here: Linear Programming.
-Sd for delphi mode.... Required Delphi switches: -DMSWINDOWS -$H+ -DDelphi |
Zip | |
| Lockfree
MPMC and SPMC fifo queues version 1.12 Click
here to download the zip file: Zip Operating Systems: Win , Linux and Mac (x86). Description: Lock-free SPMC algorithm to
handle queue FIFO proposed by Amine Moulay Ramdane, use
only single CAS on pop and no CAS on push. You can use it
in a work-stealing manner with a local queue for each
server thread to optimize for more throuput and minimize
contention. Please look more information here: Lock-free MPMC.
-Sd for delphi mode.... Required Delphi switches: -DMSWINDOWS -$H+ -DDelphi |
Zip | |
| FIFO MPMC
Queue Click
here to download the zip file: Zip Operating Systems: Win , Linux and Mac (x86). Description: Parallel FIFO MPMC queue
algorithm that uses a spinlock and an exponential
backoff. Please look at the benchmarks against lockfree fifo queues: FIFO MPMC queue.
-Sd for delphi mode.... Required Delphi switches: -DMSWINDOWS -$H+ For Delphi 5,6,7 use -DDelphi For Delphi 2005,2006,2007,2009,2010+ use the switch -DDELPHI2005+
|
Zip | |
An M/M/n queuing model simulation with Object Pascal and my Thread Pool Engine - version 1.02
It's harder and sometimes impossible to get analytical results about waiting times and queue length for general interarrival and service distributions; so, it's important to be able to estimate these quantities by observing the results of simulation. It's very easy in Object Pascal to simulate a sequence of arrival times with a given interarrival distribution. Look at the examples MM1.pas( M/M/1 queuing model) and MMn.pas(M/M/n - n: number of servers -) inside the zip file: --------------------------- InterArrivals:=TExponentialDistribution.Create(420623,1.0/3.0); ServiceTimes:=TExponentialDistribution.Create(220623,1.0/4.0); currtime:=0.0; for i:=1 to simnumber do begin obj:=TJob.create; obj.simnumber:=simnumber; obj.number:=i; currtime:=currtime+InterArrivals.Sample; obj.ArrivalTime:=currtime; obj.Servicetime:= ServiceTimes.sample; TP.execute(myobj.myproc1,pointer(obj),NORMAL_PRIORITY); end; ------------------------------------------- Here we have the InterArrivals object and ServiceTimes object and we are calling InterArrivals.Sample to get our samples from the Exponential Distribution. After that we are calling myobj.myproc1 to simulate our M/M/1 queuing model... If you look at MMn.pas , you will see that the arrival rate is: 3 and the service rate is 4 , so, this will give us a theoretical value of 1/(4-3) = 1 for one server, and the Object Pascal simulation gave me 1.02 for one server. Language: FPC Pascal v2.2.0+ / Delphi 7+: http://www.freepascal.org/ Operating Systems: Win , Linux and Mac (x86). Required FPC switches: -O3 -Sd -dFPC -dWin32 -dFreePascal -Sd for delphi mode.... Required Delphi switches: -DMSWINDOWS -$H+ For Delphi 5,6,7 use -DDelphi For Delphi 2005,2006,2007,2009,2010+ use the switch -DDELPHI2005+ |
Zip | |
Parallel Hashlist 1.2
Operating Systems: Win , Linux and Mac (x86). Description: A parallel HashList with O(1) (best case) and O(log(n)(worst case) access that use a hash based method with an array of MREWs. This will allow to parallelize the writes and reads in separate chains , and also to parallelize the reads in the same chain. Please take a look at the benchmarks here: benchmarks. Note: When i have done those benchmarks , there was not enough/much items organized as a self-balancing tree in the individual chains of the hashtable, so , almost all the items was found and inserted in O(1) , so the parallel part in the Amdahl equation was not much bigger compared to to the serial part. But you will notice in pratice that as soon as you will have more items on the chains of the Hash table , organized as self-balancing tree, with a worst case log(n) , the parallel part will become bigger in the Amdahl equation and you will have better performance and scalability than the numbers in the graph of the benchmarks ...
-Sd for delphi mode.... Required Delphi switches: -DMSWINDOWS -$H+ For Delphi 5,6,7 use -DDelphi For Delphi 2005,2006,2007,2009,2010+ use the switch -DDELPHI2005
|
Zip | |
| WinMenus
version 1.22
Drop-Down Menu widget using the Object Pascal CRT unit. Please look at the test.pas example inside the zip file. Use the 'Delete' on the
keyboard to delete the items Language: FPC Pascal v2.2.0+ / Delphi 7+: http://www.freepascal.org/ Operating Systems: Windows, Mac OSX , Linux , Unix...
-Sd for delphi mode.... -dUnix for Linux , Unix and Mac OSX -dWindows for windows Required Delphi switches: -DMSWINDOWS -$H+ For Delphi 5,6,7 use -DDelphi switch For Delphi 2005,2006,2007,2009,2010+ use the switch -DDELPHI2005+ |
Zip | |
Synch module version 1.04
The following classes have been added to the Synch module: TCriticalSection,TMutex,TSimpleEvent,TSemaphore,TMultiReadExclusiveWrite. Note: I have modified a
little bit the TJclMultiReadExclusiveWrite from the Jedi
code Library and rename it TMultiReadExclusiveWrite.
TCriticalSection,TMutex,TSimpleEvent,TSemaphore are not
from JCL Operating Systems: Windows, Mac OSX , Linux , Unix...
-Sd for delphi mode.... -dUnix for Linux , Unix and Mac OSX -dWindows for windows Required Delphi switches: -DMSWINDOWS -$H+ For Delphi 5,6,7 use -DDelphi switch For Delphi 2005,2006,2007,2009,2010+ use the switch -DDELPHI2005+ |
Zip | |
AWE version 1.1
Why the 2 GB limitation on the Win 32bits systems ? My AWE object pascal module is here, it allows your application to use up to 64GB of RAM. And here is the public interface of TAWEStream class, i have implemented the following methods: TAWEStream = class(TStream) public Size:longword; constructor Create(); published property TotalMem:int64
read gettotalmem; Note: To be able to use AWE you have to set the user rights correctly, so, go to: Control Panel -> Administrative tools -> Local Security Policy -> User Rights Assignment and give 'Lock pages in memory' right to the user that wants to use AWE. Every TAWEStream object can go up to 4GB , and you can go up to 64GB !
Operating Systems: Windows 2000 and up (x86). Required FPC switches: -O3 -Sd -dFPC -dWin32 -dFreePascal -Sd for delphi mode.... Required Delphi switches: -DMSWINDOWS -$H+ For Delphi 5,6,7 use -DDelphi For Delphi 2005,2006,2007,2009,2010+ use the switch -DDELPHI2005+ |
Zip | |
Parallel Compression 2.15
Parallel Gzip , Parallel Bzip , Parallel LZMA and Parallel LZ algorithms that use my Thread Pool Engine. Please see the benchmarks here: benchmarks. Please look at test_pgzip.pas , test_pbzip.pas and test_plzma.pas demos inside the zip file, compile and execute them... -
Note: Parallel Gzip , Parallel Bzip work with both FreePascal and Delphi , but Parallel LZMA works only with Delphi 7 and up. Operating Systems: Win , Linux and Mac (x86). Note: to be able to port to Linux and Mac OSX you have to compile the dynamic libraries... Required FPC switches: -O3 -Sd -dFPC -dWin32 -dFreePascal -Sd for delphi mode.... -dUnix for Linux,MacOSX etc. Required Delphi switches: -DMSWINDOWS -$H+ -DDelphi |
Zip | |
Parallel Sort Library 2.15
Parallel Sort Library that supports Parallel Quicksort, Parallel HeapSort and Parallel MergeSort on Multicores systems. Parallel Sort Library 2.0
uses my Thread Pool Engine and quicksort many array parts
- of your array - in parallel using Quicksort or
HeapSort or MergeSort and after that it finally merge
them - with the merge() procedure - One way to parallelize the sorts is:
Note that the merge operation is a reduction operation ! Please see the benchmarks here: benchmarks. And please look at test.pas a parallel quicksort on many cores - compile and execute it...
Operating Systems: Win , Linux and Mac (x86). Required FPC switches: -O3 -Sd -dFPC -dWin32 -dFreePascal -Sd for delphi mode.... Required Delphi switches: -DMSWINDOWS -$H+ For Delphi 5,6,7 use -DDelphi For Delphi 2005,2006,2007,2009,2010+ use the switch -DDELPHI2005+ |
Zip | |
Threadpool 1.35 (stable version)
Operating Systems: Win , Linux and Mac (x86).
Thread Pool Engine. Please read an article that i wrote about my Threadpool engine: article. The following have been added:
-Sd for delphi mode.... Required Delphi switches: -DMSWINDOWS -$H+ For Delphi 5,6,7 use -DDelphi For Delphi 2005,2006,2007,2009,2010+ use the switch -DDELPHI2005+
Note: testpool.pas is a parallel program of a Matrix multiply by a vector that uses SSE+ and it requires Delphi 5+. test.pas and test_thread.pas works with both FreePascal and Delphi.
|
Zip | |
Threadpool with priority 1.24 (stable version)
Author: Amine Moulay Ramdane Operating Systems: Win , Linux and Mac (x86).
Thread Pool Engine. The following have been added: - You can give the following priorities to jobs: LOW_PRIORITY - A lock-free queue for each worker thread and it uses work-stealing - for more efficiency - - Enters in a wait state when there no is job in the queue - for more efficiency - - You can distribute your jobs to the workers threads and call any method with the threadpool's execute() method. - Uses 0(1) on enqueue and 0(3) worst case on dequeue. Look into defines.inc there
is many options:
-Sd for delphi mode.... Required Delphi switches: -DMSWINDOWS -$H+ For Delphi 5,6,7 use -DDelphi For Delphi 2005,2006,2007,2009,2010+ use the switch -DDELPHI2005+
Note: testpool.pas is a parallel program of a Matrix multiply by a vector that uses SSE+ and it requires Delphi 5+. test.pas and test_thread.pas works with both FreePascal and Delphi.
|
Zip | |
Lockfree priority SPMC queue 1.0
Author: Amine Moulay Ramdane Operating Systems: Win , Linux and Mac (x86). Description: Lock-free SPMC priority queue. It does use 0(1) on enqueue and 0(3) worst case on dequeue
-Sd for delphi mode.... Required Delphi switches: -DMSWINDOWS -$H+ For Delphi 5,6,7 use -DDelphi For Delphi 2005,2006,2007,2009,2010+ use the switch -DDELPHI2005+
|
Zip | |
Parallel Matrix demo
Operating Systems: NT/2000/XP and above. Description: Parallel program of Matrix multiply by a vector that uses SSE+ and my Lock-free Threadpool. Please look at the example testpool.pas inside the zip file... This demonstration does use
SSE+ , so if you don't have SSE support it will not work.
It does work with P4 and above. -Sd for delphi mode.... Required Delphi switches: -DMSWINDOWS -$H+ For Delphi 5,6,7 use -DDelphi For Delphi 2005,2006,2007,2009,2010+ use the switch -DDELPHI2005+
|
Zip | |
LockfreeUtils
Operating Systems: NT/2000/XP and above Description: TLFMemoryStream is like the Freepascal and Delphi TMemoryStream, but it's Lock-free: it mean that it's scalable and ready for multicores. Use the Lock-Free TLFMemoryStream to store data in a dynamic memory buffer that is enhanced with file-like access capabilities. TLFMemoryStream provides the general I/O capabilities of a stream object while introducing methods and properties to manage a dynamic memory buffer. Memory streams are useful as intermediary objects that can hold information as well as read it from or write it to another storage medium. They provide a useful format for comparing the contents of streams, or for manipulating data that is stored in a less accessible medium. The zip file also include TAsyncFileStream - asynchronous file input/output in Windows NT. Please read AFS.txt inside the zip.
-Sd for delphi mode.... Required Delphi switches: -DMSWINDOWS -$H+ For Delphi 5,6,7 use -DDelphi For Delphi 2005,2006,2007,2009,2010+ use the switch -DDELPHI2005+
|
Zip | |
API module (By Aldo Calpini) version 0.58
With this module you can import and call arbitrary functions from Win32's Dynamic Link Libraries (DLL). API module for ActivePerl 5.10: Zip Operating Systems: Windows 95/98/Me/NT/2000/XP How to install: Please read the readme file inside the zipfile.
|
.Zip | |
AdvNotify module (By Amine Moulay Ramdane) version 1.32
With this object oriented Perl module you will be able to monitor the changes on your directories, this allows your Perl application to respond to changes in the file system, such as new file and/or directory creation, renaming, size, attribute, time, security-descriptor changes etc. Also, with AdvNotify you can run multiple threads from inside your Perl application to monitor the file system changes and you will be notified of wich file has been changed. The AdvNotify's interface has been carefully designed to be very easy to use. Note: AdvNotify does use asynchronous completion to receive notification from the WinNT OS (no wasting CPU time "polling"), hence AdvNotify is very efficient. This module needs the API module, please download and install the API module before installing AdvNotify. Perl: ActivePerl: 5.0050x, 5.6 or higher. Operating Systems: Windows NT/2000/XP How to install: Read the readme file inside the zip. Documentation: After installing AdvNotify, click on your \perl\html\index.html and scroll down to the Win32 links and you will find it there, or you can also access it directly from \perl\html\lib\win32\AdvNotify.html or from Start => Programs => ActivePerl (documentation). |
Exe |
|
NTFS module (By Amine Moulay Ramdane) version 1.0
Please take a look at the documentation.. Perl: ActivePerl: 5.0050x, 5.6 or higher. Operating System: Windows 2000/XP Note: This module needs the API module, please download and install the API module before installing NTFS. |
Zip | |
MemMap module (By Amine Moulay Ramdane) version 2.12
Perl: ActivePerl: 5.0050x, 5.6 or higher. Operating Systems: Windows 95/98/Me/NT/2000/XP Note: This module needs the API module, please download and install the API module before installing MemMap. |
Zip | |
ISync module (By Amine Moulay Ramdane) version 1.21
This object oriented Perl module implements the Win32 synchronisation mechanisms: Semaphore,Mutex, Event,Timer objects. Perl: ActivePerl: 5.0050x, 5.6 or higher. Operating Systems: Windows 95/98/Me/NT/2000/XP Note: This module needs the API module, please download and install the Perl API module before installing ISync. |
Zip | |
More to come,Thank you. |