 .  ,     
 ,       .    -
 (SMP-safe),     ,   
     .

 ,      , 
    preempt_count   thread_info
 .         
    ,       -
  .        -
 .     ,   -
   ,     need_resched
 preempt_count.   need_resched    
preempt count  , ,      
   .   .  -
  preempt_count   , ,  
     .      -
      .  -
  ,   ,  
preempt_count   .   ,  -
 , ,     need_resched.  -
,   .      -
       ,   
  9.

      ,   -
        schedule ().  
   ,       -
   ,     ,  -
  . ,      
schedule  ,   ,    .

       .

        .

      .

  ,    ,    schedule ().

  ,    ,    -
, ..  (     schedule ()).

  

  Linux      -
   (real-time): SCHED_FIFO  SCHED_RR.  
SCHED_OTHER    , ..  -
     .  SCHED_FIFO  
    "    " (first-in
first-out, FIFO)   .      
 SCHED_FIFO       
    SCHED_OTHER.    

                                                 89