皮皮学,免费搜题
登录
logo - 刷刷题
搜题
【简答题】
某计算机的主存地址空间大小为256MB, 按字节编址。指令cache和数据cache分离,均有8个cache行,每个cache行大小为64B, 数据cache采用直接映射方式。现有两个功能相同的程序1和程序2, 其伪代码如下所示: 程序1: int a[256][256]: ...... int sum_array1() { int i,j, sum=0; for (i=0;i<256;i++) for (j=0;j<256;j++ 程序2: int a[256][256]; ...... int sum_array2() { int i, j, sum=0; for (j=0;j<256;j++) for(i=0;i<256;i++) 假定int类型数据用32位补码表示, 程序编译是, i, j, sum 均分配在寄存器中, 数据a按行优先方式存放,其首地址为320(十进制数)。请回答问题, 要求说明理由或给出计算过程。 (1)若不考虑用于cache一致性维护和替换算法的控制位, 则数据cahce的总容量为多少? (2)数据元素a[0][31]和a[1][1]各自所在的主存块对应的cache行号分别是多少(cache行号从0开始)? (3)程序A和B的数据访问命中率各是多少?那个程序的执行时间更短? (本题选做)
手机使用
分享
复制链接
新浪微博
分享QQ
微信扫一扫
微信内点击右上角“…”即可分享
反馈
参考答案:
举一反三
【单选题】TES节点不包括()
A.
通信卫星
B.
TES远端站
C.
TES网关站
D.
TES网关控站
【单选题】Vous êtes ______, Mesdames ?
A.
prêt
B.
prête
C.
prêts
D.
prêtes
【多选题】下列关于职业道德基本原则独立性的相关说法中,不恰当的有( )
A.
注册会计师独立于被审计单位,这种独立性指实质上的独立
B.
注册会计师在执行审阅业务时,可以不遵守独立性
C.
独立性能够增强注册会计师保持客观公正的能力
D.
保持独立性能够增强注册会计师保持职业怀疑的能力
【单选题】有以下程序,在横线应添加( )。 #include<iostream> using namespace std class TestClass { public: TestClass(int n){number=n} ______∥拷贝构造函数 ~TestClass(){} private: int number }: TestClass fun(TestClass P) { TestClass ...
A.
TestClass(TestClass &other){number=other.number}
B.
TestClass(TestClass other){number=other.number}
C.
TestClass(TestClass &other){number)
D.
TestClass(&other){number=other.number}
【多选题】下列关于职业道德基本原则独立性的相关说法中,不恰当的有:
A.
注册会计师独立于被审计单位,这种独立性指实质上的独立
B.
注册会计师在执行审阅业务时,可以不遵循独立性
C.
独立性能够增强注册会计师保持客观公正的能力
D.
保持独立性能够增强注册会计师保持职业怀疑的能力
【单选题】听力原文:M: Jane missed the class again,didn't she?I wonder why? W: Well,I knew she had been absent all week. So I called her this morning to see if she was sick. It turned out that her husband was badly ...
A.
She was absent all week owing to sickness.
B.
She was seriously injured in a car accident.
C.
She called to say that her husband had been hospitalized.
D.
She had to be away from school to attend to her husband.
【简答题】Write a summary based on the following passage: When he stopped at a village, the motorist was told that a queen bee must be hidden in his car as there were thousands of bees nearby. On learning this,...
【单选题】有如下程序: #include <iostream> using namespace std; class Test { public: Test() {n+=2;} ~Test() {n-=3;} static int getNum(){retum n;} private: static int n; }; int Test:: n=1; int main() { Test*p=new Test...
A.
n=0
B.
n=1
C.
n=2
D.
n=3
【单选题】有如下程序: #include<iostream> using namespace std; class TestClass { private; char c; public; TestClass (char n):c(n){} ~TestClass () { cout<<c; } }; class TestClass1:public TestClass { Private: char c; p...
A.
xy
B.
yx
C.
x
D.
y
【单选题】The truth, Sir, is that the old man____ across the street when my car hit him.
A.
was to walk
B.
had been walking
C.
walked
D.
was walking
相关题目:
参考解析:
知识点:
题目纠错 0
发布
创建自己的小题库 - 刷刷题