Tuesday, 16 May 2017

Linux Kernel


Kernel 2.6 - Major Features

 - scheduler for wakeup, context-switch, and timer interrupt overhead.
- Each CPU has a runqueue made up of 140 priority lists that are serviced in FIFO order. 
- The first 100 priority lists of the runqueue are reserved for real-time tasks, and the last 40 are used for user tasks (MAX_RT_PRIO=100 and MAX_PRIO=140).
Scheduler 

  • Load balancer: In SMP environment, each CPU has its own rq. These queues might be unbalanced from time to time. A running queue with empty task pushes its associated CPU to idle, which does not take full advantage of symmetric multiprocessor systems. Load balancer is to address this issue. It is called every time the system requires scheduling tasks. If running queues are unbalanced, load balancer will try to pull idle tasks from busiest processors to idle processor. 
kernel2.6Schedular
  


How are Kernel Log Messages Exposed to User Space?


The log buffer is exposed to user through /proc/kmsg file. This is the kernel ring buffer!
Reading the Kernel Ring Buffer  

The main purpose of dmesg is to display kernel messages. dmesg can provide helpful information in case of hardware problems or problems with loading a module into the kernel. In addition, with dmesg, you can determine what hardware is installed on your server.

  • # dmesg -c

Execute the command dmesg to make sure the logs are cleared the kernel ring buffer.



  

No comments:

Post a Comment