- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
A machine has a 32-bit address space and a page size of 8KB. The page table is entirely in hardware, with one 32-bit word per entry. When a process is scheduled, its page table is copied to the hardware from memory, at a rate of one word / 100 ns. If each process runs for 100ms (including the time to load the page table), what fraction of the CPU time is devoted to loading the page tables?
是的;这是一道作业题。我调查了一下,到目前为止我发现
页表大小(字节)= 条目数 * 条目大小。所以x= 32*8192(位)= 262144
我知道这是错误的答案,它是 52; 4288毫秒我将在
的后一个等式中使用它加载页表的时间/总时间 = CPU 使用
此处发布了一个我不太理解的解决方案。
最佳答案
这里棘手的部分是计算页表的大小。一旦你有了它,将它乘以加载每个表条目所需的时间。表条目有多大并不重要 - 重要的是加载它需要多长时间。
所以考虑一个 32 位地址空间。里面有多少个8K的chunk?那是您引用的文档中减去位的部分。描述8K需要13位。请注意 2 ^ 13 = 8K(通过注意 1024 占用 10 位来快速计算它。它有点助记且易于内存。8 占用 3 位,10 + 3 = 13。或者使用计算器查看 2 的幂等于多少8K.)
整个地址空间的 32 位减去 13 得到 19,所以有 2 ^ 19 页。
现在只需将 2 ^ 19 乘以 100 ns 就可以了。你有它。
关于32-bit - 一台机器有一个32位的地址和一个8KB的机器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14947828/
我将文件读入字符串,更改第一行,然后将此字符串写入新文件。我通过以下代码(稍微缩短了一点)来做到这一点: while(jspIterator.hasNext()){
adb shell dumsys meminfo返回的内存是kB还是KB? 哪里: kB = 1000 bytes KB = 1024 bytes 最佳答案 它是 KB(1024 字节)或 ki
我能够解析 xml 文件,并且我想下载 xml 给出的 url 的文件。我有以下代码: try{ /* Create a URL we want to load some xm
这个问题在这里已经有了答案: Android, Compressing an image (2 个答案) 关闭 10 个月前。 我正在 android 中开发一个应用程序,它将捕获照片并存储在 sq
我将文件保存在我的 MySQL 数据库中的 LONGBLOB 列上,当我在我的 IDE 中执行选择时,我注意到一些 base64 文件内容有消息 206.2 kB (204.8 kB loaded)放
使用 Indy 的 TIdTCPServer 组件,一个包被分两部分接收,但客户端发送了一个 64 KB 的包。 如何在服务器 OnExecute 事件中接收完整的包? 现在我放了一个原型(proto
我正在编写一个正则表达式,它可以捕获一个值及其后面的任何 mb、kb、gb、字节正则表达式是: (?\p{N}+)(?:\s*)(?[mb|kb|gb|b|bytes]) 但是当给定输入“40
我刚刚创建了 range(1,100000) 的 python 列表. 使用 SparkContext 完成以下步骤: a = sc.parallelize([i for i in range(1,
我的要求是将相机捕获的图像上传到服务器,但它应该小于 500 KB。如果大于 500 KB,则需要减小到小于 500 KB (但稍微接近) 为此,我使用以下代码 - @Override pub
我有以两种不同方式加载和保存图像的代码-第一种使用openCV,第二种使用PIL。 import cv2 from PIL import Image img = cv2.imread("/home/m
我有一个 android 视频播放器,它显示 SD 卡上的所有视频名称和文件大小,但大小以字节显示,我无法将它转换为 KB、MB、GB 等。我尝试除以 int值增加 1024 但它不起作用。它打印出错
任何人都可以向我解释一下摘要报告中如何测量吞吐量、Kb/秒和平均字节数吗? 我得到了以下登录操作的总结报告。 Label : Login Action(sampler) Sample# : 1 ave
我需要将上传图片的大小调整为最大 100 kB。可能吗? 例如:尺寸为 1200x600 的 image1.jpg 有 280kB,我需要将其调整为 <100kB。 最佳答案 ImageMagick
我需要将上传图片的大小调整为最大 100 kB。可能吗? 例如:尺寸为 1200x600 的 image1.jpg 有 280kB,我需要将其调整为 <100kB。 最佳答案 ImageMagick
我有例如: Document doc = Jsoup.connect("http://example.com/").get(); String title = doc.title(); Documen
我正忙于Android通话录音机,当我调用电话时录音机显示它正在录音,在我挂断电话后,它保存文件,但保存的文件是0 KB 有没有人遇到同样的问题,请帮我解决一下。 这是我的录制代码 recorder
我正在以 KB 为单位将文件存储在数据库中。我尝试将文件信息返回的文件长度转换为 KB,如下所示。 FileInfo FileVol = new FileInfo(DownloadPath); int
在我的应用程序中,显示照片中的所有视频。选择视频后,将使用 avplayer 播放该视频。但是当我尝试获取所选视频文件的大小(kb)时,它显示错误。当我尝试复制视频文件时出现同样的错误。 我已获取这些
我正在尝试在 firebase 存储中上传图像,我希望图像不应大于 50 kb 我正在尝试获取位图的大小,以便我可以知道位图的大小是否超过 50 kb这图片不会显示在画廊中 我已经尝试了许多人建议的代
在我的 android 应用程序中,它收集了一些数据和照片扔手机。 之后它将所有这些东西插入到一个对象中,然后将这个对象发送到服务器。 在将此对象发送到服务器之前,我想向用户显示数据的大小以及将此数据
我是一名优秀的程序员,十分优秀!