SSD6 Multiple-Choice Quiz 4

简介: 【ssd6 quiz 4 做了6次 】                     1.To quickly allocate and free many variables of a commonly used data type, we could   (a) minimize the size of the data type.

【ssd6 quiz 4 做了6次 】

 

     

      

        

 

1.To quickly allocate and free many variables of a commonly used data type, we could  
 (a) minimize the size of the data type.
 (b) coalesce blocks when they are freed.
 (c) use sizes which are powers of two.
 (d) keep a linked list of free objects of that type's size.

Correct answer is  (d)
 
2."CPU time" measures  
 (a) the percentage utilization of the CPU by the system.
 (b) the time spent executing system functions.
 (c) the time spent by a program executing program instructions.
 (d) wall time

Correct answer is  (c)
 
3.Which of the following are useful for observing program performance?
I. Direct measurement with a stopwatch.
II. Statistical Sampling.
III. System Monitors
 
 (a) I, II, and III
 (b) I and III only
 (c) I and II only
 (d) II and III only

Correct answer is  (a)
 
4.Amdahl's law, applied to program optimization, says that  
 (a) algorithmic design is more important than code quality for performance
 (b) program measurement is a prerequisite to optimization
 (c) each optimization about doubles a program's performance
 (d) successive program optimizations tend to produce diminishing returns
Correct answer is  (d)
 

2."Wall time" measures  
 (a) the total duration of a program's execution.
 (b) idle time.
 (c) the user time plus the system time.
 (d) the time a program spends waiting for input and output.

Correct answer is  (a)
 
3.Which of the following are advantages of using statistical sampling to profile programs?
I. Exact run times of all functions can be determined.
II. Code can be instrumented automatically.
III. The performance impact due to measurement can be minimal.
 
 (a) I and III only
 (b) II and III only
 (c) I and II only
 (d) I, II, and III

Correct answer is  (b)
 

4.Which of the following is likely to offer the best performance improvement for programs that spend 50% of their time comparing strings?  
 (a) Be sure to use hardware string-comparison instructions.
 (b) Call a library function for string comparison.
 (c) Store strings uniquely so that pointer comparison can be used.
 (d) Write in-line code for string comparison to eliminate a procedure call.
Correct answer is  (c)

 

1.A memory pool is a large block of memory from which small objects are allocated piecemeal by breaking them off from the pool as required. Under which of the following conditions would such a scheme result in greatly improved performance?
I. All objects allocated from the pool are freed at around the same time.
II. All objects allocated from the pool are of similar sizes.
III. A garbage collector takes care of freeing memory.
 
 (a) II only.
 (b) I only.
 (c) I and II only.
 (d) III only.

Correct answer is  (b)

目录
相关文章
|
机器学习/深度学习 人工智能 编解码
AI视频生成也能自动补全!Wan2.1 FLF2V:阿里通义开源14B视频生成模型,用首尾两帧生成过渡动画
万相首尾帧模型是阿里通义开源的14B参数规模视频生成模型,基于DiT架构和高效视频压缩VAE,能够根据首尾帧图像自动生成5秒720p高清视频,支持多种风格变换和细节复刻。
3853 9
AI视频生成也能自动补全!Wan2.1 FLF2V:阿里通义开源14B视频生成模型,用首尾两帧生成过渡动画
SQL进阶之疯狂的子查询
今天我们不谈子查询的执行效率,只谈子查询功能。对于SQL语句来说,编程开发人员应该都不会陌生,其实各种复杂的逻辑最终落地也就是那么几个基本的招式,增删改查,然而我们经常听到武功招式中又各种连招,那就是了,子查询就是这么个意思。很多SQL简单查询完成不了的查询,子查询都可以很疯狂地完成。当然有的需要一个子查询就够了,有的甚至可能需要嵌套多个子查询来完成。
578 0
SQL进阶之疯狂的子查询
|
网络协议 算法 数据格式
【TCP/IP】UDP协议数据格式和报文格式
【TCP/IP】UDP协议数据格式和报文格式
2514 3
|
5G 定位技术
带你读《5G大规模天线增强技术》——2.4.9 基于地图的混合信道模型(2)
带你读《5G大规模天线增强技术》——2.4.9 基于地图的混合信道模型(2)
带你读《5G大规模天线增强技术》——2.4.9 基于地图的混合信道模型(2)
|
工业大脑
|
9天前
|
JavaScript API iOS开发
DeepSeek Harness下载、安装、配置一篇搞定(2026整理,送常用插件)
DeepSeek Harness(DSH)是DeepSeek于2026年开源的MIT协议AI Agent框架,支持插件化组装模型、工具、沙箱与UI,兼容主流大模型。本文提供免Node.js的桌面端安装包(Win/macOS),含详细图文教程及热门插件推荐。
3882 39
|
9天前
|
Linux 开发工具 iOS开发
Codex保姆级教程(下载+安装+登录+使用,含所有版本,2026最新)
Codex是OpenAI推出的开源AI编程智能体,本地运行,可理解整个代码库,支持自然语言指令改代码、执行命令、跑测试、修Bug,兼容Win/macOS/Linux。(239字)
3540 13
|
4天前
|
云安全 人工智能 安全