Metropolitan State University
Minneapolis/St. Paul, Minnesota
CFS 264 Computer and Operating Systems Fundamentals II
Fall 2024
Homework 8
Due: by 11:59pm, Wednesday, Nov. 6th, 2024
This assignment will be worth 20 points.
Part I (10 points)
On your textbook: Modern Operating Systems,
Problem 1:
Suppose that the wire between switch 2D and switch 3C in the omega network of Fig. 8-5
(page 534 of the textbook or Slide 6) breaks. Who is cut off from whom?
CPUs 001, 011, 101, and 111 are cut off from memories 010 and 101.
Problem 2:
What is the IP protocol and what is the TCP protocol? What is the difference between the IP
and TCP protocols? “IP (Internet Protocol) is a datagram protocol in which a sender injects
a datagram of up to 64 KB into the network and hopes that it arrives.” Pg.587
“TCP (Transmission Control Protocol), is usually layered on top of IP. TCP uses IP to
provide connection-oriented streams. To use TCP, a process first establishes a connection to
a remote process.” Pg. 587
Your answers must be typed and submitted in the PDF format. Other formats of the
submissions are not acceptable.
Part II (10 points)
Problem 1:
Please use myperl5.pl in example 2 discussed in Lab 8 as a template for solving the following
problem;
Please use the command “last -wi > myloginfile” to create a file called myloginfile that
shows all login information on sp-cfcsc01.metrostate.edu, and then write a perl script,
myperlone.pl, to count how many login records occurred for your login ID, “cfs264fa24??;”
where “??” refers to your id. Please display the total number along with all your login records;
Please use the method demonstrated in "myperl33.pl" in Lab 8 to get your login ID for your
script, "myperlone.pl;"
Test your script to make sure that it works properly and then to verify your result using grep
command;(last -wi | grep “cfs264fa24??” | wc –l)
Cut/paste your script file, myperlone.pl, to a local text document, save it in text (or pdf) format,
and then upload it to D2L along with a screenshot of the execution of your script by the deadline.
Problem 2:
Please use the perl script file “myperladd2.pl” discussed in Lab 8 as a template to complete the
following tasks:
Create a new perl script file, myperlmax4.pl, that will 1) read 4 numbers; 2) determine which
number is the largest number using if-statements, and then 3) display the largest number. You are
NOT allowed to use any perl built-in functions, such as “sort” in your script;
Test your script to make sure it works properly;
Cut/paste your script file, myperlmax4.pl, to a local text document, save it in text (or pdf)
format, and then upload it to D2L along with a screenshot of the execution of your script by the
deadline.