Assign more than 1 CPU/core to a process

I lost the password to open a PDF file I need to access, so I installed pdfcrack with the hope to recover my password. Actually it's one month that pdfcrack is running but I still am waiting for the result.

Looking at system monitor I noted that pdfcrack is using just one core of my CPU, the other 7 are idle. Is there a way to assign to pdfcrack more than one core to use? I'm using Ubuntu 12.04LTS 32-bit.


Solution 1:

Unless specifically designed to do so, software cannot generally use more than one CPU core, and cannot in general have extra added.

(Writing software to run on multiple cores concurrently is significantly more complicated, as you cannot guarantee the order in which tasks will finish, so you have to guard against all manner of problems caused by multiple CPUs trying to access resources concurrently, or events occurring in a different order to that you expected).

That said, PDF cracking is a task that should be parallelisable. It appears you can find a modified version with multi-core support, but it looks like you'll have to compile it from source.

Solution 2:

Check out

https://github.com/shreepads/pdfcrack-mp

This is a fork of pdfcrack with multi-core pattern support.

All changes are in the baseopnmp branch.