edit kernel source file
is it nesscary to recompile the complete kernel if i simply want to add one printk statement in some C file in the kernel source code ?
example in noop scheduler C file if i add one printk statement ?
and also i am not allowed to edit the file why is it read only ??
Well, if you have your kernel code in the usual place (/usr/src/), you can't edit it because everything in that directory belongs to root and not to you. Copy the kernel tree into your home directory and then you can edit the copy.
If your modification is in the main kernel, not in a module, then you can save time by recompiling it with make bzImage. It's the compiling of all the modules that takes up so much time.
To add to Hazel's answer, yes you will have to at least recompile the changed component. If your kernel source has been recently rebuilt, then it will go very fast. Otherwise, it will take a bit of time (about 5 minutes on my dual-core 2.5GHz laptop running Ubuntu 9.04).