Today : Sun, 05 Jul 20 .


CS 537 - Operating Systems - Spring 2013


HomePage Discussion Moodle Instructors Schedule Lectures Sections Readings Homeworks

Projects

edit SideBar

Project3-sp13

Page: PmWiki.Project3-sp13 - Last Modified : Wed, 03 Apr 13

PmWiki.Project3-sp13 History

Hide minor edits - Show changes to output

April 03, 2013, at 09:16 PM by 75.42.234.214 -
Added line 4:
* 4/3: modified version of [[http://pages.cs.wisc.edu/~swift/classes/cs537-sp13/wiki/uploads/PmWiki/p3src-v2.zip|p3src.zip]] available that prints disk stats on failure and zeros disk stats on recovery. NOTE: You do not need to download this, and it may cause current tests to fail.
April 03, 2013, at 05:05 PM by 128.105.32.20 -
Added line 4:
* 4/3: update due date to Friday, April 5th at 9 pm
Changed line 14 from:
The project is due at 9 pm on Thursday, April 4th
to:
The project is due at 9 pm on Thursday, April 5th
April 03, 2013, at 05:05 PM by 128.105.32.20 -
Added line 4:
* 4/3: correct RAID 4 and 5 description to refer to "full stripe" instead of "full strip" when discussing calculating parity.
Changed lines 52-53 from:
For writes less than a full strip, you can use additive (read the old blocks and compute new parity) or subtractive (read the old block and old parity) parity. For writes to a full strip, just write out the data and new parity.
to:
For writes less than a full stripe, you can use additive (read the old blocks and compute new parity) or subtractive (read the old block and old parity) parity. For writes to a full stripe, just write out the data and new parity.
Changed line 66 from:
For writes less than a full strip, you can use additive (read the old blocks and compute new parity) or subtractive (read the old block and old parity) parity. For writes to a full strip, just write out the data and new parity.
to:
For writes less than a full stripe, you can use additive (read the old blocks and compute new parity) or subtractive (read the old block and old parity) parity. For writes to a full stripe, just write out the data and new parity.
April 02, 2013, at 02:48 PM by 128.105.32.20 -
Added line 4:
* 4/2: updated [[http://pages.cs.wisc.edu/~swift/classes/cs537-sp13/wiki/uploads/PmWiki/p3src.zip|p3src.zip]] to automatically empty a disk during recovery.
Changed line 108 from:
* Are there memory corruption problems or memory leaks? You may want to run Valgrind.
to:
* Are there memory corruption problems or memory leaks? You may want to run Valgrind.
April 02, 2013, at 12:53 PM by 128.105.32.20 -
Changed lines 59-61 from:
||B4||B4 XOR B5 XOR B6||B5||B6||
||B7||B8||B7 XOR B8 XOR B9||B9||
||B10||B11||B12||B10 XOR B11 XOR B12||
to:
||B3||B3 XOR B4 XOR B5||B4||B5||
||B6||B7||B6 XOR B6 XOR B8||B8||
||B9||B10||B11||B9 XOR B10 XOR B11||
April 01, 2013, at 12:54 PM by 72.33.250.199 -
Added line 4:
* 4/1: clarified FAIL and RECOVER commands.DISK refers to the number of the disk that failed.
April 01, 2013, at 12:52 PM by 72.33.250.199 -
Changed lines 84-85 from:
* FAIL DISK - make a disk fail, so it cannot be read or written any more. No output
* RECOVER DISK - make a disk recover as a clean, empty disk that can be read or written. No output
to:
* FAIL DISK - make disk number DISK fail, so it cannot be read or written any more. No output
* RECOVER DISK - make disk number DISK recover as a clean, empty disk that can be read or written. No output
March 28, 2013, at 02:04 AM by 95.62.152.105 -
Added line 4:
* 3/28: updated p3src.zip to fix typo in stats code in disk.c
March 25, 2013, at 12:49 PM by 95.62.152.105 -
Added line 4:
* 3/25: updated p3src.zip to include code to print stats.
March 23, 2013, at 02:52 AM by 95.62.152.105 -
Added lines 86-87:
For each RAID type, your simulator should try to complete as much of a command as possible: return as much data as possible on a read and write as much data as possible on a write.
Changed line 90 from:
On errors, print '''ERROR''' on the line.
to:
On read errors, replace the value (which may be one of many in a set of blocks) with the word '''ERROR'''. Thus, a read may return a mix of values and an error. On write errors, print '''ERROR''' if any blocks of the write cannot be written.
March 23, 2013, at 02:49 AM by 95.62.152.105 -
Changed lines 5-6 from:
to:
* 3/23: Updated output section to explain error outputs
Changed line 80 from:
* READ LBA SIZE - read starting at block LBA for SIZE blocks. Prints out the first 4 byte value in each block.
to:
* READ LBA SIZE - read starting at block LBA for SIZE blocks. Prints out the first 4 byte value in each block, '''separated by spaces on a single line'''.
Changed lines 87-89 from:
Your simulator should print the command line from the trace and then execute it, then print the desired output. After the END command, your simulator should call @@disk_array_print_stats()@@ to print the statistics for the disks.
to:
Your simulator should print the command line from the trace and then execute it, then print the desired output on the following line. After the END command, your simulator should call @@disk_array_print_stats()@@ to print the statistics for the disks.
On errors, print '''ERROR''' on the line.

March 21, 2013, at 04:03 AM by 95.62.152.105 -
Changed line 86 from:
Your simulator should print the command line from the trace and then execute it, then print the desired output. After the END command, your simulator should call @@disk_print_stats()@@ to print the statistics for the disks.
to:
Your simulator should print the command line from the trace and then execute it, then print the desired output. After the END command, your simulator should call @@disk_array_print_stats()@@ to print the statistics for the disks.
March 21, 2013, at 03:55 AM by 95.62.152.105 -
Changed lines 3-5 from:
to:
!! Notes
*  [[http://pages.cs.wisc.edu/~swift/classes/cs537-sp13/wiki/uploads/PmWiki/p3src.zip|p3src.zip]] updated 3/21 to fix a memory corruption problem.

Deleted line 99:
March 17, 2013, at 06:16 PM by 75.42.234.214 -
Added lines 26-27:
You will create a simulator program named @@raidsim@@.
Added lines 72-74:
All parameters are mandatory except "verbose". A sample command line:
  raidsim -level 10 -strip 5 -disks 10 -size 10000 -trace input.txt

Changed line 88 from:
We will provide a file @@disk.c@@ containing the disk emulator that keeps statistics. You should turn in a makefile and all your source files. If you include @@disk.c@@, we will replace it with our own before compiling your code.  Please turn the code to @@~cs537-2/handin/<yourlogin>/p3@@.
to:
We will provide a file @@disk.c@@ containing the disk emulator that keeps statistics. You should turn in a makefile and all your source files. The makefile should produce a program named @@raidsim@@. If you include @@disk.c@@, we will replace it with our own before compiling your code.  Please turn the code to @@~cs537-2/handin/<yourlogin>/p3@@.
March 16, 2013, at 01:18 PM by 75.42.234.214 -
Changed line 28 from:
This [[http://pages.cs.wisc.edu/~swift/classes/cs537-sp13/wiki/uploads/PmWiki/p2src.zip|file]] contains source for a virtual disk array. Please use the functions defined in @@disk-array.h@@. The file @@test.c@@ shows how to use the functions. The block size for the project is defined in @@disk.h@@.
to:
This [[http://pages.cs.wisc.edu/~swift/classes/cs537-sp13/wiki/uploads/PmWiki/p3src.zip|file]] contains source for a virtual disk array. Please use the functions defined in @@disk-array.h@@. The file @@test.c@@ shows how to use the functions. The block size for the project is defined in @@disk.h@@.
March 14, 2013, at 03:19 PM by 128.105.32.20 -
Changed line 28 from:
This [[http://pages.cs.wisc.edu/~swift/classes/cs537-sp13/wiki/uploads/PmWiki/p2src.zip|file]] contains source for a virtual disk array. Please use the functions defined in @@disk-array.h@@. The file @@test.c@@ shows how to use the functions.
to:
This [[http://pages.cs.wisc.edu/~swift/classes/cs537-sp13/wiki/uploads/PmWiki/p2src.zip|file]] contains source for a virtual disk array. Please use the functions defined in @@disk-array.h@@. The file @@test.c@@ shows how to use the functions. The block size for the project is defined in @@disk.h@@.
March 14, 2013, at 03:18 PM by 128.105.32.20 -
Added lines 3-6:

!! Due date
The project is due at 9 pm on Thursday, April 4th

Changed line 83 from:
We will provide a file @@disk.c@@ containing the disk emulator that keeps statistics. You should turn in a makefile and all your source files. If you include @@disk.c@@, we will replace it with our own before compiling your code.
to:
We will provide a file @@disk.c@@ containing the disk emulator that keeps statistics. You should turn in a makefile and all your source files. If you include @@disk.c@@, we will replace it with our own before compiling your code.  Please turn the code to @@~cs537-2/handin/<yourlogin>/p3@@.
March 14, 2013, at 03:14 PM by 128.105.32.20 -
Changed lines 21-22 from:
Here are the details on each of the RAID schemes. You can assume that blocks are always 1024 bytes.
to:

!!! Virtual disk array

This [[http://pages
.cs.wisc.edu/~swift/classes/cs537-sp13/wiki/uploads/PmWiki/p2src.zip|file]] contains source for a virtual disk array. Please use the functions defined in @@disk-array.h@@. The file @@test.c@@ shows how to use the functions.
Added lines 38-39:
For writes less than a full strip, you can use additive (read the old blocks and compute new parity) or subtractive (read the old block and old parity) parity. For writes to a full strip, just write out the data and new parity.
Added lines 52-54:
For writes less than a full strip, you can use additive (read the old blocks and compute new parity) or subtractive (read the old block and old parity) parity. For writes to a full strip, just write out the data and new parity.

Deleted line 88:
March 14, 2013, at 01:44 PM by 128.105.32.20 -
Changed lines 41-44 from:
||B0 XOR B1 XOR B2|B0|B1||B2||
||B4|B4 XOR B5 XOR B6|B5||B6||
||B7|B8|B7 XOR B8 XOR B9||B9||
||B10|B11|B12|B10 XOR B11 XOR B12||
to:
||B0 XOR B1 XOR B2||B0||B1||B2||
||B4||B4 XOR B5 XOR B6||B5||B6||
||B7||B8||B7 XOR B8 XOR B9||B9||
||B10||B11||B12||B10 XOR B11 XOR B12||
Changed line 51 from:
* -level [0|1|4|5] specifies the RAID level as 0, 1, 4, or 5
to:
* -level [0|10|4|5] specifies the RAID level as 0, 10, 4, or 5
Changed line 53 from:
* -disks n specifies the use of n disks. Some RAID levels may require an even number of disks (RAID 0) or more than 2 disks (RAID 4 and 5)
to:
* -disks n specifies the use of n disks. Some RAID levels may require an even number of disks (RAID 10) or more than 2 disks (RAID 4 and 5)
March 14, 2013, at 01:04 PM by 128.105.32.20 -
Changed lines 39-40 from:
||Disk 0|Disk 1|Disk 2||Disk 3||
to:
||border=1 with=60%
||Disk 0||Disk 1||Disk 2||Disk 3||
Deleted line 80:
March 14, 2013, at 01:04 PM by 128.105.32.20 -
Changed lines 38-44 from:
For example, with strip s
to:
For example, with strip size 1 and 4 disks
||Disk 0|Disk 1|Disk 2||Disk 3||
||B0 XOR B1 XOR B2|B0|B1||B2||
||B4|B4 XOR B5 XOR B6|B5||B6||
||B7|B8|B7 XOR B8 XOR B9||B9||
||B10|B11|B12|B10 XOR B11 XOR B12||
||B13 XOR B14 XOR B15||B13||B14||B15||
March 14, 2013, at 01:00 PM by 128.105.32.20 -
Changed lines 16-17 from:
In this system you will implement a software RAID manager implementing RAID 0 (striping), RAID 1 (mirroring), RAID 4 (fixed parity disk), and RAID 5 (floating parity). For each strategy, you will implement a RAID manager capable of normal mode operation (no failures), failed-mode operation (working with one failed disk), and recovery (restoring normal mode with a new disk).
to:
In this system you will implement a software RAID manager implementing RAID 0 (striping), RAID 1 (mirroring), RAID 4 (fixed parity disk), and RAID 5 (floating parity), and RAID 10 (mirroring + striping). For each strategy, you will implement a RAID manager capable of normal mode operation (no failures), failed-mode operation (working with one failed disk), and recovery (restoring normal mode with a new disk).
Changed lines 21-22 from:
to:
Here are the details on each of the RAID schemes. You can assume that blocks are always 1024 bytes.
Added lines 25-39:
Blocks should be striped across disks, starting with the lowest numbered disk and increasing. Each disk gets a '''strip''' of blocks, which is one or more blocks. For example, with 3 disks and strip size of 2, disk 0 gets blocks 0-1 and 6-7, disk 1 gets blocks 2-3 and 8-9, and disk 3 gets blocks 4-5 and 10-11.

!!! RAID 10

Blocks should be mirrored between pairs of disks and then striped across pairs of disks in strip units. Mirrors should be disk i and i+1. For example, with 4 disks and strip size 2, disks 0 and 1 get blocks 0-1 and 4-5, and disks 2 and 3 gets blocks 2-3 and 6-7.

!!! RAID 4

Blocks should be striped in strip size units across the first n-1 disks, and disk n should receive the parity. For 4 disks and strip size 3, disk 0 gets blocks 0-2 and 9-11, disk 1 gets blocks 3-5 and 12-14, disk 2 gets blocks 6-8 and 15-17. The parity disk gets the byte-wise XOR of the n-1 data disks. In this case, block 0 XOR block 3 XOR block 6, block 1 XOR block 4 XOR block 7, block 2 XOR block 5 XOR block 8 etc.

!!! RAID 5

Blocks should be striped in strip size units across N disks, reserving one disk for parity. For the first strip, disk 0 should be used for parity, for the second  disk 1 etc. For stripe, parity returns to disk 0.
For example, with strip s

Added line 45:
* -strip n specifies the number of blocks in a strip.
Added line 47:
* -size n specifies the number of blocks per disk
March 13, 2013, at 04:02 PM by 128.105.32.20 -
Changed line 1 from:
Software RAID
to:
! Software RAID
March 13, 2013, at 04:02 PM by 128.105.32.20 -
March 13, 2013, at 04:01 PM by 128.105.32.20 -
Added lines 3-6:
!! Groups

This is a group project done in groups of three. If you know who you would like to work with, please notify the instructors. Otherwise we will make a group for you.

Added lines 20-23:
!! Details

!!! RAID 0

Changed lines 42-44 from:
Your simulator should print the command line from the trace and then execute it, then print the desired output.

!!!
to:
Your simulator should print the command line from the trace and then execute it, then print the desired output. After the END command, your simulator should call @@disk_print_stats()@@ to print the statistics for the disks.

!!! What to turn in

We will provide a file @@disk.c@@ containing the disk emulator that keeps statistics. You should turn in a makefile and all your source files. If you include @@disk.c@@, we will replace it with our own before compiling your code.

You should turn in one project per group. With your project, please include a file name README.TXT listing the names and CS logins of your group members.

!! Grading Criteria

We will consider the following aspects of your code:
* Does it produce the correct sequence of disk accesses for each implementation of RAID?
* Does it produce the correct output values from READ commands for each implementation of RAID?
* Are there memory corruption problems or memory leaks? You may want to run Valgrind.

March 13, 2013, at 03:57 PM by 128.105.32.20 -
Added lines 15-37:

!! Specification

!!! Command line
Command line parameters (these can come in any order):
* -level [0|1|4|5] specifies the RAID level as 0, 1, 4, or 5
* -disks n specifies the use of n disks. Some RAID levels may require an even number of disks (RAID 0) or more than 2 disks (RAID 4 and 5)
* -trace filename specifies the name a file containing a trace of requests
* -verbose set the global variable "verbose" to 1 (defaults to 0).

!!! Trace file format
The trace file contains a sequence of lines with one command per line. There will be exactly one space between each word in a command. The commands can be:
* READ LBA SIZE - read starting at block LBA for SIZE blocks. Prints out the first 4 byte value in each block.
* WRITE LBA SIZE VALUE - write the 4-byte pattern VALUE repeatedly starting at block LBA for SIZE blocks.
* FAIL DISK - make a disk fail, so it cannot be read or written any more. No output
* RECOVER DISK - make a disk recover as a clean, empty disk that can be read or written. No output
* END - last command in trace

!!! Output:
Your simulator should print the command line from the trace and then execute it, then print the desired output.

!!!

March 13, 2013, at 12:01 PM by 128.105.32.20 -
Added lines 1-15:
Software RAID

!! Objectives

The goals for this project are:
* Develop better understanding of the specifics of different RAID implementations
* Analyze tradeoffs in RAID write strategies
* Understand data recovery strategies

!! Overview

In this system you will implement a software RAID manager implementing RAID 0 (striping), RAID 1 (mirroring), RAID 4 (fixed parity disk), and RAID 5 (floating parity). For each strategy, you will implement a RAID manager capable of normal mode operation (no failures), failed-mode operation (working with one failed disk), and recovery (restoring normal mode with a new disk).

Rather than assign each of you a set of real disks, we will instead work with virtual disks stored in ordinary files. Thus, we won't be able to accurately measure the performance impact of different RAID systems. Instead, we will simply count the number of accesses per disk and use that as a proxy for performance.


Powered by PmWiki
Skin by CarlosAB

looks borrowed from http://haran.freeshell.org/oswd/sinorca
More skins here