Monday, January 19, 2009

Being Nice

The subject of the post is a bit misleading. This is not a morality lesson rather yet another technical post. However it is about Linux rather Oracle, so you can say change factor is there.

Process scheduling is among the most important tasks that a kernel must do in order to effectively achieve Multiprogramming. Multiprogramming is a concept that all modern operating systems implement; it allows the user of the system to run several applications at a time. However in reality there can be only one application or process that can use the CPU at any given time. The kernel of the operating system switches the CPU from one process to the other and it does so extremely quickly that the user gets the illusion that multiple processes are using the CPU at a time. The decision that which process to run at what time is very critical and kernel does this by scheduling processes. Different operating systems use different algorithms. One of the things upon which the kernel relies on in making the decision of which process to run at any given time is; Process Priority.

Process priority is a value that is given to each process which determines how much this process is important. Linux handles the process priority by setting a nice value to every process. It's a nice analogy and it means that how much a process is nice to the others. A higher nice value means lower priority (process is nice to the others) and vice versa. The administrator can set the nice value and can also change it at any time. Most Linux distributions include priority classes for more complex process scheduling but they are rarely used instead the Nice value is more common and much reliable.

Thursday, October 23, 2008

Welcome to Linux

I am recently trying to get my hands smooth on Linux. Fortunately I found a very good book (Linux Administration Handbook) to help me out in this process. The book is not any distribution specific rather covers almost all major distributions. Well I chose Redhat Linux-4 for two reasons. First and the dominant is the availability of software and secondly I was told that it is user friendly. Normally Linux is not associated with the term User Friendly but I think otherwise. I am not an expert just a newbie but the thing I felt during this short experience of mine is that it's all matter of familiarity. We used Windows from day one and never tried Linux or UNIX not even Mac. Windows has become the trademark as for as using Computer is concerned but it is self made. There is no harm in trying others and getting familiar with other desktops. But I must admit that Windows is easier to use then Linux but Linux is not all that difficult as well if you try to use it without taking Windows in your mind. Break the psyche and that's it.

And look Linux really cares about you as well. If you are from Mac background then it has got Gnome for your ease and if your background is Windows then you have got KDE. Mainly my focus is on administration side that I will be in need of at some stage during my Oracle DBA career. And I am feeling much comfortable and fun then it is on Windows. Mainly it is because of the flexibility and power that you have in your hands while doing all that stuff. It's also known as Rootly Powers (term from the book I mentioned earlier). I am really enjoying and I will be updating my blog with some Linux stuff as well in the future.

A very good early lesson that I have learned is that Linux gives you the option of modifying system files by hand. This is lots of fun but be careful because if anything went wrong you will have yourself in series troubles and biggest of them all is there is no restart and get OK option here.