内核线程和用户线程之间有什么区别? [英] What is the difference between kernel threads and user threads?

查看:88
本文介绍了内核线程和用户线程之间有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

内核线程和用户线程之间有什么区别?内核线程是在内核模式下调度和执行的吗?用于创建内核线程的技术是什么?

What is the difference between kernel threads and user threads? Is it that kernel thread are scheduled and executed in kernel mode? What are techniques used for creating kernel threads?

是否已安排用户线程在用户模式下执行?内核是否不参与执行/调度用户线程?当执行用户线程发生中断时,谁来处理呢?

Is it that user thread is scheduled, executed in user mode? Is it that Kernel does not participate in executing/scheduling user threads? When interrupts occur in executing user thread then who handles it?

无论何时创建线程,都会为每个线程创建一个TCB.现在在用户级线程的情况下 是否在用户的地址空间中创建了此TCB?

Whenever, thread is created a TCB is created for each. now in case of user level threads Is it that this TCB is created in user's address space ?

在两个用户级别线程之间进行切换的情况下,谁来处理上下文切换?

In case of switching between two user level threads who handles the context switching ?

有一个多线程模型的概念:

There is a concept of multithreading models :

  1. 多对一
  2. 一对一
  3. 多对多.

这些型号是什么?这些模型如何实际使用?

What are these models? How are these models practically used?

已经阅读了有关该主题的几篇文章,但仍然感到困惑
要清除概念..

Have read few articles on this topic but still confused
Wants to clear the concept ..

预先感谢, 塔兹姆

推荐答案

内核线程和用户线程有什么区别?

What is the difference between kernel threads and user threads?

内核线程具有特权,可以访问用户模式线程之外的内容.看看Wikipedia上的"环(计算机安全性)".在Windows上,用户模式对应于Ring 3,而内核模式对应于Ring 0.

Kernel threads are privileged and can access things off-limits to user mode threads. Take a look at "Ring (Computer Security)" on Wikipedia. On Windows, user mode corresponds to Ring 3, while kernel mode corresponds to Ring 0.

用于创建内核线程的技术是什么?

What are techniques used for creating kernel threads?

这完全取决于操作系统.

This is extremely dependent upon the operating system.

现在在用户级线程的情况下,是否在用户的地址空间中创建了此TCB?

now in case of user level threads Is it that this TCB is created in user's address space ?

TCB记录了有关内核在运行该线程时使用的线程的信息,对吗?因此,如果在用户空间中分配了它,则用户模式线程可能会对其进行修改或破坏,这似乎不是一个好主意.所以,您不认为它是在内核空间中创建的吗?

The TCB records information about a thread that the kernel uses in running that thread, right? So if it were allocated in user space, the user mode thread could modify or corrupt it, which doesn't seem like a very good idea. So, don't you suppose it's created in kernel space?

这些型号是什么?这些模型如何实际使用?

What are these models? How are these models practically used?

维基百科似乎很清楚.

这篇关于内核线程和用户线程之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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