Technology news and Jobs
The Linux distillery
Dawn of the Linux dead
The Linux distillery
Dawn of the Linux dead | Dawn of the Linux dead |
|
| by David M Williams | |
| Monday, 25 February 2008 | |
|
Page 1 of 3
Over the last week we’ve been covering how the Linux multitasking scheduler works. Today it’s time to see what Linux has in common with popular horror flicks: this story has it all – zombies and zombie children, and a reaper.Featured Whitepaper
5 Best Practices for Smartphone Support
We also saw how Linux defined the amount of time that the CPU will grant to any process before suspending it so another process can run for a while. This time period is known as a jiffy and so Linux literally runs its tasks in a jiffy! A kernel variable called HZ controls the length of a jiffy; Linux uses this value to interrupt the processor that many times every second. Armed with the depth of understanding we have covered, you can optimise a Linux system to be more responsive if you have critical real-time needs, or need greater responsiveness for any other reason such as intensive multimedia work. Alternatively, if your Linux system is primarily used for complex number crunching you might like to decrease the amount of times the kernel interrupts each process. One thing we haven’t yet covered is what’s known as the state of a process. Over its lifetime, every process will pass through several states. You may well be familiar with some of these from commands like ps or by listing the /proc file system. These states are as follows: Running (R) – The processing running, or is ready to run Interruptible (S) – The process is blocked waiting for an event – like keyboard input – but may be awakened by a signal Uninterruptible (D) – The process is blocked waiting for an event but will not be awakened by a signal Stopped (T) – The process has been stopped due to job control (ie pressing CTRL/Z) or by a debugging/tracing utility like ptrace Zombie (Z) – The process has exited, but its parent has not yet called the wait command to reap it Only one process can be running – that is, under execution by the CPU – at any time. However any number of processes can be in the Running state. This state doesn’t mean that the process is actually running but rather that it is not sleeping or waiting for an event; it is a possible candidate for execution whenever the scheduler has to make a decision. Let’s see where these zombies come in. Please read on. CONTINUED |
| < Next story in category | Previous story in the category > |
|---|











