Starting from:

$29.99

CS553 Homework #1-Linux & Computer Systems Solution


1 Your Assignment
This project aims to teach you the basics of Linux and Virtual Machines, as well as some basic Q&A about computer systems. Any programming you do in this assignment will be limited to BASH scripting and/or Python. You can use any computer for this part of the assignment (e.g. your laptop running any OS).
Here is your assignment. Collect evidence of your work through screen shots and log files. You will write a report at the end that outlines what you have done to complete this assignment.
1. (21 points) Setup VM, Linux, and basic testing – must take screen shots at each step to receive points
a. Read Oracle VirtualBox White Paper
b. Download Oracle VirtualBox 6.1.2
c. Install VirtualBox
d. Download Ubuntu Desktop 18.04.3 LTS Linux ISO image
e. Create Virtual Machine (VM), to support Linux, Ubuntu, 64-bit, 4GB RAM, Virtual Disk 25GB, VDI image, dynamically allocated, 2-core, and a network interface (1GbE or WiFi) with NAT support
f. Install Linux from the ISO image
g. Create a user id and password
h. Turn on Firewall and block all ports
i. Enable SSH access to your new Linux installation; open SSH port in firewall
j. Repeat steps 5 through 9, and create another VM with the same specifications as the first one
k. Create private/public keys and install them properly in both of your new VMs
l. Test that you can connect remotely to your VMs with your keys, from one VM to the other VM
2. (13 points) Show an example of using the following commands (hint: you can use man to find more information about each one); take screen shots of your commands; make sure to clear the screen between each command; explain in your own words what these commands do:
a. sshn. watchaa. chmodnn. mount
b. ssh-keygeno. psbb. chownoo. passwd
c. scpp. topcc. useraddpp. uname
d. historyq. htopdd. manqq. whereis
e. sudor. gccee. locaterr. whatis
f. ips. tailff. findss. su
g. ddt. grepgg. sedtt. ping
h. fdisku. killhh. awkuu. traceroute
j. viw. dujj. sortww. time
k. timex. dfkk. exportxx. wget
l. tary. screenll. pwdyy. wc
m. catz. vimmm. crontabzz. pwgen
3. (21 points) Write bash scripts to do the following:
a. Write a script called “generate-dataset.sh <filename> <num_records>” with two command line arguments specifying the file name to output and the number of records, where each record is separated by new line character, and each has the following format: <integer> <integer> <ASCII_string>. The integer should be any random number up to a 32-bit integer. The ASCII_string should be any string using ASCII of exactly 100 bytes long. Use the “time” command to show how long the benchmark took to complete. The benchmark should run for at least 10 seconds, and it should complete even if the ssh (or bash) session is terminated. How many records does your file contain after running it? You must write this script entirely with existing Linux commands (which you can install if they don’t exist on your system), without using any other programming languages like C, C++, Java, or Python.
b. Write a script called “sort-data.sh” that takes input a file from part (a) above and sorts the file based on the first column data (make sure to only sort based on the first column data, and not on the entire line of data; also make sure you are treating the data in column 1 as numbers and not text). Use the “time” command to show how long the sort script took to complete.
c. Use the script in part (a) and generate 3 data files with different number of records (1000, 100000, 10000000); measure time taken to generate these records. Sort the data with your script from part (b) and measure the time. Write a Python matplotlib script to generate a graph for the time taken to generate the data and the time taken to sort the data at the 3 different scales. The graph should automatically adjust to the number of entries, and the scale of the data.
4. (15 points) Answer the following questions about VMs:
a. In the system configuration of the VM, explain how changing the number of processors changes the behavior of your VM. Explain a scenario where you want to set this to the minimum, and a scenario where you want to set it to the maximum. Why is setting it to the maximum potentially a bad idea?
b. In the system configuration of the VM, under the Acceleration Tab, explain the difference between the paravirtualization options: None, Legacy, Minimal, Hyper-V, and KVM. Explain which one would be best to use with Ubuntu Linux, and why.
e. For the USB configuration of the VM, explain the difference between USB 1.1, 2.0, and 3.0 controllers.
5. (20 points) Answer the following questions about computer processors:
a. Describe what a core and hardware thread is on a modern processor, and the difference between them?
b. How many cores do the fastest processors from each manufacturer have? Give an example (specific model, specs, and price).
(a) Intel CPU (x86)
(b) AMD CPU (x86)
(c) IBM CPU (Power9)
(d) ThunderX CPU (ARM)
(e) NVIDIA GPU
c. Why do we not have processors running at 1THz today (as might have been predicted in the year 2000)?
d. Describe Moore’s Law. Is it going to go on forever? If not, when will it end? Justify your answer to why it will end and when.
6. (10 points) Answer the following questions about threading:
a. Why is threading useful on a single-core processor?
b. Do more threads always mean better performance?
c. Is super-linear speedup possible? Explain why or why not.
d. Why are locks needed in a multi-threaded program?
e. Would it make sense to limit the number of threads in a server process?
2 Where you will submit
3 What you will submit
When you have finished implementing the complete assignment as described above, you should submit your solution to your private git repository. Each program must work correctly and be detailed in-line documented. You should hand in:
1. Source code: All of the source code, including proper documentation and formatting.
2. Readme: A detailed manual describing the structure of your files and directory organization. The manual should be able to instruct users how to run the program step by step. The manual should contain example commands. This should be included as readme.txt in the source code folder.
3. Report: A written document (typed, named hw1-report.pdf) describing the overall assignment completion, along with screen shots and text answering the key questions. Make sure to label answers with the appropriate question number from the homework writeup.
Submit code/report through GIT.
Grades for late programs will be lowered 10% per day late.

More products