问题 问答题

某程序在逻辑地址100处有一条指令LOAD 1,500,而500单元内存放数据51888。假设程序被分配到内存起始地址为5000的单元时,采用下述各种方式下的该指令与其物理地址及相应的地址变换过程。
(1)静态重定位。
(2)采用重定位寄存器实现动态重定位。
(3)采用页表方式,页面大小为100B,其各页存放到50,51,52,…,59物理块上。

答案

参考答案:(1)采用静态重定位时,所有逻辑到物理地址的转换在程序装入时完成。由于程序被分配到内存起始地址为5000的单元,该条指令所处单元将为5000+100=5100。而数据所处的500逻辑单元所处的物理地址为5000+500=5500,即指令将变为:LOAD 15500。
(2)采用重定位寄存器实现动态重定位时,地址转换在需要访问时动态完成。由于程序被分配到内存起始地址为5000的单元,重定位寄存器的取值为5000。该条指令所处的地址仍然为100。在访问地址100时,系统将在其上加上5000,获得物理地址5100。由于是动态重定位,指令在装入内存时维持不变。在实际执行该指令时,将在地址500处寻找数据。此时系统将对该地址进行动态翻译,加上5000,获得物理地址为5000+500=5500。
(3)采用页式方式时,由于页面大小为100B,逻辑地址100将处于第1个页面(从0号页面开始计数),地址500处于第5个页面。其页内偏差(页内地址)均为0。根据题意,这两个页面分别处于物理块51和55上。因此,其物理地址分别为51×100+0=5100和55×100+0=5500。

选择题
问答题

It is 15 years since Moises Naim coined the memoraible phrase "corruption eruption". But there is no sign of the eruption dying down. Indeed, there is so much molten lava and sulphurous ash around that some of the world’s biggest companies have been covered in it. Siemens and Daimler have recently been forced to pay gargantuan fines. BHP Billiton has admitted that it may have been involved in bribery. America’s Department of Justice is investigating some 150 companies, targeting oil and drugs firms in particular.
The ethical case against corruption is too obvious to need spelling out. But many companies still believe that, in this respect at least, there is a regrettable tension between the dictates of ethics and the logic of business. Bribery is the price that you must pay to enter some of the world’s most difficult markets (the "when in Rome" argument). Bribery can also speed up the otherwise glacial pace of bureaucracy (the "efficient grease" hypothesis). And why not The chances of being caught are small while the rewards can be big and immediate.
But do you really have to behave like a Roman to thrive in Rome Philip Nichols, of the Wharton School, points out that plenty of Western firms have prospered in emerging markets without getting their hands dirty, including Reebok, Google and Novo Nor disk. IKEA has gone to great lengths to fight corruption in Russia. What is more, Mr Nichols argues, it is misguided to dismiss entire countries as corrupt. Even the greasiest-palmed places are in fact ambivalent about corruption: they invariably have laws against it and frequently produce politicians who campaign against it. Multinationals should help bolster the rules of the game rather than pandering to the most unscrupulous players.
And is "grease" really all that efficient In a paper published by the World Bank, the authors subjected the "efficient grease" hypothesis to careful scrutiny. They found that companies that pay bribes actually end up spending more time negotiating with bureaucrats. The prospect of a pay-off gives officials an incentive to haggle over regulations. The paper also found that borrowing is more expensive for corrupt companies.
The hidden costs of corruption are almost always much higher than companies imagine. Corruption inevitably begets ever more corruption. Corruption also exacts a high psychological cost on those who engage in it. Mr Nichols says that corrupt business people habitually compare their habit to having an affair: no sooner have you given in to temptation than you are trapped in a world of secrecy and guilt. On the other hand, the benefits of rectitude can be striking. Oil giant Texaco had such an incorruptible reputation that African border guards were said to wave its jeeps through without engaging in the ritual shakedown. Moreover, the likelihood of being caught is dramatically higher than it was a few years ago. The internet has handed much more power to whistle-blowers. Every year Transparency International publishes its Corruption Perceptions Index, and its Global Corruption Barometer.
The likelihood of prosecution is also growing. The Obama administration has revamped the Foreign Corrupt Practices Act (FCPA) and is using it to pursue corporate malefactors the world over. The Department of Justice is pursuing far more cases than it ever has before. Recent legislation has made senior managers personally liable for corruption on their watch. They risk a spell in prison as well as huge fines. The vagueness of the legislation means that the authorities may prosecute for lavish entertainment as well as more blatant bribes.
America is no longer a lone ranger. Thirty-eight countries have now signed up to the OECD’s 1997 anti-corruption convention, leading to a spate of cross-border prosecutions. In February Britain’s BAE Systems, a giant arms company, was fined $ 400m as a result of a joint British and American investigation. Since then a more ferocious Bribery Act has come into force in Britain. On April 1st Daimler was fined $185m as a result of a joint American and German investigation which examined the firm’s behaviour in 22 countries.
Companies caught between these two mighty forces--the corruption and anti-corruption eruptions--need to start taking the problem seriously. A Transparency International study of 500 prominent firms revealed that the average company only scored 17 out of a possible 50 points on "anti-corruption practices. " Companies need to develop explicit codes of conduct on corruption, train their staff to handle demands for pay-offs and back them up when they refuse them. Clubbing together and campaigning for reform can also help.
This may all sound a bit airy-fairy given that so many companies are struggling just to survive the recession. But there is nothing airy-fairy about the $16 billion in fines that Siemens has paid to the American and German governments. And there is nothing airy-fairy about a spell in prison. The phrase "doing well by doing good" is one of the most irritating parts of the CSR mantra. But when it comes to corruption, it might just fit the bill.

1.Explain the sentence "Indeed, there is so much molten lava and sulphurous ash around that some of the world’s biggest companies have been covered in it. "(para. 1)