Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Case Project 1: Integration and Performance You have a PC with a 2 GHz processor, a system bus clocked at 400 MHz, and a 3

Case Project 1: Integration and Performance

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 bus. 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 this interrupt is received, the CPU and OS perform the following actions:

  1. The supervisor is called.
  2. The supervisor calls the modems data ready interrupt handler.
  3. The interrupt handler sends a command to the modem, instructing it to copy its buffer content to main memory.
  4. The modem interrupt handler immediately returns control to the supervisor, without waiting for the copy operation to be complete
  5. The supervisor returns control to the process that was originally interrupted.

When the modem finishes the data transfer, it sends a transfer completed interrupt to the CPU and resumes accepting data from the network. In response to the interrupt, the CPU and OS perform the following actions:

  1. The supervisor is called.
  2. The supervisor calls the transfer completed interrupt handler.
  3. The interrupt handler determines whether a complete packet is present in memory. If so, it copies the packet to a memory region of the corresponding application program.
  4. The modem interrupt handler returns control to the supervisor.
  5. 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 range in size from 64 bytes to 4096 bytes. The transfer complete interrupt handler consumes 30 CPU cycles before returning to the supervisor if it doesnt detect a complete packet in memory. If it does, it consumes 30 CPU cycles plus one cycle for each 8 bytes of the packet.

Question 1: How long does it take 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 (seconds or fractions of seconds)

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

Fill in CPU cycles and times:

[5]CPU cycle time =

[5]Bus cycle time =

Processing steps

Bus or Cycle?

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

Note: This occurs simultaneously as the return to supervisor. Since the time taken is less than the time needed for the return, it doesn't count towards the total time.

Send transfer completed interrupt to CPU

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)

[4]Sum

[5]Total CPU Cycles =

[5]Total Bus Cycles =

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2014 Nancy France September 15 19 2014 Proceedings Part I Lnai 8724

Authors: Toon Calders ,Floriana Esposito ,Eyke Hullermeier ,Rosa Meo

2014th Edition

3662448475, 978-3662448472

More Books

Students also viewed these Databases questions