内核线程---"kthreadd" [英] kernel thread --- "kthreadd"

查看:113
本文介绍了内核线程---"kthreadd"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

众所周知,kthreadd是一个内核线程,用于帮助其他人创建新的内核线程(请参阅kthread_create_list以查看是否需要创建任何新的内核线程).

As we all know, kthreadd is a kernel thread, which is used to help others create new kernel threads (Review kthread_create_list to see if there is any new kernel thread need to create).

但是我不明白为什么我们不使用create_kthread创建新的内核线程? 我看不出kthreadd有什么区别.

But I can not understand why we do not use create_kthread to create a new kernel thread? I do not see any difference kthreadd makes.

请给我一些建议.

感谢您的大力帮助.

推荐答案

不是真的. kthreadd是在内核空间中运行的守护程序线程. 原因是内核有时需要创建线程,但是在内核中创建线程非常棘手.因此,如果需要,kthreadd是内核用来生成较新线程的线程.该线程也可以访问用户空间地址空间,但不应这样做.它由内核管理,因此不必担心.

Not Really. kthreadd is a daemon thread that runs in kernel space. The reason is that kernel needs to some times create threads but creating thread in kernel is very tricky. Hence kthreadd is a thread that kernel uses to spawn newer threads if required from there . This thread can access userspace address space also but should not do so . Its managed by kernel so one need not worry.

这篇关于内核线程---"kthreadd"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆