Re: How Does Preemptive and non-Preemptive kernel works in following case.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi Manjunath naik,
 
it won't be killed,... it will getting CPU, and other process also will get CPU.
how?
 
first u try understand Preemptive and non-Preemptive kernel.....

preemptive kernels, which means that a process running in Kernel Mode can be interrupted after any instruction, just as it can in User Mode.The Linux kernel is not preemptive, which means that a process can be preempted only while running in User Mode;

these lines are taken from Understanding linux Kernel book, 2nd edition, chapter 11.1.1......... i don't page no,bcoz i reading in on line......

for more idea you can refer the same book........

hope it will clear ur doubt...

Ashok


 
On 4/12/06, Manjunath Naik <peter.desouzain@xxxxxxxxx> wrote:
I have program as shown below,

main()
{
    while(1);
}


it is infinite loop without exit condition. So the program will
consume all the CPU or hogs the CPU. How this scenarios is handled in
both preemtive and non-preemtive schedular.

  Whether this process will be killed  after some time by OS. If yes
which process does this and how it does since that process wonot get
CPU time.

Thanks
Manjunath Naik

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux