CPU: 1150118

Q1.a.

b.

Given instruction length is 15 bits, 5 bits are reserved for opcode, 4 bits are reserved for addressing mode. This leaves space for 15 – 5 – 4 = 6 bits for direct and absolute addressing. Giving range of 64 memory locations.

c. In base offset mode, the CPU can access +32 to -31 locations relative to address in base register. By changing base address CPU can access entire memory locations by altering the base address to required range

Q2.

StepPCMARMDRIRA
PC -> MAR00101XXXX
 0010100101XXX
 00101001011010101110101011X
 00101010111011100010101011X
 0010100101101110001010101110111000
 0011000101101110001010101110111000
 0011000110101110001010101110111000
 0011000110010011000100110010111000
 0011001100011101000100110010111000
 0011001100011101000100110000101100
 0011101100011101000100110000101100

Q3.

0x70000000 – 0x7FFFFFFFCache – 1MB
0x01C00000 – 0x6FFFFFFFEmpty Space – 483 MB
0x01400000 – 0x01BFFFFFRAM – 8 MB
0x00400000 – 0x013FFFFF Module 1 – 16 MB
0x00000000  – 0x003FFFFFROM  – 4MB

Q4.

As soon as Laser Printer needs CPU for completing its task. It generates Interrupt request that is forwarded to the INT pin on CPU.

CPU on receiving the interrupt request, completes the current instruction and initiates saving of CPU registers like Accumulator, PC and other status/data registers in to memory location specially reserved for the purpose. This memory area is called the Process Control Block or PCB. Each running process has it’s own PCB area.

Once all current register values are saved in a PCB, CPU switches to execute the Interrupt Serrvice Routine or ISR. Inside ISR, it starts checking on status of each connected device. This is called polling method. The device that generated interrupt would show its status to CPU as source of interrupt.

When CPU determines the printer as source, it branches to ISR of printer and starts executing the interrupt routine for serving the request. Once CPU is done serving the Laser printer, it returns to the previous job by reloading the registers from the saved PCB area and continues further execution where it was interrupted earlier.

Q5.

  1. Capacity of each block = 512MB / Number of platters X number of sectors X number of cylinders

= 512 MB / 4 X 20 X 800 = 8KB

Cluster capacity = 4 x 8KB = 32 KB

  • Transfer Rate = RPM x Number of Sectors x Capacity each sector / min

= 5400 x 20 x 8 KB / min

= 108000 * 8 KB KB / 60 sec

= 14400 KB / sec

= 14.4 MB /sec

  • Average Latency time = Period of rotation / 2

           = ( (1 / 5400) x 60 ) / 2 sec

           = 1/180 sec = 5.55msec

Average Access Time = seek time  + Average Latency

= 36msec + 5.55msec

= 41.55msec