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

Song Aankhen Khuli Ho lyrics notation

Song : Aankhen Khuli Ho Movie: Mohabbatein Notes used : W=>Western - C D E F G- A- B-/ H=>Hindustani - S R G M P- D- N- ( Here for western, G=G-, A=A-, & B=B- ) ( For hindustani, P=P-, D=D-, & N=N- ) Song I : Aankhen Khuli...Ho Ya.. Ho Bandh W=> A.... C... B..C.. E.. E...... A... A.... H=> D... S... N..S.. G G....... D... D.... Deedaar Un Ka Ho.o.taa Hai.. W=> A...B....A....D.BAG....ADB... H=> D...N...D.....R.NDP...DRN... Kaise Kahoon Main O..Yaaraa W=> B..D.. D....E.... D.....C..C..C... H=> N..R.. R....G... R.....S..S..S..... Ye Pyaar Kaise Hota Hai W=> E...B.....DB...AG...B..AA H=> G...N....RN...DP...N...DD (Tururu ru ru, ru ru rururu ru......) W=> AA...GA...BCE..., B...DB..GA H=> DD...PD...NSG..., N..RN.. PD Song II: Aa.aj He Kisi..par Yaa.ro.on..., Marke De..Khe..gein Hum W=> E....FEDCBABC.D.. D D......., G A B C.... E.......D...D..... H=> G....MGRSNDNS.R. R R......., P D N S.....G........R...R.... Pyaar Ho