How can a process in “interruptible sleep” state use 100% CPU?
According to this reference, a process has the following states
R running or runnable (on run queue)
D uninterruptible sleep (usually IO)
S interruptible sleep (waiting for an event to complete)
Z defunct/zombie, terminated but not reaped by its parent
T stopped, either by a job control signal or because it is being traced
In the sleep state, it is not expected that process consumes CPU time, however in the output below, I see that a process is using 100% of cpu and at the same time, it is in S state.
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
32643 root 20 0 13736 7748 472 R 98 0.0 2:59.30 bzip2
29504 satam 20 0 1063m 779m 3824 S 100 2.4 1242:54 stencil
31923 root 20 0 15092 1224 848 D 14 0.0 1:39.96 find
How that is possible and what does that mean?
linux process
add a comment |
According to this reference, a process has the following states
R running or runnable (on run queue)
D uninterruptible sleep (usually IO)
S interruptible sleep (waiting for an event to complete)
Z defunct/zombie, terminated but not reaped by its parent
T stopped, either by a job control signal or because it is being traced
In the sleep state, it is not expected that process consumes CPU time, however in the output below, I see that a process is using 100% of cpu and at the same time, it is in S state.
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
32643 root 20 0 13736 7748 472 R 98 0.0 2:59.30 bzip2
29504 satam 20 0 1063m 779m 3824 S 100 2.4 1242:54 stencil
31923 root 20 0 15092 1224 848 D 14 0.0 1:39.96 find
How that is possible and what does that mean?
linux process
add a comment |
According to this reference, a process has the following states
R running or runnable (on run queue)
D uninterruptible sleep (usually IO)
S interruptible sleep (waiting for an event to complete)
Z defunct/zombie, terminated but not reaped by its parent
T stopped, either by a job control signal or because it is being traced
In the sleep state, it is not expected that process consumes CPU time, however in the output below, I see that a process is using 100% of cpu and at the same time, it is in S state.
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
32643 root 20 0 13736 7748 472 R 98 0.0 2:59.30 bzip2
29504 satam 20 0 1063m 779m 3824 S 100 2.4 1242:54 stencil
31923 root 20 0 15092 1224 848 D 14 0.0 1:39.96 find
How that is possible and what does that mean?
linux process
According to this reference, a process has the following states
R running or runnable (on run queue)
D uninterruptible sleep (usually IO)
S interruptible sleep (waiting for an event to complete)
Z defunct/zombie, terminated but not reaped by its parent
T stopped, either by a job control signal or because it is being traced
In the sleep state, it is not expected that process consumes CPU time, however in the output below, I see that a process is using 100% of cpu and at the same time, it is in S state.
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
32643 root 20 0 13736 7748 472 R 98 0.0 2:59.30 bzip2
29504 satam 20 0 1063m 779m 3824 S 100 2.4 1242:54 stencil
31923 root 20 0 15092 1224 848 D 14 0.0 1:39.96 find
How that is possible and what does that mean?
linux process
linux process
edited Aug 3 '14 at 14:17
a CVn
24.4k873120
24.4k873120
asked Aug 3 '14 at 13:47
mahmoodmahmood
3504922
3504922
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
"uninterruptible sleep" means that the process is waiting on I/O (disk operations for example). But given that the CPU is running the process, even though it isn't doing work, the CPU is still "stuck" waiting for it to complete the io, so it can get on with something else - to schedule another task. So this consumes 100% of cycles of the CPU when the process is in D mode.
So it is in sleep mode, in than that it isn't doing any CPU work, but is uninterruptible which means the CPU can't do anything else.
In a multi-core system, the other cores are available for other tasks.
Missed it by that much! {/Max Smart Voice} The 'S' (stencil) process, not the 'D' (find). But you're right.
– lornix
Aug 4 '14 at 4:54
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f791840%2fhow-can-a-process-in-interruptible-sleep-state-use-100-cpu%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
"uninterruptible sleep" means that the process is waiting on I/O (disk operations for example). But given that the CPU is running the process, even though it isn't doing work, the CPU is still "stuck" waiting for it to complete the io, so it can get on with something else - to schedule another task. So this consumes 100% of cycles of the CPU when the process is in D mode.
So it is in sleep mode, in than that it isn't doing any CPU work, but is uninterruptible which means the CPU can't do anything else.
In a multi-core system, the other cores are available for other tasks.
Missed it by that much! {/Max Smart Voice} The 'S' (stencil) process, not the 'D' (find). But you're right.
– lornix
Aug 4 '14 at 4:54
add a comment |
"uninterruptible sleep" means that the process is waiting on I/O (disk operations for example). But given that the CPU is running the process, even though it isn't doing work, the CPU is still "stuck" waiting for it to complete the io, so it can get on with something else - to schedule another task. So this consumes 100% of cycles of the CPU when the process is in D mode.
So it is in sleep mode, in than that it isn't doing any CPU work, but is uninterruptible which means the CPU can't do anything else.
In a multi-core system, the other cores are available for other tasks.
Missed it by that much! {/Max Smart Voice} The 'S' (stencil) process, not the 'D' (find). But you're right.
– lornix
Aug 4 '14 at 4:54
add a comment |
"uninterruptible sleep" means that the process is waiting on I/O (disk operations for example). But given that the CPU is running the process, even though it isn't doing work, the CPU is still "stuck" waiting for it to complete the io, so it can get on with something else - to schedule another task. So this consumes 100% of cycles of the CPU when the process is in D mode.
So it is in sleep mode, in than that it isn't doing any CPU work, but is uninterruptible which means the CPU can't do anything else.
In a multi-core system, the other cores are available for other tasks.
"uninterruptible sleep" means that the process is waiting on I/O (disk operations for example). But given that the CPU is running the process, even though it isn't doing work, the CPU is still "stuck" waiting for it to complete the io, so it can get on with something else - to schedule another task. So this consumes 100% of cycles of the CPU when the process is in D mode.
So it is in sleep mode, in than that it isn't doing any CPU work, but is uninterruptible which means the CPU can't do anything else.
In a multi-core system, the other cores are available for other tasks.
answered Aug 4 '14 at 2:46
PaulPaul
48.1k13122147
48.1k13122147
Missed it by that much! {/Max Smart Voice} The 'S' (stencil) process, not the 'D' (find). But you're right.
– lornix
Aug 4 '14 at 4:54
add a comment |
Missed it by that much! {/Max Smart Voice} The 'S' (stencil) process, not the 'D' (find). But you're right.
– lornix
Aug 4 '14 at 4:54
Missed it by that much! {/Max Smart Voice} The 'S' (stencil) process, not the 'D' (find). But you're right.
– lornix
Aug 4 '14 at 4:54
Missed it by that much! {/Max Smart Voice} The 'S' (stencil) process, not the 'D' (find). But you're right.
– lornix
Aug 4 '14 at 4:54
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f791840%2fhow-can-a-process-in-interruptible-sleep-state-use-100-cpu%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown