Skip to contentSkip to conversation

Kernel threads and system usage metric.

DISCUSSION Daniel Hilst 3 participants 4 messages Mar 9, 2012 – Mar 12, 2012

lore
Share & tools
lore
#0 lore raw

Doubt!

The processes that appear in top with brackets are the kernel threads?

If so, this threads spend all its time on system mode, right? By the system mode I mean the %sy on top header, since kernel threads hasn't any memory mapped to user space, it can't run on user space at any time, right?

So the total of system mode usage is the sum of all processes processing in kernel space, plus the kernel threads processing, right?

Thanks in advance!

Signature · 1 line
Follow the white rabbit!
#1 lore raw

Hi :)

Quoted 1 line · Daniel Hilst

The processes that appear in top with brackets are the kernel threads?

Yup :)

Quoted 1 line

If so, this threads spend all its time on system mode, right?

Yes, it supposed to ...

Quoted 4 lines

By the
system mode I mean the %sy on top header, since kernel threads hasn't any memory mapped to user space, it can't run on user space at any time, right?

IIRC, kernel thread simply "borrow" any previous scheduled task's address space. In that matter, it also has user address space. So, if wanted, kernel thread could access user space. But normally it doesn't do it.

Quoted 4 lines

So the total of system mode usage is the sum of all processes processing in kernel space, plus the kernel threads processing, right?

remember that kernel threads are also processes, so no need to differentiate between normal processes and kernel threads, especially when we talk about CPU utilization.

Signature · 7 lines
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
#2 lore raw
Quoted 23 lines · Mulyadi Santosa

Hi :)

Quoted 1 line · Daniel Hilst

The processes that appear in top with brackets are the kernel threads?

Yup :)

Quoted 1 line

If so, this threads spend all its time on system mode, right?

Yes, it supposed to ...

Quoted 4 lines

By the
system mode I mean the %sy on top header, since kernel threads hasn't any memory mapped to user space, it can't run on user space at any time, right?

IIRC, kernel thread simply "borrow" any previous scheduled task's address space. In that matter, it also has user address space. So, if wanted, kernel thread could access user space. But normally it doesn't do it.

Quoted 2 lines
Quoted 7 lines
Quoted 2 lines

So the total of system mode usage is the sum of all processes processing in kernel space, plus the kernel threads processing, right?

remember that kernel threads are also processes, so no need to differentiate between normal processes and kernel threads, especially when we talk about CPU utilization.

Thanks Mulyadi!

Signature · 1 line
Follow the white rabbit!
#3 lore raw
In reply to Mulyadi Santosa
Quoted 17 lines · Mulyadi Santosa

Hi :)

Quoted 1 line · Daniel Hilst

The processes that appear in top with brackets are the kernel threads?

Yup :)

Quoted 1 line

If so, this threads spend all its time on system mode, right?

Yes, it supposed to ...

Quoted 4 lines

By the
system mode I mean the %sy on top header, since kernel threads hasn't any memory mapped to user space, it can't run on user space at any time, right?

Quoted 5 lines

IIRC, kernel thread simply "borrow" any previous scheduled task's address space. In that matter, it also has user address space. So, if wanted, kernel thread could access user space. But normally it doesn't do it.

AFAIK kernel threads do not have any userspace context. As it is never gaurnted which userspace process was previously running when kernel thread scheduled to run.

Quoted 15 lines
Quoted 4 lines

So the total of system mode usage is the sum of all processes processing in kernel space, plus the kernel threads processing, right?

remember that kernel threads are also processes, so no need to differentiate between normal processes and kernel threads, especially when we talk about CPU utilization.

--
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

Quoted 7 lines

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120312/df71ca11/attachment.html