Wednesday, March 14, 2007

A Simple CPU Load Generator

Recently, at work I wanted a simple CPU load generator which can consume CPU power by specified amount such as 25% of a physical CPU.

Here it is. :)

As you can see in the source code, this is a straight forward, SIGNAL based, multi-process model and stupid program. :o But, anyway it works at least for me.
I wrote a similar test program about 10 years ago for an IBM compatible general purpose mainframe computer in assembly language when I was a freshman.

Well, time goes by, and there is almost no progress. :(

Note:
Some folks might know my employer and what I'm doing at work.
But, this very small work was done completely using my spare time.
So, please do NOT blame me.

2 comments:

Unknown said...

Hi,

The link for the staggered CPU load generator seems to be broken.

Could you post it again ?

thx

thatsdone said...

Hi,

Thanks for your interest.

Actually I repackaged the program, and now you can find it at the bottom of below:

http://homepage3.nifty.com/marc/progs/

But, various updates would appear in a sourceforge project below. So, I'd be happy if you could check it out at the project page:

http://sourceforge.net/projects/kusanagi/

The small CPU load generator can be found below.
http://sourceforge.net/project/showfiles.php?group_id=193035&package_id=233364

Thanks