Title: Homework
1Homework 3, Exercise 1 Internet Domain
Datagram and Stream Socket Comparison
A.) Zeppos internal system process times are
twice as long, but the total process time is
shorter. Wetterhorns processing time is
shorter, but on average takes longer to send all
the messages. B.) The system process speeds for
both systems (Zeppo and Wetterhorn) are
consistent from one run to the next, but the
total process times fluctuate. This can possibly
be accounted for by time sharing of the Zeppo and
Wetterhorn systems with other users. C.) The
results are not identical from run to run on the
same machine, but does show a level of
consistency for internal processes. Those
external factors (number of users of the system,
sharing bandwidth, etc) will vary the total
processing times between runs. Comparing the
times between different systems (Zeppo to
Wetterhorn) shows differences in internal process
time, attributable to how the individual systems
process the programs/information.
2Homework 3, Exercise 2 Multiple Senders of
Internet Domain Stream Messages
Running the ist2 program allowed for only one
process to run and complete before the other
process was allowed to run.
zeppo ist2r before getsockname socket has port
0 socket has port 43825 elvis.uccs.edu
ist2s zeppo 43825 msg for receiver("" to
exit)dns_query elvis wetterhorn.uccs
.edu ist2s zeppo 43825 msg for receiver(""
to exit)dns_query wetterhorn rcvd
msg--dns_query elvis What is your reply ("" to
break connection)?128.198.1.117 reply
msg128.198.1.117 msg for receiver("" to
exit)dns_query chris rcvd msg--dns_query
chris What is your reply ("" to break
connection)?128.198.162.68 reply
msg128.198.162.68 Ending connection rcvd
msg--dns_query wetterhorn What is your reply
("" to break connection)?128.198.1.247A
reply msg128.198.1.247A msg for receiver(""
to exit)
3Homework 3, Exercise 2 Multiple Senders of
Internet Domain Stream Messages With Forking
Running the ist2 program with forking allowed
for Zeppo to respond to two separate processes,
one at a time, but interchanged between the two.
The first process (Elvis) did not have to end
before the second (Wetterhorn) began.
zeppo ist2r -f turn on fork processing
mode. before getsockname socket has port
0 socket has port 43829 elvis.uccs.edu
ist2s zeppo 43829 msg for receiver("" to
exit)dns_query elvis rcvd msg--dns_query
elvis What is your reply ("" to break
connection)?128.198.1.117 wetterhorn.uccs.edu
ist2s zeppo 43829 msg for receiver("" to
exit)dns_query wetterhorn reply
msg128.198.1.117 msg for receiver("" to
exit)who is first rcvd msg--dns_query
wetterhorn What is your reply ("" to break
connection)? rcvd msg--who is first What is your
reply ("" to break connection)?128.198.162.64
What is your reply ("" to break
connection)?elvis is first reply
msg128.198.162.64 reply msgelvis is
first msg for receiver("" to exit)Am I
second? rcvd msg--Am I second? What is your
reply ("" to break connection)? Wetterhorn is
second reply msgWetterhorn is second Ending
connection Ending connection
4Homework 3, Exercise 2 Multiple Senders of
Internet Domain Datagram Messages
In two runs, I started the Elvis process before
the Wetterhorn process. In both cases,
Wetterhorn finished first with a faster
processing speed between the LinuxPC and the
SunSPARC. The processing speed between the
Digital/Compaq PC and SunSPARC were noticeably
slower.
zeppo idgr socket has port 57080 elvis.uccs.edu
time idgs -n 100000 zeppo 57080 socket has port
4020 2.803u 20.887s 140.80 23.4 01k 03io
0pf0w wetterhorn.uccs.edu time idgs -n 100000
zeppo 57080 socket has port 32842 0.840u 2.820s
023.49 15.5 00k 00io 142pf0w zeppo
idgr socket has port 57090 elvis.uccs.edu time
idgs -n 100000 zeppo 57090 socket has port
4028 2.928u 19.307s 140.40 22.1 01k 13io
0pf0w wetterhorn.uccs.edu time idgs -n 100000
zeppo 57090 socket has port 32842 1.180u 2.940s
023.78 17.3 00k 00io 142pf0w
5Homework 3, Exercise 3 Byte Ordering
wetterhorn.uccs.edu pens -x 3 zeppo 58413 sender
set to 3 socket has port 32854 sizeof(pen)24 se
nd pen message pen.header.sender
cs522 pen.header.sessionID 1
pen.msg_type 3 pen.size 8
pen.x 3 pen.y 32 zeppo
penr socket has port 58413 sizeof(pen)24 The
no. of bytes received24 receive pen message
pen.header.sender cs522
pen.header.sessionID 16777216
pen.msg_type 3 pen.size 8
pen.x 768 pen.y 8192
Wetterhorn to Zeppo Changing pen.x to 3,
sending from a I386 machine to a SunSPARC, shows
the difference between a Little Endian machine
(Wetterhorn/I386) and a Big Endian machine
(Zeppo/SunSPARC). pen.x is an integer value.
Zeppo interprets the first byte sent by
Wetterhorn as the most significant, whereas
Wetterhorn viewed the first byte as the least
significant. This is why the values are
different between the two machines.
6Homework 3, Exercise 3 Byte Ordering
(Continued)
wetterhorn.uccs.edu pens -s chris -t 10 -y 100
elvis 4902 sender set to chris The msg_type is
set to 10 The y is set to 100 socket has port
32855 sizeof(pen)24 send pen message
pen.header.sender chris
pen.header.sessionID 1 pen.msg_type
10 pen.size 8 pen.x 2
pen.y 100 elvis.uccs.edu penr socket has
port 4902 sizeof(pen)24 The no. of bytes
received24 receive pen message
pen.header.sender chris
pen.header.sessionID 1 pen.msg_type
10 pen.size 8 pen.x 2
pen.y 100
Wetterhorn to Elvis Both Wetterhorn and Elvis
are Little Endian machines. There is no change
in the integer values sent from one machine to
the next. Both machines interpret the last byte
as the most significant.