At a time when banks are shedding IT roles by the dozen, it seems counter-intuitive that 83 per cent of the nation’s chief information officers should report they are confident about the future of their business to the extent that 45 per cent expect to hire IT staff in the first six months of the year. The question remains – is this a dead cat bounce?
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.
We saw how the priority of any given process changes over time, both at the request of the user and by the kernel making adjustments over the lifetime of the process. We discussed how to see how much time the CPU spends executing your process and how this can give some hints to finding bottlenecks.
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.
Michelle Thomas
| Smelly Black Dog Internet is proud to announce that the company has signed up for Simtronic Technologies new wholesale broadband service as an…
How to Make Business Discovery Work for Your Business
Business Discovery takes its cues from consumer apps. Like Google, it encourages us- ers to hunt for and explore data without worrying about or even noticing the underly- ing technology. Their entire experience is working within an intuitive interface to get real-time, self-service results with only minimal training. ...more
Try an easy-to-use set of web-enabled
tools for business-class productivity services. Office 365 provides
anywhere-access to email, important documents, contacts, and calendars
on almost any device.