问题 问答题

进程之间存在哪几种制约关系各是什么原因引起的
下面活动分别属于哪种制约关系
(1) 若干个同学去图书馆借书。
(2) 两队举行篮球赛。
(3) 流水线生产的各道工序。
(4) 商品生产和社会消费。

答案

参考答案:进程之间存在直接制约关系(即同步问题)和间接制约关系(即互斥问题);同步问题是存在逻辑关系的进程之间相互等待所产生的制约关系,互斥问题是相互逻辑关系的进程竞争使用资源所发生的制约关系。
(1) 属于互斥关系,因为书的个数是有限的,一本书只能借给一个同学。
(2) 属于互斥关系,篮球只有一个,两队都要竞争。
(3) 属于同步关系,各道工序的开始都依赖前道工序的完成。
(4) 属于同步关系,商品没生产出来,消费无法进行,商品未消费完,生产也无须进行。

单项选择题

I was a single parent of four small children, working at a low paid job. Money was always tight, but we had a (1) over our heads, food on the table, clothes on our backs, and if not a lot, always (2) . Not knowing we were poor, my kids just thought I was (3) . I’ve always been glad about that.

It was Christmas time, and although there wasn’t (4) for a lot of gifts, we planned to celebrate with a family party. But the big (5) for the kids was the fun of Christmas (6) .

They planned weeks ahead of time, asking (7) what they wanted for Christmas. Fortunately, I had saved MYM120 for (8) to share by all five of us.

The big (9) arrived. I gave each kid a twenty-dollar bill and (10) them to look for gifts of about four dollars each. Then everyone scattered. We had two hours to shop; then we would (11) back at the "Santa’s Workshop"

Driving home, everyone was in high Christmas spirits, (12) my younger daughter, Ginger, who was unusually (13) She had only one small, flat bag with a few candies—fiftycent candies I was so angry, but I didn’t say anything (14) we got home. I called her into my bedroom and closed the door, (15) to be angry again. This is what she told me.

"I was looking (16) thinking of what to buy, and I (17) to read the little cards on the ’Giving Trees’. One was for a little girl, four years old, and all she (18) for Christmas was a doll. So I took the card off the tree and (19) the doll for her. We have so much and she doesn’t have anything. "

I never felt so (20) as I did that day.

10().

A.shopping 

B.travelling 

C.parties 

D.greetings

单项选择题