线程与核心 [英] Threads vs Cores

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

问题描述

如果我有一个像这样的处理器,它说#个核= 4 ,#个线程= 4,并且不支持超线程.

Say if I have a processor like this which says # cores = 4, # threads = 4 and without Hyper-threading support.

这是否意味着我可以同时运行4个程序/进程(因为一个内核只能运行一个线程)? 还是那意味着我可以同时运行4 x 4 = 16个程序/进程?

Does that mean I can run 4 simultaneous program/process (since a core is capable of running only one thread)? Or does that mean I can run 4 x 4 = 16 program/process simultaneously?

根据我的挖掘,如果没有超线程,则每个内核只有1个线程(进程).如果我错了,请纠正我.

From my digging, if no Hyper-threading, there will be only 1 thread (process) per core. Correct me if I am wrong.

推荐答案

基本上是正确的,带有明显的限定词,即大多数操作系统允许您同时执行比内核或线程多得多的任务,而内核或线程是通过交错执行来完成的说明.

That's basically correct, with the obvious qualifier that most operating systems let you execute far more tasks simultaneously than there are cores or threads, which they accomplish by interleaving the executing of instructions.

具有超线程的系统通常具有的硬件线程是物理内核的两倍.

A system with hyperthreading generally has twice as many hardware threads as physical cores.

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

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