Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 17 down vote accepted

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.

share|improve this answer
    
Thanks for the link! I thought that it was possible to create a "virtual CPU" built of more than one core. This way pdfcrack still sees 1 CPU, but that CPU would have more computational power. –  Paolo Feb 11 '13 at 9:33
    
I know of virtual CPUs in the context of virtual machines or hyperthreading, but these have lower throughput than the physical core they run upon. As far as I know creating a faster virtual core from multiple physical ones is not possible - you'd get back to the same problems of synchronisation and contention that you encounter explicitly using multiple threads. Do you have a link describing such a thing? –  chronitis Feb 11 '13 at 9:46
    
Nope. What I wrote was the description of how I'd like to add more CPU power to some process. I admit I'm missing some base concept at this regard. –  Paolo Feb 11 '13 at 10:00
    
I have the link of man cpuset. I'm not sure it will help, but it could and worth a read. –  Paolo Feb 11 '13 at 10:25
4  
As indicated on the man page you've mentioned, cpuset is for confinement to a specific subset of CPUs/cores, a process assigned a set with 4 CPUs will still run on 1 if that's all it's programmed to do. –  TheTerribleSwiftTomato Feb 11 '13 at 10:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.