问题 单项选择题

下面关于死锁的说法中错误的是( )。

A.释放锁时要按加锁的反序释放

B.多线程同时访问相同数据时可能造成死锁

C.死锁完全由程序进行控制

D.Java中具有检测与避免死锁的专门机制,可以防止死锁

答案

参考答案:D

解析: Java中没有提供检测与避免死锁的专门机制,但应用程序员可以采用某些策略防止死锁的发生。

多项选择题
阅读理解

阅读理解。

     “Life is speeding up. Everyone is getting unwell.”

      This may sound like something someone would say today. But in fact, an unknown citizen who lived

in Rome in AD 52 wrote it.

     We all love new inventions. They are exciting, amazing and can even change our lives.

     But have all these developments really improve the quality of our lives?

     Picture this: You’re rushing to finish your homework on the computer. Your mobile phone rings, a

QQ message from your friend appears on the screen, the noise from the television is getting louder and

louder. Suddenly the computer goes blank and you lose all your work. Now you have to stay up all

night to get it done. How calm and happy do you feel?

     Inventions have speeded up our lives so much that they often leave us feeling stressed and tired.

Why do you think people who live far away from noisy cities, who have no telephones, no cars, not

even any electricity often seem to be happier? Perhaps because they lead simpler lives.

     One family in the UK went “back in time” to see what life was like without all the inventions we have

today. The grandparents, with their daughter, and grandsons Benjamin, 10, and Tomas, 7, spent nine

weeks in a 1940s house. They had no washing machine, microwave, computer or mobile phones.

     The grandmother, Lyn, said, “It was hard physically, but not mentally.” She believed life was less

materialistic. “The more things you have, the more difficult life becomes,” She said. The boys said they

fought less to fight over, such as their computer. Benjamin also noticed that his grandmother had

changed from being a “fashionable, beer-drinking granny, to one who cooked things.”

     Here are some simple ways to beat the stress often caused by our inventions!

     Don’t be available all the time. Turn off your mobile phone at certain times of the day. Don’t check

your e-mail every day.

     Don’t reply to somebody as soon as they leave a text message just because you can. It may be fun

at first, but it soon gets annoying.

1.The passage is mainly about        .

A.problems with technology    

B.improvements of our life with technology

C.the important roles technology plays in our everyday life

D.major changes which will be likely to happen to technology

2.The writer quoted what a citizen in ancient Rome said at the beginning of the story in order to        .

A.share a truth about life      

B.tell us what life was like long time ago

C.make us wonder what causes such a thing to happen

D.point out that you experience some big problems and they may be

      the same

3.The family chose to spend some time in a 1940’s house because        .

A.they liked to live simple lives

B.they were curious about how people lived without modern inventions

C.they were troubled by modern inventions

D.living in a different time would be a lot of fun for them

4.What does the word “available” in the suggestion offered by the writer mean?

A.Busy on line

B.Free

C.Be able to

D.Be found by others.