Baker College of Port Huron (Ontario) -CS 231 -The modem interrupt handler immediately

Question # 00273364 Posted By: kimwood Updated on: 05/05/2016 01:05 PM Due on: 06/04/2016
Subject Computer Science Topic General Computer Science Tutorials:
Question
Dot Image

1. You have a PC with a 2 GHz processor, a system bus clocked at 400 MHz, and a 3 Mbps internal cable modem attached to the system buz. No parity or other error-checking mechanisms are used. The modem has a 64-byte buffer. After it receives 64 bytes, it stops accepting data from the network and sends a "data ready" interrupt to the CPU. When the interrupt is received, the CPU and OS perform the following actions:

a. The supervisor is called
b. The supervisor calls the modem's "data ready" interrupt handler.
c. The interrupt handler sends a command to the modem, instructing it to copy its buffer content to main memory,
d. The modem interrupt handler immediately returns control to the supervisor
e. The supervisor returns control to the process that was originally interrupted

Sending an interrupt requires one bus cycle. A push or pop operation consumes 30 CPU cycles. Incrementing the stack pointer and executing an unconditional BRANCH instruction require one CPU cycle each. The supervisor consumes eight CPU cycles searching the interrupt table before calling an interrupt handler. The "data ready" interrupt handler consumes 50 CPU cycles before returning to the supervisor.


Incoming packets are 64 bytes. The "transfer complete" interrupt consumes 30 CPU cycles before returning to the supervisor if it doesn't detect a complete packet in memory. If it does, it consumes 30 CPU cycles plus one cycle for each 8 bytes of the packet.


Use the following table to determine how long it takes to move a 64-byte packet from its arrival at the modem until its receipt in the memory area of the target application program or service? State your answer in elapsed time (nanoseconds).

Facts For Problem 1

Device

Clock rate (MHz)

Cycle time (ns)

Width (bytes)

Speed (bytes/sec)

Bus

400

2.5

8

CPU

2000

0.5

8

Modem buffer

64

Modem speed

375000

Operation

CPU Cycles

Push

30

Pop

30

Increment stack pointer

1

Branch

1

Supervisor lookup

8

Data ready interrupt handler

50

Transfer complete interrupt handler

30

Interrupt handler memory copy (8 bytes)

1

Now fill in CPU cycles and times

Processing steps

Cycles

Time (ns)

Send data ready interrupt to CPU

1

2.5

Call supervisor (PUSH+INCR+BRANCH)

Execute supervisor table lookup

Call interrupt handler (PUSH+INCR+BRANCH)

Execute data ready interrupt handler

Return to supervisor (POP)

Return to suspended program (POP)

Transfer buffer content (64 bytes) across bus Comment: This time is in parallel to the two returns to supervisor. In this case it is less and doesn't count.

(8)

(20)

Send transfer completed interrupt to CPU

1

2.5

Call supervisor (PUSH+INCR+BRANCH)

Execute supervisor lookup

Call interrupt handler (PUSH+INCR+BRANCH)

Execute transfer complete interrupt handler

Interrupt handler memory copy (64 bytes)

Return to supervisor (POP)

Return to suspended program (POP)

Sum

(leave blank)

Dot Image
Tutorials for this Question
  1. Tutorial # 00268607 Posted By: kimwood Posted on: 05/05/2016 01:05 PM
    Puchased By: 3
    Tutorial Preview
    interrupt handler.c. The interrupt handler sends a command to ...
    Attachments
    aq.pdf (185.82 KB)
    Recent Feedback
    Rated By Feedback Comments Rated On
    at...l93 Rating Provide reliable and excellent services 03/20/2017

Great! We have found the solution of this question!

Whatsapp Lisa