Skip to main content

Tips for Linux Kernel scheduling,shutdown and restart command,steps to kernel updating

 kernel scheduling in Linux

In kernel you have kernel threads. Some part of the kernel code runs in the userspace process context and some other part runs in the kernel thread context. All the userspace processes and kernel threads are scheduled with no difference except that their priority(that is both userspace process and kernel threads are treated same).

we can change the kernel with our algorithm.. algorithm in sence round robin,shortest job first, fcfs, etc.
You have a mirror or some part (dono the exact name) in kernel where you store your algorithm. and make kernel work in your algorithm. If your algorithm works fine without crashing the system you can set ur algorithm as default overwriting the existing one.
Its possible to write your own algorithm too.

scheduler schedules processes either it may be user or kernel, all user and kernel processes are same and kernel treats them in the same manor,except kernel process will not be swapped out, kernel process will have more privilege than user process, and at the same time it will have lot of limitation, they cannot use memory like a user process .

There is no separate scheduler for kernel processes.

And when scheduler will come into picture?, when ever you create a process, at every timer (PIT) interrupt, process been woken up by an event.

I think u have confused kernel means not only scheduler, all the subsystems in side it called kernel. Ex: interrupt manager, memory manager.

When a process needs some resource then the corresponding subsystem will come into picture, for example: process calls malloc, who will give the memory to it. the manager managing memory resource will give some free memory to it, it is also part of the kernel.

I think u need to read basics of Operating systems, kernel preemption is different, and process preemption it not called preemption we have to call them process switching. Process switching depends on the scheduling algorithm.

all processes which uses kernel will be effected by preemption, with out kernel there wont be any process.

System command to shutdown a system and for restart on Linux

Following is very important System command to shutdown a system and for restart on Linux. I tried both command and its correct. 

init 0 for shutdown

init 6 for reboot

Please note that command shutdown -h also used to shutdown the system but  shutdown -h can executed by any user but init 0 can only run by superuser .


The steps to kernel updations on Linux

The steps to kernel updating.
first of all download the kernel from kernel.org latest version
then untar it by using
# tar -zxvf linux-2.6.30.tar.gz
after that go to parent dictory of kernel
#make menuconfig
#make
#make modules
#make modules_install
#make install
After that you reboot it , you get updated kernel at grub and select it .Then you will get updated version of kernel

Popular posts from this blog

Resolved : Power BI Report connection error during execution

Getting Below Power BI Report connection error during execution . Error: Something went wrong Unable to connect to the data source undefined. Please try again later or contact support. If you contact support, please provide these details. Underlying error code: -2147467259 Table: Business Sector. Underlying error message: AnalysisServices: A connection cannot be made. Ensure that the server is running. DM_ErrorDetailNameCode_UnderlyingHResult: -2147467259 Microsoft.Data.Mashup.ValueError.DataSourceKind: AnalysisServices Microsoft.Data.Mashup.ValueError.DataSourcePath: 10.10.10.60;T_CustomerMaster_ST Microsoft.Data.Mashup.ValueError.Reason: DataSource.Error Cluster URI: WABI-WEST-EUROPE-redirect.analysis.windows.net Activity ID: c72c4f12-8c27-475f-b576-a539dd81826a Request ID: dfb54166-c78f-4b40-779f-e8922a6687ad Time: 2019-09-26 10:03:29Z Solution: We found report connection not able to connect to SQL Analysis service so tried below option. Re

Song- Khamoshiyan Piano keyboard Chord,Notation and songs Lyrics

All songs notation and chords at one place

Song : O Saathi Re Film : Mukhathar Ka Sikkandhar Uses : C D D# E G A Note : The numbers at the end of the lines indicate line numbers. Pallavi: O saathi re, tere binaa bhi kya jina, tere binaa bhi kya jina A- C D D#....,D D C DD E...C..CA-...,D D C DD E...CC.......1 Play line 1 again phulon men khaliyon men sapnom ki galiyon men GGG...GAGE.. GGG G A G E.................................................2 tere bina kuchh kahin naa E A G E D C D D#.......................................................................3 tere binaa bhi kya jina, tere binaa bhi kya jina D D C DD E....C..CA-..., D D C DDE....CC.............................4 Charanam: har dhadkan men, pyaas hai teri, sanson men teri khushboo hai CCC C D C A-, CCC C D C A-, DDD DED CD EE.. CCCC......................5 is dharthi se, us ambar tak, meri nazar men tu hi tu hai CCC C D C A-, CCC C D C A-, DDD DED CD EE.. CCCC......................6 pyaar yeh tute naa GGG... GAG D#......E.........................