This assumes there is only one core in the system. If the system is a core2duo or quad core then cpufrequency should be disabled individually for each core, as latest kernels handle each cpu core cpu frequency separately. There is one another way
sudo apt-get install cpufrequtils
suppose I want to disable cpufreq scaling on cpu 0 and 1
sudo cpufreq-set -c 0 -g performance
sudo cpufreq-set -c 1 -g performance