问题 单项选择题

在一个单CPU的计算机系统中,采用可剥夺式优先级的进程调度方案,所有任务可以并行使用I/O设备。下表列出了三个任务T1、T2、T3的优先级、独立运行时占用CPU和I/O设备的时间。如果操作系统的开销忽略不计,这三个任务从同时启动到全部结束的总时间为 (4) ms,CPU的空闲时间共有 (5) ms

三个任务的情况


任 务 优先级 每个任务独立运行时所需的时间
T1 对每个任务:占用CPU 5ms、I/O 8ms,再占用CPU 2ms
T2
T3

A.3
B.4
C.5
D.6

答案

参考答案:D

解析: 根据上表,画出系统时空图,如图所示。
从图中可以看出,这三个任务从同时启动到全部结束的总时间为27ms,其中CPU空闲时间为6ms。

完形填空

Most people want to be happy, but few know how to find happiness. Money and success alone do not bring   33 .Happiness depends on   34 .In other words, we make our own happiness. Here are a few   35  to help you happier.

The first secret of happiness is to enjoy the simple things in life. Too often, we   36  so much time thinking about future—for example, getting into college or getting a good job—that, we fail to enjoy the present(现在).You should enjoy life’s simple   37 ,such as reading a good book, listening to your favorite music, or spending time with close friends. People who have several   38  friends live happier and healthier lives.

Another secret to lead a happy life is to be active and have   39 .When you are dancing or playing sports, you can forget about your problems, and   40  think about the activity.

Finally, many people find happiness in helping   41 .If you want to feel happier, do   42  nice for someone. You can help a friend with his or her lessons, go shopping to buy food for your family members, or simply help out around the house by washing the dishes.

小题1:A.happiness            B. goodness            C. health

小题2:A.them                 B. yourself             C. ourselves

小题3:A.problems             B. suggestions          C. advice

小题4:A.take                 B. cost                 C. spend

小题5:A.pleasures            B. pleasant             C. interest

小题6:A.closely              B. close                C. better

小题7:A.friends              B. money                C. hobbies

小题8:A.sometimes            B. only                 C. seldom

小题9:A.others               B. himself              C. parents

小题10:A.anything             B. nothing              C. something

填空题