Question
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
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) |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started