CS 3750: Operating Systems I

Fall 2019 - Lab 5

Due December 16, 2019

This is an individual assignment. All work must be your own. You should not look at any other student's work (in whole or in part, on paper or on screen), nor allow anyone else to look at yours, during the course of this assignment.

Turn in your answers to these questions to Lab 5 in the CS Homework system. (Plain text or MS Word or PDF only). Typed.

This lab will allow you to explore the basics of thread behavior.

You will need a Python interpreter on the computer you use to complete this lab. Python is installed on the Unix (Mac) machines in the CS Lab.

The .py programs are set up so that they can be run from the command line using either "./x86.py" or "python x86.py", etc.

Lab 5: Part 1

Start by downloading x86.py and accompanying files.

If the .tgz file was not uncompressed and unpacked automatically by your web browser, then use "tar -xvf HW-ThreadsIntro.tgz" at a command prompt to open it.

Read the file "README-race". (It is plain text. You can use "more README-race", or any word processor or web browser, to read the file.)

Answer questions one through four at the end of the Threads Introduction chapter. (Questions 5 - 10 recommended, but not required.)

For each question, write a paragraph or so describing what you did, what you observed, and what you learned from performing the scheduling simulation. (Identify your paragraphs as "Part 1, Question 1:", "Part 1, Question 2", etc.)

Be specific. (i.e., not "I ran three jobs" but an exact report of the three commands you issued to the command line to run the three jobs. And so on.)

Notes:

Lab 5: Part 2

Start by downloading some vector*.c and accompanying files. (Don't forget to read the README file.)

Complete Questions 1-5 at the end of the Common Concurrency Problems chapter.

Lab 5: Part 3

Start by downloading raid.py and accompanying files. (Don't forget to read the README file.)

Complete Questions 1-8 at the end of the Redundant Arrays of Inexpensive Disks (RAIDs) chapter.

Be specific and complete in your answers to the questions asked.


Turn in your answers to Lab 5 in the CS Homework system.


Hint: None of the answers to the questions are based on any particular random seed value. Random seeds are simply numbers that start up a pseudo-random number generator in a repeatable way. (Pseudo-random in that the "random" numbers can be repeated. But the sequence of numbers will "look random" which is all we need for the little simulators.) Different seeds will cause different "random" sequences to be generated. Think of different seeds as causing a different sequence of "dice rolls" -- the program is still rolling dice (metaphorically speaking), so we can study the effects of randomly varying inputs, to get a feel for real life behavior.