COEN177L – COEN 177: Operating Systems (Solution)

$ 24.99
Category:

Description

Lab assignment 7: Minix Scheduling

Objectives
1. To understand Minix scheduler implementation.
2. To modify the Minix scheduler and observe effects.

Guidelines

Reminder – Getting started with Minix on the ECC Systems
For consistency, it is recommended that you run the provided Minix image on the ECC systems. If you have not done so already, follow these instructions to install and run Minix on the ECC Systems.

Start by setting up VMware

$ setup vmware
This command prepares vmware to run. You should only need to run it once, until the next time you log into your machine. To obtain a copy of a Minix system image, you can use “minix-get-image”

$ minix-get-image (can tab complete)

$ vmware &

• Open a Virtual Machine -> “vm images” subfolder -> “minix3” subfolder -> minix3.vmx

When you launch the minix system, you will eventually be promoted for a username. The username for the minix system is “root” (with no password, at least until you set one).

If you have not already, type “passwd” to give the system a password. Make sure it’s a password you’ll easily remember (ask yourself, how secure does this particular system need to be? What would it take for someone to access it?) (Note: If you wipe your minix image, you will need to do this again.)

Type the following command (again within the Minix system): tcpd ftp /usr/bin/in.ftpd &

This will launch the FTP daemon in the Minix system, allowing the local system to connect to it through FTP.

Type “ifconfig” to find out what the IP address for the VM is.

Now get out of the VM (with Ctrl+Alt) and open a terminal on the host machine. In that terminal, type:

ftp <the IP address you got from ifconfig> This will launch FTP.

In case you are unfamiliar with FTP commands:
For Remote Navigation
ls – show contents of remote directory pwd – show current location in VM cd – change directory on the VM

For Local Navigation
lcd – show current location on host machine lcd <directory> – change location to <directory>

File Transfer get <file> – copy <file> from current location in VM to current location on host. put <file> – copy <file> from current location on host to current location in VM.

DO NOT work on files inside of the VM. You should use FTP to transfer files from the VM to the host, work on them there, then transfer them back. This is so that you do not lose all of your progress if you should make a mistake which crashes the VM and corrupts the bootable OS.

The files for which you must search in this lab can be found somewhere beneath the /usr/src directory.

The grep utility can be very helpful for finding which files contain particular strings, and should be very helpful in this lab.

Once you have modified a file and wish to see the effects of your changes, do the following:

Return to the /usr/src directory.

When that finishes, type reboot. This will reboot the VM with your modifications in effect.

If your VM freezes/crashes during/after a reboot and you wish to restart with a fresh image and setup, start with the first instructions above to get a fresh copy (and note that it will overwrite your existing copy).

The Minix Scheduler
The goal of this assignment is to gain experience in modifying an operating system kernel, and specifically the process scheduling algorithm. You are to modify the queue selection algorithm to skew the priority scheduling. Specifically, the current selection is based on a pure priority order, then you are to include a random selection of a lower-level priority job. Note that if you modify the priority queue imprudently, the operating system will cease to function. Your goal is to achieve the following:

You will be graded based on both your implementation of this modification, and on how well you explain the mechanism. It is therefore important to realize that this is both an exercise in coding, as well as an exercise in familiarizing yourself with, and understanding to the point of being able to explain, an unfamiliar code base.

Observing a change

Additional Resources:
– Minix Wiki: https://en.wikipedia.org/wiki/MINIX
– Minix user guide: https://wiki.minix3.org/doku.php?id=usersguide:start
– Minix installation guide: https://wiki.minix3.org/doku.php?id=usersguide:doinginstallation

Requirements to complete the lab
2. Write up a description of your steps, which files you modified, and how you observed a change in the scheduler (hint: the function called to pick the process – or proc – to run next, is named very logically, and the utility grep – as well as the Minix documentation – can be very useful in finding it).

Reviews

There are no reviews yet.

Be the first to review “COEN177L – COEN 177: Operating Systems (Solution)”

Your email address will not be published. Required fields are marked *