在Linux中上下文切换需要多长时间? [英] How long does a context switch take in Linux?

查看:567
本文介绍了在Linux中上下文切换需要多长时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很好奇在Linux中更改上下文要花多少个周期.我专门使用E5405 Xeon(x64),但我很想看看它与其他平台的比较.

I'm curious how many cycles it takes to change contexts in Linux. I'm specifically using an E5405 Xeon (x64), but I'd love to see how it compares to other platforms as well.

推荐答案

有一个免费的应用程序,名为LMBench,由Larry McVoy和朋友编写.它提供了一堆OS&硬件基准 其中一项测试称为lat_ctx,它可以测量contex切换延迟. Google for lmbench,并通过自己的硬件进行检查.这是获取对您有意义的数字的唯一方法.

There`s a free app called LMBench written by Larry McVoy and friends. It provides a bunch of OS & HW benchmarks One of the tests is called lat_ctx and it measures contex switch latencies. Google for lmbench and check for yourself on your own HW. Its the only way to get a number meaningful to you.

吉拉德

这篇关于在Linux中上下文切换需要多长时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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