All India Computer Science Engineering (CSE) Group

A hard disk is connected to a 50 MHz processor through a DMA controller. Assume that the initial set-up of a DMA transfer takes 1000 clock cycles for the processor, and assume that the handling of the interrupt at DMA completion requires 500 clock cycles for the processor. The hard disk has a transfer rate of 2000 Kbytes/sec and average block transferred is 4 K bytes. What fraction of the processor time is consumed by the disk, if the disk is actively transferring 100% of the time?  
Correct answer is '0.015'. Can you explain this answer?

Machine Experts answered  •  yesterday
2000 KB is transferred in 1 second 
4 KB transfer is (4/2000)∗1000 ms
= 2 ms

Total cycle required for locking and handling of interrupts after DMA transfer control

=(1000+500) clock cycle =1500 clock cycle
Now, 50 Mhz = 50∗106 = 0.02 microsecond
So, (1500∗0.02)=30 microsecond
30μs for initialization and termination and 2ms for data transfer.
The CPU time is consumed only for initialization and termination.
Fraction of CPU time consumed =30μs/(30μs+2ms)
= 0.015

Consider the following arithmetic infix expression Q.
A + (B * C - (D / E ^ F) * G) * H
Transform 'Q' into its equivalent postfix expression.
  • a)
    ABC*DE^F/G*-H*+
  • b)
    ABC*DEF^G*-H*+
  • c)
    ABC*DEF^/G*-H*+
  • d)
     None of the above
Correct answer is option 'C'. Can you explain this answer?

Bhavana Saha answered  •  yesterday
Understanding the Expression
The given infix expression is:
Q.A + (B * C - (D / E ^ F) * G) * H
To convert this infix expression to postfix notation (Reverse Polish Notation), we will use the Shunting Yard algorithm developed by Edsger Dijkstra. This method efficiently handles operator precedence and parentheses.
Operator Precedence
- Parentheses: Highest pr
... more
Gauri Krishnan asked a question

Direction: Read the following paragraph carefully and answer the question given below:
Henry Varnum Poor, editor of American Railroad Journal, drew the important elements of the image of the railroad together in 1851, ―Look at the results of this material progress, the vigor, life, and executive energy that followed in its train, rapidly succeeded by wealth, the refinement and intellectual culture of a high civilization. All this is typified, in a degree, by a locomotive. The combination in its construction of nice art and scientific application of power, its speed surpassing that of our proudest courser, and its immense strength, are all characteristic of our age and tendencies. To us, like the telegraph, it is essential, it constitutes a part of our nature, is a condition of our being what we are.
In the third decade of the nineteenth century, Americans began to define their character in light of the new railroads. They liked the idea that it took special people to foresee and capitalize on the promise of science. Railroad promoters, using the steam engine as a metaphor for what they thought Americans were and what they thought Americans were becoming, frequently discussed parallels between the locomotive and national character, pointing out that both possessed youth, power, speed, single-mindedness, and bright prospects.
Poor was, of course, promoting acceptance of railroads and enticing his readers to open their pocketbooks. But his metaphors had their dark side. A locomotive was quite unlike anything Americans had ever seen. It was large, mysterious and dangerous; many thought that it was a monster waiting to devour the unwary. There was a suspicion that a country founded upon Jeffersonian agrarian principles had bought a ticket and boarded a train pulled by some iron monster into the dark recesses of an unknown future.
To ease such public apprehensions, promoters, poets, editors, and writers alike adopted the notion that locomotives were really only ―iron horses,‖ an early metaphor that lingered because it made steam technology ordinary and understandable. Iron horse metaphors assuaged fears about inherent defects in the national character, prompting images of a more secure future, and made an alien technology less frightening, and even comforting and congenial.
Essayist Ralph Waldo Emerson saw the locomotive as an agent of domestic harmony. He observed that ―the locomotive and the steamboat, like enormous shuttles, shoot every day across the thousand various threads of national descent and employment and bind them fast in one web,"adding ―an hourly assimilation goes forward, and there is no danger that local peculiarities and hostilities should be preserved. To us Americans, it seems to have fallen as a political aid. We could not else have held the vast North America together, which we now engage to do."
Suppose that an early nineteenth-century American inventor had developed a device that made it easier to construct multi-story building. How would early nineteenth-century Americans be expected to react to this invention?  
... more

Fetching relevant content for you