Vous êtes sur la page 1sur 5

Computer Organization and Design

Homework:01
1) (2 points) Exercise 1.1 in the Textbook 5th edition

2) (2 points) Exercise 1.3 in the Textbook 5th edition

3) (2 points) Exercise 1.4 in the Textbook 5th edition


4) (2 points) Exercise 1.5 in the Textbook 5th edition

5) (2 points) Exercise 1.6 in the Textbook 5th edition

Note: List all the calculation and formulas used (not just the final answer)

1.2.1

To find the minimum size in bytes of a frame buffer needed to store a frame for a color display
using 8 bits for each of the 3 primary colors per pixel; first you must calculate the size in bytes it
takes to represent a single pixel. To do this, we multiply the amount of bits per primary color (in this
case 8) by the number of primary colors (3) then divide this number by the amount of bits in a byte
(8) thus giving the number of bytes it takes to represent one pixel. As shown in the following
equation:

Number of Bytes per Pixel = (3*8)/8 = 3

Now that we know the size in bytes it takes to represent one pixel we can calculate the size in
bytes that it would take to represent a single frame by multiplying this number of bytes per pixel by
the resolution of the display (pixels per frame). The following chart shows the resulting bytes per
frame of 4 differing size displays:

Bytes per Pixel * Pixels per Frame = Bytes per Frame

Configuration byte/pixel Resolution pixels/frame bytes/frame


A1 3 640×480 307200 921600
A2 3 1280×1024 1310720 3932160
B1 3 1024×768 786432 2359296
B2 3 2560×1600 4096000 12288000
Put simply, the minimum size in bytes of the frame buffer to store a frame in this case and for
the considered configurations would be as follows:

A1: 921600 bytes


A1: 3932160 bytes
B1: 2359296 bytes
B2: 12288000 bytes

1.2.2
To find how many frames the main memory can store, first the amount of memory must be
converted into the same unit of measure as the frame buffer size, and in this case I will convert
Gbytes into bytes (the unit of measure our frame buffer is expressed as in the previous problem). To
do this I will use the binary definition of Gbytes (because we are dealing with memory) 2^30 (or
1073741824) bytes and multiply this by the number of gigabytes for each configuration. Once this
number (the number of bytes the system has for memory) has been determined, dividing it by the
number of bytes per frame will give the number of frame buffers that the memory could store,
assuming the memory contained no other information. The following illustrates this for each
considered configuration:

Memory (bytes) = Memory (Gb) * 1073741824

Frames Memory can hold = Memory (bytes) / bytes per frame

Configuration bytes/frame Memory (Gb) Memory (bytes) Num of Frames Mem can hold
A1 921600 2 2147483648 2330.168889
A2 3932160 4 4294967296 1092.266667
B1 2359296 2 2147483648 910.2222222
B2 12288000 4 4294967296 349.5253333
Put simply, if each configuration’s main memory was dedicated only to a frame buffer then each,
respectively, could store the following number of frames:

A1: 2330.168889 frames


A1: 1092.266667 frames
B1: 910.2222222 frames
B2: 349.5253333 frames

1.2.3
To find how fast 256 Kbytes can travel through an Ethernet connection we must first describe
that Ethernet connection’s speed using a similar unit of measure. For this case we will express the
speed in Mbytes per second. To find this (using the base 10 definitions because we are dealing with
communication) we multiply the link speed in Gbit by the amount of Mbits in a Gbit(1000) and then
divide that number by the number of bits in a byte(8) to give the number the link speed of 125
Mbytes per second:
1 Gbps = 125MBps

Similarly, we can find the speed of a 100Mbit link by dividing the bits by bytes in a bit to give:

100 Mbits/sec = 12.5 Mbytes/sec

Now, 256Kbytes divided by 1000(the base 10 definition of number of Kbytes in a Mbyte) gives us
the number of Mbytes of data we are trying to send over the Ethernet:

256 Kbytes = .256 Mbytes

Dividing the number of Mbytes we now have by the transfer rate we can finally get the answer of
how long it would take to send this 256Kbyte file through:

File Size / Rate = Time to transmit

On a 1 Gbit network it would take: .256/125 = 0.002048 seconds or 2.048 ms

On a 100Mbit network it would take: .256/12.5 = 0.02048 seconds or 20.48 ms

1.2.4
The speed at which a file can be read from DRAM is the sum of the time it takes to be read from
DRAM + the time it takes between the cache and DRAM(2 microseconds) + the time it takes the
cache to read it. To easily calculate this first we must convert the transit time of 2 Microseconds into
nanoseconds (the unit of time the other factors are in).

Transit Time Conversion:

Microseconds * 1000ns = nanoseconds

2*1000ns = 2000ns

Now that we have all values in nanoseconds, simply adding all 3 will give us the total time it
takes to read a file from DRAM.

Total time to read DRAM = DRAM time + Transit Time + Cache Time

Cache ns Trans ns Dram ns Total ns


a 5 2000 50 2055
b 7 2000 50 2057
Simply put, the time to read a file from DRAM for the considered configurations is as follows:

a. 2055ns or 2.055 microseconds

b. 2057ns or 2.057 microseconds


1.2.5
Similarly to problem 1.2.4 the speed at which a file can be read from disk is the sum of the time it
takes to be read from the disk + the time it takes between the cache and the disk(2 microseconds) +
the time it takes the cache to read it. We can use the transit time we found in the 1.2.4 but instead we
must convert the disk time from milliseconds into nanoseconds (the unit of time the other factors are
in).

Disk Time Conversion:

Milliseconds * 1000000ns = nanoseconds

So…

5ms = 5000000ns

20ms = 20000000ns

Now that we have all values in nanoseconds, simply adding all 3 will give us the total time it
takes to read a file from Disk.

Total time to read from Disk = Disk time + Transit Time + Cache Time

Cache ns Trans ns Disk ns Total ns


a 5 2000 5000000 5002005
b 7 2000 20000000 20002007
Simply put, the time to read a file from Disk for the considered configurations is as follows:

a. 5002005ns or 5.002005 ms
b. 20002007ns or 20.002007ms

1.2.6
Similarly to problem 1.2.4 and 1.25 the speed at which a file can be read from flash memory is
the sum of the time it takes to be read from the flash mem + the time it takes between the cache and
the flash mem(2 microseconds) + the time it takes the cache to read it. We can use the transit time
we found in the 1.2.4 but instead we must convert the flash time from microseconds into
nanoseconds (the unit of time the other factors are in).

Flash Time Conversion:

Microseconds * 1000ns = nanoseconds

So…

5 microseconds = 5000ns

15 microseconds = 15000ns
Now that we have all values in nanoseconds, simply adding all 3 will give us the total time it
takes to read a file from Flash Memory.

Total time to read from Flash = Flash time + Transit Time + Cache Time

Cache ns Trans ns Flash ns total ns


a 5 2000 5000 7005
b 7 2000 15000 17007
Simply put, the time to read a file from Flash Memory for the considered configurations is as follows:

a. 7005 ns or 7.005 microseconds


b. 17007 ns or 17.007 microseconds

Vous aimerez peut-être aussi