ÿþ<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta http-equiv=Content-Type content="text/html; charset=unicode"> <meta name=ProgId content=Word.Document> <meta name=Generator content="Microsoft Word 12"> <meta name=Originator content="Microsoft Word 12"> <link rel=File-List href="6-09_files/filelist.xml"> <link rel=Edit-Time-Data href="6-09_files/editdata.mso"> <!--[if !mso]> <style> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style> <![endif]--> <title>COS 318 - Project 6</title> <!--[if gte mso 9]><xml> <o:DocumentProperties> <o:Author>larsab</o:Author> <o:LastAuthor>Lars Ailo Bongo</o:LastAuthor> <o:Revision>18</o:Revision> <o:TotalTime>142</o:TotalTime> <o:Created>2009-12-13T01:52:00Z</o:Created> <o:LastSaved>2010-01-11T03:05:00Z</o:LastSaved> <o:Pages>4</o:Pages> <o:Words>2531</o:Words> <o:Characters>14429</o:Characters> <o:Company>Hewlett-Packard</o:Company> <o:Lines>120</o:Lines> <o:Paragraphs>33</o:Paragraphs> <o:CharactersWithSpaces>16927</o:CharactersWithSpaces> <o:Version>12.00</o:Version> </o:DocumentProperties> </xml><![endif]--> <link rel=themeData href="6-09_files/themedata.thmx"> <link rel=colorSchemeMapping href="6-09_files/colorschememapping.xml"> <!--[if gte mso 9]><xml> <w:WordDocument> <w:Zoom>BestFit</w:Zoom> <w:SpellingState>Clean</w:SpellingState> <w:GrammarState>Clean</w:GrammarState> <w:TrackMoves>false</w:TrackMoves> <w:TrackFormatting/> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:DoNotPromoteQF/> <w:LidThemeOther>EN-US</w:LidThemeOther> <w:LidThemeAsian>X-NONE</w:LidThemeAsian> <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> <w:DontGrowAutofit/> <w:SplitPgBreakAndParaMark/> <w:DontVertAlignCellWithSp/> <w:DontBreakConstrainedForcedTables/> <w:DontVertAlignInTxbx/> <w:Word11KerningPairs/> <w:CachedColBalance/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathPr> <m:mathFont m:val="Cambria Math"/> <m:brkBin m:val="before"/> <m:brkBinSub m:val="&#45;-"/> <m:smallFrac m:val="off"/> <m:dispDef/> <m:lMargin m:val="0"/> <m:rMargin m:val="0"/> <m:defJc m:val="centerGroup"/> <m:wrapIndent m:val="1440"/> <m:intLim m:val="subSup"/> <m:naryLim m:val="undOvr"/> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="false" DefSemiHidden="false" DefQFormat="false" LatentStyleCount="267"> <w:LsdException Locked="false" QFormat="true" Name="Normal"/> <w:LsdException Locked="false" QFormat="true" Name="heading 1"/> <w:LsdException Locked="false" QFormat="true" Name="heading 2"/> <w:LsdException Locked="false" QFormat="true" Name="heading 3"/> <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" QFormat="true" Name="heading 4"/> <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" QFormat="true" Name="heading 5"/> <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" QFormat="true" Name="heading 6"/> <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" QFormat="true" Name="heading 7"/> <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" QFormat="true" Name="heading 8"/> <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" QFormat="true" Name="heading 9"/> <w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true" QFormat="true" Name="caption"/> <w:LsdException Locked="false" QFormat="true" Name="Title"/> <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/> <w:LsdException Locked="false" QFormat="true" Name="Subtitle"/> <w:LsdException Locked="false" QFormat="true" Name="Strong"/> <w:LsdException Locked="false" QFormat="true" Name="Emphasis"/> <w:LsdException Locked="false" Priority="99" Name="Normal (Web)"/> <w:LsdException Locked="false" Priority="99" Name="No List"/> <w:LsdException Locked="false" Priority="99" Name="Balloon Text"/> <w:LsdException Locked="false" Priority="99" SemiHidden="true" Name="Placeholder Text"/> <w:LsdException Locked="false" Priority="1" QFormat="true" Name="No Spacing"/> <w:LsdException Locked="false" Priority="60" Name="Light Shading"/> <w:LsdException Locked="false" Priority="61" Name="Light List"/> <w:LsdException Locked="false" Priority="62" Name="Light Grid"/> <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1"/> <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2"/> <w:LsdException Locked="false" Priority="65" Name="Medium List 1"/> <w:LsdException Locked="false" Priority="66" Name="Medium List 2"/> <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1"/> <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2"/> <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3"/> <w:LsdException Locked="false" Priority="70" Name="Dark List"/> <w:LsdException Locked="false" Priority="71" Name="Colorful Shading"/> <w:LsdException Locked="false" Priority="72" Name="Colorful List"/> <w:LsdException Locked="false" Priority="73" Name="Colorful Grid"/> <w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 1"/> <w:LsdException Locked="false" Priority="61" Name="Light List Accent 1"/> <w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 1"/> <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 1"/> <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 1"/> <w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 1"/> <w:LsdException Locked="false" Priority="99" SemiHidden="true" Name="Revision"/> <w:LsdException Locked="false" Priority="34" QFormat="true" Name="List Paragraph"/> <w:LsdException Locked="false" Priority="29" QFormat="true" Name="Quote"/> <w:LsdException Locked="false" Priority="30" QFormat="true" Name="Intense Quote"/> <w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 1"/> <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 1"/> <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 1"/> <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 1"/> <w:LsdException Locked="false" Priority="70" Name="Dark List Accent 1"/> <w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 1"/> <w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 1"/> <w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 1"/> <w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 2"/> <w:LsdException Locked="false" Priority="61" Name="Light List Accent 2"/> <w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 2"/> <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 2"/> <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 2"/> <w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 2"/> <w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 2"/> <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 2"/> <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 2"/> <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 2"/> <w:LsdException Locked="false" Priority="70" Name="Dark List Accent 2"/> <w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 2"/> <w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 2"/> <w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 2"/> <w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 3"/> <w:LsdException Locked="false" Priority="61" Name="Light List Accent 3"/> <w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 3"/> <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 3"/> <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 3"/> <w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 3"/> <w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 3"/> <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 3"/> <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 3"/> <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 3"/> <w:LsdException Locked="false" Priority="70" Name="Dark List Accent 3"/> <w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 3"/> <w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 3"/> <w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 3"/> <w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 4"/> <w:LsdException Locked="false" Priority="61" Name="Light List Accent 4"/> <w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 4"/> <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 4"/> <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 4"/> <w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 4"/> <w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 4"/> <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 4"/> <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 4"/> <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 4"/> <w:LsdException Locked="false" Priority="70" Name="Dark List Accent 4"/> <w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 4"/> <w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 4"/> <w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 4"/> <w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 5"/> <w:LsdException Locked="false" Priority="61" Name="Light List Accent 5"/> <w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 5"/> <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 5"/> <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 5"/> <w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 5"/> <w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 5"/> <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 5"/> <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 5"/> <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 5"/> <w:LsdException Locked="false" Priority="70" Name="Dark List Accent 5"/> <w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 5"/> <w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 5"/> <w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 5"/> <w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 6"/> <w:LsdException Locked="false" Priority="61" Name="Light List Accent 6"/> <w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 6"/> <w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 6"/> <w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 6"/> <w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 6"/> <w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 6"/> <w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 6"/> <w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 6"/> <w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 6"/> <w:LsdException Locked="false" Priority="70" Name="Dark List Accent 6"/> <w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 6"/> <w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 6"/> <w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 6"/> <w:LsdException Locked="false" Priority="19" QFormat="true" Name="Subtle Emphasis"/> <w:LsdException Locked="false" Priority="21" QFormat="true" Name="Intense Emphasis"/> <w:LsdException Locked="false" Priority="31" QFormat="true" Name="Subtle Reference"/> <w:LsdException Locked="false" Priority="32" QFormat="true" Name="Intense Reference"/> <w:LsdException Locked="false" Priority="33" QFormat="true" Name="Book Title"/> <w:LsdException Locked="false" Priority="37" SemiHidden="true" UnhideWhenUsed="true" Name="Bibliography"/> <w:LsdException Locked="false" Priority="39" SemiHidden="true" UnhideWhenUsed="true" QFormat="true" Name="TOC Heading"/> </w:LatentStyles> </xml><![endif]--> <style> <!-- /* Font Definitions */ @font-face {font-family:SimSun; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:‹[SO; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 680460288 22 0 262145 0;} @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:1; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-520082689 -1073717157 41 0 66047 0;} @font-face {font-family:"\@SimSun"; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 680460288 22 0 262145 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:SimSun; color:black;} h2 {mso-style-unhide:no; mso-style-qformat:yes; mso-style-link:"Heading 2 Char"; mso-margin-top-alt:auto; margin-right:0in; mso-margin-bottom-alt:auto; margin-left:0in; mso-pagination:widow-orphan; mso-outline-level:2; font-size:18.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; color:black; font-weight:bold;} h3 {mso-style-unhide:no; mso-style-qformat:yes; mso-style-link:"Heading 3 Char"; mso-margin-top-alt:auto; margin-right:0in; mso-margin-bottom-alt:auto; margin-left:0in; mso-pagination:widow-orphan; mso-outline-level:3; font-size:13.5pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; color:black; font-weight:bold;} a:link, span.MsoHyperlink {mso-style-unhide:no; color:blue; text-decoration:underline; text-underline:single;} a:visited, span.MsoHyperlinkFollowed {mso-style-unhide:no; color:blue; text-decoration:underline; text-underline:single;} p {mso-style-priority:99; mso-style-unhide:no; mso-margin-top-alt:auto; margin-right:0in; mso-margin-bottom-alt:auto; margin-left:0in; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:SimSun; color:black;} p.MsoAcetate, li.MsoAcetate, div.MsoAcetate {mso-style-priority:99; mso-style-unhide:no; mso-style-link:"Balloon Text Char"; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:8.0pt; font-family:"Tahoma","sans-serif"; mso-fareast-font-family:SimSun; color:black;} span.Heading2Char {mso-style-name:"Heading 2 Char"; mso-style-unhide:no; mso-style-locked:yes; mso-style-link:"Heading 2"; mso-ansi-font-size:18.0pt; mso-bidi-font-size:18.0pt; font-family:SimSun; mso-ascii-font-family:SimSun; mso-fareast-font-family:SimSun; mso-hansi-font-family:SimSun; color:black; mso-ansi-language:EN-US; mso-fareast-language:ZH-CN; mso-bidi-language:AR-SA; font-weight:bold;} span.Heading3Char {mso-style-name:"Heading 3 Char"; mso-style-unhide:no; mso-style-locked:yes; mso-style-link:"Heading 3"; mso-ansi-font-size:13.5pt; mso-bidi-font-size:13.5pt; font-family:SimSun; mso-ascii-font-family:SimSun; mso-fareast-font-family:SimSun; mso-hansi-font-family:SimSun; color:black; mso-ansi-language:EN-US; mso-fareast-language:ZH-CN; mso-bidi-language:AR-SA; font-weight:bold;} span.BalloonTextChar {mso-style-name:"Balloon Text Char"; mso-style-priority:99; mso-style-unhide:no; mso-style-locked:yes; mso-style-link:"Balloon Text"; mso-ansi-font-size:8.0pt; mso-bidi-font-size:8.0pt; font-family:"Tahoma","sans-serif"; mso-ascii-font-family:Tahoma; mso-fareast-font-family:SimSun; mso-hansi-font-family:Tahoma; mso-bidi-font-family:Tahoma; color:black;} span.code {mso-style-name:code; mso-style-unhide:no;} span.SpellE {mso-style-name:""; mso-spl-e:yes;} span.GramE {mso-style-name:""; mso-gram-e:yes;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} /* List Definitions */ @list l0 {mso-list-id:224337410; mso-list-type:hybrid; mso-list-template-ids:-244164256 -405756124 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l0:level1 {mso-level-number-format:bullet; mso-level-text:·; mso-level-tab-stop:none; mso-level-number-position:left; margin-left:66.0pt; text-indent:-30.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:SimSun;} @list l0:level2 {mso-level-tab-stop:1.0in; mso-level-number-position:left; text-indent:-.25in;} @list l0:level3 {mso-level-tab-stop:1.5in; mso-level-number-position:left; text-indent:-.25in;} @list l0:level4 {mso-level-tab-stop:2.0in; mso-level-number-position:left; text-indent:-.25in;} @list l0:level5 {mso-level-tab-stop:2.5in; mso-level-number-position:left; text-indent:-.25in;} @list l0:level6 {mso-level-tab-stop:3.0in; mso-level-number-position:left; text-indent:-.25in;} @list l0:level7 {mso-level-tab-stop:3.5in; mso-level-number-position:left; text-indent:-.25in;} @list l0:level8 {mso-level-tab-stop:4.0in; mso-level-number-position:left; text-indent:-.25in;} @list l0:level9 {mso-level-tab-stop:4.5in; mso-level-number-position:left; text-indent:-.25in;} @list l1 {mso-list-id:595480673; mso-list-type:hybrid; mso-list-template-ids:-1695137212 1164900538 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l1:level1 {mso-level-tab-stop:none; mso-level-number-position:left; margin-left:20.25pt; text-indent:-.25in;} @list l1:level2 {mso-level-tab-stop:1.0in; mso-level-number-position:left; text-indent:-.25in;} @list l1:level3 {mso-level-tab-stop:1.5in; mso-level-number-position:left; text-indent:-.25in;} @list l1:level4 {mso-level-tab-stop:2.0in; mso-level-number-position:left; text-indent:-.25in;} @list l1:level5 {mso-level-tab-stop:2.5in; mso-level-number-position:left; text-indent:-.25in;} @list l1:level6 {mso-level-tab-stop:3.0in; mso-level-number-position:left; text-indent:-.25in;} @list l1:level7 {mso-level-tab-stop:3.5in; mso-level-number-position:left; text-indent:-.25in;} @list l1:level8 {mso-level-tab-stop:4.0in; mso-level-number-position:left; text-indent:-.25in;} @list l1:level9 {mso-level-tab-stop:4.5in; mso-level-number-position:left; text-indent:-.25in;} ol {margin-bottom:0in;} ul {margin-bottom:0in;} --> </style> <!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman","serif";} table.MsoTableProfessional {mso-style-name:"Table Professional"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-unhide:no; border:solid black 1.0pt; mso-border-alt:solid black .75pt; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-border-insideh:.75pt solid black; mso-border-insidev:.75pt solid black; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman","serif";} table.MsoTableProfessionalFirstRow {mso-style-name:"Table Professional"; mso-table-condition:first-row; mso-style-unhide:no; mso-tstyle-shading:white; mso-tstyle-pattern:solid black; mso-tstyle-diagonal-down:none; mso-tstyle-diagonal-up:none; color:windowtext; mso-ansi-font-weight:bold; mso-bidi-font-weight:bold;} </style> <![endif]--> <meta name=CREATED content="20041130;17414600"> <meta name=CHANGED content="20061204;12362500"> <!--[if gte mso 9]><xml> <u1:DocumentProperties> <u1:Author>zhe</u1:Author> <u1:LastAuthor>zhe</u1:LastAuthor> <u1:Revision>4</u1:Revision> <u1:TotalTime>25</u1:TotalTime> <u1:Created>2004-12-02T06:36:00Z</u1:Created> <u1:LastSaved>2004-12-02T06:38:00Z</u1:LastSaved> <u1:Pages>1</u1:Pages> <u1:Words>1625</u1:Words> <u1:Characters>9268</u1:Characters> <u1:Lines>77</u1:Lines> <u1:Paragraphs>21</u1:Paragraphs> <u1:CharactersWithSpaces>10872</u1:CharactersWithSpaces> <u1:Version>11.6360</u1:Version> </u1:DocumentProperties> </xml><![endif]--><!--[if gte mso 9]><xml> <u2:WordDocument> <u2:ValidateAgainstSchemas/> <u2:SaveIfXMLInvalid>false</u2:SaveIfXMLInvalid> <u2:IgnoreMixedContent>false</u2:IgnoreMixedContent> <u2:AlwaysShowPlaceholderText>false</u2:AlwaysShowPlaceholderText> <u2:Compatibility> <u2:UseFELayout/> </u2:Compatibility> <u2:BrowserLevel>MicrosoftInternetExplorer4</u2:BrowserLevel> </u2:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <u3:LatentStyles DefLockedState="false" LatentStyleCount="156"> </u3:LatentStyles> </xml><![endif]--> <meta http-equiv=Content-Language content=en-us> <!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="14338"/> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1"/> </o:shapelayout></xml><![endif]--> </head> <body lang=EN-US link=blue vlink=blue style='tab-interval:.5in'> <div class=Section1> <table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width="100%" style='width:100.0%;mso-cellspacing:0in;mso-yfti-tbllook:1184;mso-padding-alt: 0in 0in 0in 0in'> <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes'> <td valign=top style='padding:0in 0in 0in 0in'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><br> &nbsp;<a name="_x0000_i1032"></a></p> </td> <td style='padding:0in 0in 0in 0in'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span style='font-size:24.0pt'>COS 318 : Operating system</span></b> <br> <b><span style='font-size:13.0pt'>Fall 2012, Princeton University</span></b> </p> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span style='font-size:18.0pt'>Final Project: File System</span></b></p> </td> </tr> </table> <div class=MsoNormal align=center style='text-align:center'> <hr size=1 width="100%" align=center> </div> <p><b><span style='color:black;mso-themecolor:text1'>Due:</b> January 15 (Dean s date), 2012 @ 5:00PM <b>(late submissions can <i>not</i> be accepted)</b></span><span style='color:black;mso-themecolor:text1'><o:p></o:p></span></p> <p><b><span style='color:black;mso-themecolor:text1'>Precept:</b> Thursday December 6<sup>th</sup>, 2012 (only one precept will be given)<o:p></o:p></span></p> <p><b><span style='color:black;mso-themecolor:text1'>Office Hours:</b> during precept time next week, Tuesday Dec 11<sup>th</sup>, and otherwise per my regular schedule<br /> Come ask questions in person after looking over things so you go into the break prepared<o:p></o:p></span></p> <div style='mso-element:para-border-div;border:none;border-bottom:double gray 1.0pt; mso-border-bottom-alt:double gray .75pt;padding:0in 0in 8.0pt 0in'> <p style='margin-bottom:12.0pt;border:none;mso-border-bottom-alt:double gray .75pt; padding:0in;mso-padding-alt:0in 0in 8.0pt 0in'><b style='mso-bidi-font-weight: normal'>No Design Review<o:p></o:p></b></p> <p style='margin-bottom:12.0pt;border:none;mso-border-bottom-alt:double gray .75pt; padding:0in;mso-padding-alt:0in 0in 8.0pt 0in'><b style='mso-bidi-font-weight: normal'>Q&A on Piazza<o:p></o:p></b></p> <p style='margin-bottom:12.0pt;border:none;mso-border-bottom-alt:double gray .75pt; padding:0in;mso-padding-alt:0in 0in 8.0pt 0in'><b style='mso-bidi-font-weight: normal'><a href="precept.pdf">Precept slides</a><o:p></o:p></b></p> <p style='margin-bottom:12.0pt;border:none;mso-border-bottom-alt:double gray .75pt; padding:0in;mso-padding-alt:0in 0in 8.0pt 0in'><b style='mso-bidi-font-weight: normal'><a href="test.py">Test cases</a></b> and <b><a href="test.output">expected output</a></b></p> <p style='margin-bottom:12.0pt;border:none;mso-border-bottom-alt:double gray .75pt; padding:0in;mso-padding-alt:0in 0in 8.0pt 0in'><b style='mso-bidi-font-weight: normal'>Project Code:</b> on Blackboard &amp; lab machines<o:p></o:p></p> <p style='margin-bottom:12.0pt;border:none;mso-border-bottom-alt:double gray .75pt; padding:0in;mso-padding-alt:0in 0in 8.0pt 0in'><b style='mso-bidi-font-weight: normal'>TA:</b> Scott Erickson (<a href="mailto:scottme@cs.princeton.edu">scottme@cs.princeton.edu</a>)<o:p></o:p></p> </div> <h2><span style='mso-fareast-font-family:"Times New Roman"'>Overall Requirement<o:p></o:p></span></h2> <p>In this project you will implement a simple UNIX-like file system with a hierarchical directory structure. &nbsp;Files grow and directories grow and shrink, so you need to manage free disc space. &nbsp;You will be able to browse the directory structure, create new files and directories, delete them, etc. &nbsp;The functionality is similar to UNIX file systems, but it does not include permission and user management. &nbsp;Neither do we require concurrency or high performance from your file system. In other words, you can assume it is accessed only by one process each time. &nbsp;</p> <p>Since this is the final project, you will do the design and implementation by yourself. Do <span class=SpellE>not</span> discuss the project design or implementation with other students. The TA will be able to clarify the requirement, but not give hints.</p> <h2><span style='mso-fareast-font-family:"Times New Roman"'>Implementation Details<o:p></o:p></span></h2> <p>We provide you with the kernel we have built so far, including a number of functions to access the disk (see <span class=SpellE><b>block.h</b></span> for details), and also several shell command (explained later) to test the file system. &nbsp;You are required to implement most of the&nbsp;standard UNIX file system calls as listed in the following:</p> <p><span class=Heading3Char><span style='font-size:13.5pt;font-family:"Times New Roman","serif"'>1. File system module initialization</span></span><br> <br> Prototype:&nbsp;&nbsp;&nbsp; <b>void <span class=SpellE>fs_init</span> (void)<span class=GramE>;</span></b><br> Function description:<br> <br> This function initializes the data structures and resources used by the file system subsystem, and if it detects that the disk is already formatted, it automatically mounts it to the root directory. &nbsp;It is invoked at kernel initialization time, after USB subsystem has been initialized, but before the block module (<span class=SpellE>block.c</span>) is initialized. &nbsp;So you need to invoke <span class=SpellE><b>block_init</b></span> in <span class=SpellE><b>fs_init</b></span>. &nbsp;Note that by the time <span class=SpellE><b>fs_init</b></span> is called, it disk is not necessarily formatted. &nbsp;As a result, you need to devise a mechanism so that a formatted disk is recognized (need the help of <span class=SpellE><b>fs_mkfs</b></span>).<br> <br> This function is the only non-<span class=SpellE>syscall</span> function you are required to implement.<br> <br> <span class=Heading3Char><span style='font-size:13.5pt;font-family:"Times New Roman","serif"'>2. Format a disk</span></span><br> <br> Prototype:&nbsp;&nbsp;&nbsp; <span class=SpellE><b>int</b></span><b> <span class=SpellE>fs_mkfs</span> (void)<span class=GramE>;</span></b><br> Function description:<br> <br> This function formats a disk, either a raw disk, or one that is previous formatted, and then mount the newly formatted file system to the root directory. &nbsp;The size of disk (in blocks) is defined as <b>FS_SIZE</b> at <span class=SpellE><b>fs.h</b></span><span class=GramE>.(</span>You can increase the size of disk if you would like to in order to support bigger file system.) &nbsp;We assume there is one and only one disk present in system. &nbsp;You need to set up a flag (magic number) somewhere in the disk, so that it can be later recognized as a formatted disk (<span class=SpellE>ie</span>: You can still access a formatted disk and get its content after the shell exists and gets restarted). &nbsp;The function should return 0 on success, and -1 on failure.</p> <p>Note: The <span class=SpellE>bootblock</span>, kernel image and process images are all outside the file system. &nbsp;The file system starts at the first block after the last process image in the disk and that block is given the block number 0 when using <span class=SpellE><b>block_read</b></span><b>/write</b> to access the disk. </p> <p><br> <span class=Heading3Char><span style='font-size:13.5pt;font-family:"Times New Roman","serif"'>3. Open and possibly create a file</span></span><br> <br> Prototype:&nbsp;&nbsp;&nbsp; <span class=SpellE><b>int</b></span><b> <span class=SpellE>fs_open</span> (char *filename, <span class=SpellE>int</span> flags)<span class=GramE>;</span></b><br> Function description:<br> <br> Given a <u>filename</u>, <span class=SpellE><b>fs_open</b></span><b>()</b> returns a file descriptor, a small, non-negative integer for use in the subsequent system calls (<span class=SpellE><b>fs_read</b></span>, <span class=SpellE><b>fs_write</b></span>, <span class=SpellE><b>fs_lseek</b></span>, etc). &nbsp;The file descriptor returned by a successful call will be the lowest-numbered file descriptor not currently open for the process.<br> <br> The parameter <u>flags</u> must include one of the following access modes: &nbsp;<b>FS_O_RDONLY</b>, <b>FS_O_WRONLY</b>, <span class=GramE><b>FS</b></span><b>_O_RDWR</b>. &nbsp;These request opening the file read-only, write-only, or read/write respectively. &nbsp;The constants are defined in the file <span class=SpellE><b>common.h</b></span>. &nbsp;Open return the new file descriptor, or -1 if an error occurred.<br> <br> If a non-existing file is opened for write, it should be created. &nbsp;An attempt to open a non-existing file read-only should fail.<br> <br> To make your life easier, we assume <u>filename</u> passed to the <span class=SpellE>syscalls</span> can only be &quot;.&quot;, &quot;<span class=GramE>..&quot;</span>, a directory, or a filename in the current directory. &nbsp;So you don't have to parse the path as &quot;/&quot; separated directory and file names. &nbsp;You can also assume that the length of the filename (and <span class=SpellE>dirname</span> in the future) will be less than 32 bytes (MAX_FILE_NAME). These assumptions remain the same for the following functions.</p> <p>It is considered an error to open a directory in any mode besides FS_O_RDONLY.</p> <p>You can use a shared file descriptor table. You do not need to worry about user management or access control list.<br> <br> <span class=Heading3Char><span style='font-size:13.5pt;font-family:"Times New Roman","serif"'>4. Close a file descriptor</span></span><br> <br> Prototype:&nbsp;&nbsp;&nbsp; <span class=SpellE><b>int</b></span><b> <span class=SpellE>fs_close</span> (<span class=SpellE>int</span> <span class=SpellE>fd</span>)<span class=GramE>;</span><br> </b>Function description:<br> <br> <span class=SpellE><b>fs_close</b></span><b>()</b> closes a file descriptor, so that it no longer refers to any file and may be reused. &nbsp;It returns zero on success, and -1 on failure. &nbsp;If the descriptor was the last reference to a file which has been removed using unlink the file is deleted.<br> <br> <span class=Heading3Char><span style='font-size:13.5pt;font-family:"Times New Roman","serif"'>5. Read a file</span></span><br> <br> Prototype:&nbsp;&nbsp;&nbsp; <span class=SpellE><b>int</b></span><b> <span class=SpellE>fs_read</span> (<span class=SpellE>int</span> <span class=SpellE>fd</span>, char *<span class=SpellE>buf</span>, <span class=SpellE>int</span> count)<span class=GramE>;</span><br> </b>Function description:<br> <br> <span class=SpellE><b>fs_read</b></span><b>()</b> attempts to read up to <u>count</u> bytes from file descriptor <span class=SpellE><u>fd</u></span> into the buffer starting at <span class=SpellE><u>buf</u></span>. &nbsp;If count is zero, <span class=SpellE><b>fs_<span class=GramE>read</span></b></span><span class=GramE><b>(</b></span><b>)</b> returns zero and has no other results. &nbsp;On success, the number of bytes successfully read is returned, and the file position is advanced by this number. &nbsp;It is not an error if this number is smaller than the number of bytes requested; this may happen for example because fewer bytes are actually available right now. &nbsp;On error, -1 is returned. &nbsp;In this case it is left unspecified whether the file position changes.<br> <br> <span class=Heading3Char><span style='font-size:13.5pt;font-family:"Times New Roman","serif"'>6. Write a file</span></span><br> <br> Prototype:&nbsp;&nbsp;&nbsp; <span class=SpellE><b>int</b></span><b> <span class=SpellE>fs_write</span> (<span class=SpellE>int</span> <span class=SpellE>fd</span>, char *<span class=SpellE>buf</span>, <span class=SpellE>int</span> count)<span class=GramE>;</span><br> </b>Function description:<br> <br> <span class=SpellE><b>fs_write</b></span><b>()</b> writes up to <u>count</u> bytes to the file referenced by the file descriptor <span class=SpellE><u>fd</u></span> from the buffer starting at <span class=SpellE><u>buf</u></span>. <br> <br> On success, the number of bytes written from <u>buf</u> are returned (zero indicate nothing was written), and the file position is advanced by this number. &nbsp;On error, -1 is returned. It is an error to attempt a write at a point beyond the maximum size of a file. <br> <br> If count is zero, 0 will be returned without causing any other effect. <br> <br> <span class=Heading3Char><span style='font-size:13.5pt;font-family:"Times New Roman","serif"'>7. Reposition read/write file offset</span></span><br> <br> Prototype:&nbsp;&nbsp;&nbsp; <span class=SpellE><b>int</b></span><b> <span class=SpellE>fs_lseek</span> (<span class=SpellE>int</span> <span class=SpellE>fd</span>, <span class=SpellE>int</span> offset)<span class=GramE>;</span><br> </b>Function description:<br> <br> The <span class=SpellE><b>fs_lseek</b></span><b>()</b> function repositions the offset of the open file associated with the file descriptor <span class=SpellE><u>fd</u></span> to the argument <u>offset.</u> <br> <br> The <span class=SpellE><b>fs_<span class=GramE>lseek</span></b></span><span class=GramE><b>(</b></span><b>)</b> function allows the file offset to be set beyond the end of file (but this does not change the size of the file). &nbsp;If data is later written at this point, subsequent read of data in the gap (a &quot;hole&quot;) return bytes ('\0') until data is actually written into the gap.<br> <br> Upon successful completion, <span class=SpellE><b>fs_<span class=GramE>lseek</span></b></span><span class=GramE>(</span>) returns the resulting offset location as measured in bytes from the beginning of the file. &nbsp;Otherwise, a value of -1 is returned.<br> <br> <span class=Heading3Char><span style='font-size:13.5pt;font-family:"Times New Roman","serif"'>8. Create a directory</span></span><br> <br> Prototype:&nbsp;&nbsp;&nbsp; <span class=SpellE><b>int</b></span><b> <span class=SpellE>fs_mkdir</span> (char *<span class=SpellE>dirname</span>)<span class=GramE>;</span><br> </b>Function description:<br> <br> <span class=SpellE><b>fs_mkdir</b></span>() attempts to create a directory named <span class=SpellE><u>dirname</u></span>. &nbsp;It returns zero on success, or -1 if an error occurred. &nbsp;<span class=SpellE><b>fs_<span class=GramE>mkdir</span></b></span><span class=GramE><b>(</b></span><b>)</b> should fail if the directory <span class=SpellE><u>dirname</u></span> already exists.<br> <br> <span class=Heading3Char><span style='font-size:13.5pt;font-family:"Times New Roman","serif"'>9. Delete a directory</span></span><br> <br> Prototype:&nbsp;&nbsp;&nbsp; <span class=SpellE><b>int</b></span><b> <span class=SpellE>fs_rmdir</span> (char *<span class=SpellE>dirname</span>)<span class=GramE>;</span><br> </b>Function description:<br> <br> <span class=SpellE><b>fs_rmdir</b></span><b>()</b> deletes a directory, which must be empty. &nbsp;On success, zero is returned; on error, -1 is returned (<span class=SpellE>eg</span>, attempt to deleting a non-empty directory).<br> <br> <span class=Heading3Char><span style='font-size:13.5pt;font-family:"Times New Roman","serif"'>10. Change the current directory</span></span><br> <br> Prototype:&nbsp;&nbsp;&nbsp; <span class=SpellE><b>int</b></span><b> <span class=SpellE>fs_chdir</span> (char *<span class=SpellE>dirname</span>)<span class=GramE>;</span><br> </b>Function description:<br> <br> <span class=SpellE><b>fs_chdir</b></span><b>()</b> changes the current directory to that specified in <span class=SpellE><u>dirname</u></span>. &nbsp;On success, zero is returned. &nbsp;On error, -1 is returned.<br> <br> <span class=Heading3Char><span style='font-size:13.5pt;font-family:"Times New Roman","serif"'>11. Make a new name for a file</span></span><br> <br> Prototype:&nbsp;&nbsp;&nbsp; <span class=SpellE><b>int</b></span><b> <span class=SpellE>fs_link</span> (char *<span class=SpellE>oldpath</span>, char *<span class=SpellE>newpath</span>)<span class=GramE>;</span><br> </b>Function description:<br> <br> <span class=SpellE><b>fs_link</b></span><b>()</b> creates a new link (also known as a hard link) to an existing file <span class=SpellE><u>oldpath</u></span>. &nbsp;If <span class=SpellE><u>newpath</u></span>&nbsp;exits it will not be overwritten. &nbsp;The new name may be used exactly as the old one for any operation; both names refer to the same file and it is impossible to tell which name was the `original'.<br> <br> On success, zero is returned. &nbsp;On error, -1 is returned. &nbsp;It is an error to use this function on a directory.<br> <br> Note because we excluded the usage of paths, <span class=SpellE><u>oldpath</u></span> and <span class=SpellE><u>newpath</u></span> are actually both filenames and can only be in the same directory.<br> <br> <span class=Heading3Char><span style='font-size:13.5pt;font-family:"Times New Roman","serif"'>12. Delete a file.</span></span><br> <br> Prototype:&nbsp;&nbsp;&nbsp; <span class=SpellE><b>int</b></span><b> <span class=SpellE>fs_unlink</span> (char *filename)<span class=GramE>;</span><br> </b>Function description:<br> <br> <span class=SpellE><b>fs_unlink</b></span><b>()</b> deletes a name from the file system. &nbsp;If that name was the last link to a file and no process has the file open, the file is deleted and the space it was using is made available for reuse.<br> <br> If the name was the last link to a file but any process still have the file open the file will remain in existence until the last file descriptor referring to it is closed.<br> <br> On success, zero is returned. &nbsp;On error, -1 is returned. &nbsp;It is an error to use this function on a directory.<br> <br> <span class=Heading3Char><span style='font-size:13.5pt;font-family:"Times New Roman","serif"'>13. Get file/directory status.</span></span><br> <br> Prototype:&nbsp;&nbsp;&nbsp; <span class=SpellE><b>int</b></span><b> <span class=SpellE>fs_stat</span> (char *filename, <span class=SpellE>fileStat</span> *<span class=SpellE>buf</span>)<span class=GramE>;</span><br> </b>Function description:<br> <br> <span class=SpellE><b>fs_stat</b></span><b>()</b> returns information about a file. &nbsp;It returns a <span class=SpellE><b>fileStat</b></span> structure (defined in <span class=SpellE><b>common.h</b></span>), which contains the following fields: <br> <br> <span class=SpellE>typedef</span> <span class=SpellE>struct</span> {<br> &nbsp;&nbsp;&nbsp; <span class=SpellE>int</span> <span class=SpellE>inodeNo</span>;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; /* the file <span class=SpellE>i</span>-node number */<br> &nbsp;&nbsp;&nbsp; short type;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; /* the file <span class=SpellE>i</span>-node type, DIRECTORY, FILE_TYPE (there's another value FREE_INODE which never appears here */<br> &nbsp;&nbsp;&nbsp; char links;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; /* number of links to the&nbsp;<span class=SpellE>i</span>-node */<br> &nbsp;&nbsp;&nbsp; <span class=SpellE>int</span> size;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; /* file size in bytes */<br> &nbsp;&nbsp;&nbsp; <span class=SpellE>int</span> <span class=SpellE>numBlocks</span>;&nbsp;&nbsp;&nbsp; /* number of blocks used by the file */<br> } <span class=SpellE>fileStat</span>;</p> <p>Note: if your implementation will need different kind of <span class=SpellE>fileStat</span> structure, you can modify this <span class=SpellE>fileStat</span> and the corresponding code to reflect your change. Please try to keep some essential fields like file size, type so that our testing script will be able to work with your finished code.</p> <p><span class=Heading3Char><span style='font-size:13.5pt;font-family:"Times New Roman","serif"'>14. List current directory content.<o:p></o:p></span></span></p> <p>Prototype:&nbsp;&nbsp;&nbsp; <b>void <span class=SpellE>shell_ls</span> (void)<span class=GramE>;</span><br> </b>Function description:</p> <p><span style='mso-fareast-language:ZH-CN;mso-bidi-font-weight:bold'>Note that this function is in <span class=SpellE>shell.c</span>.<o:p></o:p></span></p> <p><span class=SpellE><b>shell_<span class=GramE>ls</span></b></span><span class=GramE><b>(</b></span><b>)</b> prints a list of files in the current directory. The list does not have to be sorted alphabetically.<b><span style='font-size: 13.5pt;mso-fareast-language:ZH-CN'><o:p></o:p></span></b></p> <div class=MsoNormal align=center style='text-align:center'> <hr size=2 width="100%" align=center> </div> <h3><span style='mso-fareast-font-family:"Times New Roman"'>Shell Commands:<o:p></o:p></span></h3> <p>You will be able to test your file system implementation through the following shell commands (provided through <span class=SpellE>shell.c</span>). We will also test your file system through this standard shell, so please do not change the existing shell commands. You can add extra shell commands for your own testing purpose.<o:p></o:p></p> <table class=MsoTableProfessional border=1 cellspacing=0 cellpadding=0 width="100%" style='width:100.0%;border-collapse:collapse;border:none; mso-border-alt:solid black .75pt;mso-yfti-tbllook:1184;mso-padding-alt:0in 5.4pt 0in 5.4pt'> <COL WIDTH=39*><COL WIDTH=41*><COL WIDTH=176*> <tr style='mso-yfti-irow:-1;mso-yfti-firstrow:yes'> <td width="15%" valign=top style='width:15.0%;border:solid black 1.0pt; mso-border-alt:solid black .75pt;background:black;mso-shading:white; mso-pattern:solid black;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto; mso-yfti-cnfc:1'><strong><span style='color:white;font-weight:normal'>Shell commands</span></strong><b><o:p></o:p></b></p> </td> <td width="16%" valign=top style='width:16.0%;border:solid black 1.0pt; border-left:none;mso-border-left-alt:solid black .75pt;mso-border-alt:solid black .75pt; background:black;mso-shading:white;mso-pattern:solid black;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto; mso-yfti-cnfc:1'><strong><span style='color:white;font-weight:normal'>Arguments</span></strong><b><o:p></o:p></b></p> </td> <td width="69%" valign=top style='width:69.0%;border:solid black 1.0pt; border-left:none;mso-border-left-alt:solid black .75pt;mso-border-alt:solid black .75pt; background:black;mso-shading:white;mso-pattern:solid black;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto; mso-yfti-cnfc:1'><strong><span style='color:white;font-weight:normal'>Description</span></strong><b><o:p></o:p></b></p> </td> </tr> <tr style='mso-yfti-irow:0'> <td width="15%" valign=top style='width:15.0%;border:solid black 1.0pt; border-top:none;mso-border-top-alt:solid black .75pt;mso-border-alt:solid black .75pt; padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span class=SpellE>mkfs</span></p> </td> <td width="16%" valign=top style='width:16.0%;border-top:none;border-left: none;border-bottom:solid black 1.0pt;border-right:solid black 1.0pt; mso-border-top-alt:solid black .75pt;mso-border-left-alt:solid black .75pt; mso-border-alt:solid black .75pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&nbsp;</p> </td> <td width="69%" valign=top style='width:69.0%;border-top:none;border-left: none;border-bottom:solid black 1.0pt;border-right:solid black 1.0pt; mso-border-top-alt:solid black .75pt;mso-border-left-alt:solid black .75pt; mso-border-alt:solid black .75pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Make a new file system, i.e., format the disk so that it is ready for other file system operations<span class=GramE>..</span></p> </td> </tr> <tr style='mso-yfti-irow:1'> <td width="15%" valign=top style='width:15.0%;border:solid black 1.0pt; border-top:none;mso-border-top-alt:solid black .75pt;mso-border-alt:solid black .75pt; padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>open</p> </td> <td width="16%" valign=top style='width:16.0%;border-top:none;border-left: none;border-bottom:solid black 1.0pt;border-right:solid black 1.0pt; mso-border-top-alt:solid black .75pt;mso-border-left-alt:solid black .75pt; mso-border-alt:solid black .75pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&lt;filename&gt; &lt;flag&gt;</p> </td> <td width="69%" valign=top style='width:69.0%;border-top:none;border-left: none;border-bottom:solid black 1.0pt;border-right:solid black 1.0pt; mso-border-top-alt:solid black .75pt;mso-border-left-alt:solid black .75pt; mso-border-alt:solid black .75pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Open a file with the given &lt;flag&gt;, return a file descriptor (<span class=SpellE>fd</span>) associated with this file.</p> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&lt;flag&gt;: 1: FS_O_RDONLY; 2: FS_O_WRONLY; 3: FS_O_RDWR </p> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>The flag is same as the flag used by the open system call. The current file offset will be 0 when the file is opened.</p> </td> </tr> <tr style='mso-yfti-irow:2'> <td width="15%" valign=top style='width:15.0%;border:solid black 1.0pt; border-top:none;mso-border-top-alt:solid black .75pt;mso-border-alt:solid black .75pt; padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>read</p> </td> <td width="16%" valign=top style='width:16.0%;border-top:none;border-left: none;border-bottom:solid black 1.0pt;border-right:solid black 1.0pt; mso-border-top-alt:solid black .75pt;mso-border-left-alt:solid black .75pt; mso-border-alt:solid black .75pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&lt;<span class=SpellE>fd</span>&gt; &lt;size&gt;</p> </td> <td width="69%" valign=top style='width:69.0%;border-top:none;border-left: none;border-bottom:solid black 1.0pt;border-right:solid black 1.0pt; mso-border-top-alt:solid black .75pt;mso-border-left-alt:solid black .75pt; mso-border-alt:solid black .75pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Read &lt;size&gt; bytes from the file associated with &lt;<span class=SpellE>fd</span>&gt;, from current file offset. The current file offset will move forward &lt;size&gt; bytes after read.</p> </td> </tr> <tr style='mso-yfti-irow:3'> <td width="15%" valign=top style='width:15.0%;border:solid black 1.0pt; border-top:none;mso-border-top-alt:solid black .75pt;mso-border-alt:solid black .75pt; padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>write</p> </td> <td width="16%" valign=top style='width:16.0%;border-top:none;border-left: none;border-bottom:solid black 1.0pt;border-right:solid black 1.0pt; mso-border-top-alt:solid black .75pt;mso-border-left-alt:solid black .75pt; mso-border-alt:solid black .75pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&lt;<span class=SpellE>fd</span>&gt; &lt;string&gt;</p> </td> <td width="69%" valign=top style='width:69.0%;border-top:none;border-left: none;border-bottom:solid black 1.0pt;border-right:solid black 1.0pt; mso-border-top-alt:solid black .75pt;mso-border-left-alt:solid black .75pt; mso-border-alt:solid black .75pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Write &lt;string&gt; into file associated with &lt;<span class=SpellE>fd</span>&gt;, from current file offset. The current file offset will move forward &lt;size&gt; bytes after write.</p> </td> </tr> <tr style='mso-yfti-irow:4'> <td width="15%" valign=top style='width:15.0%;border:solid black 1.0pt; border-top:none;mso-border-top-alt:solid black .75pt;mso-border-alt:solid black .75pt; padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span class=SpellE>lseek</span></p> </td> <td width="16%" valign=top style='width:16.0%;border-top:none;border-left: none;border-bottom:solid black 1.0pt;border-right:solid black 1.0pt; mso-border-top-alt:solid black .75pt;mso-border-left-alt:solid black .75pt; mso-border-alt:solid black .75pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&lt;<span class=SpellE>fd</span>&gt; &lt;offset&gt;</p> </td> <td width="69%" valign=top style='width:69.0%;border-top:none;border-left: none;border-bottom:solid black 1.0pt;border-right:solid black 1.0pt; mso-border-top-alt:solid black .75pt;mso-border-left-alt:solid black .75pt; mso-border-alt:solid black .75pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Move the current file offset associated with &lt;<span class=SpellE>fd</span>&gt; to a new file offset at &lt;offset&gt;. The &lt;offset&gt; means the number of bytes from the beginning of the file.</p> </td> </tr> <tr style='mso-yfti-irow:5'> <td width="15%" valign=top style='width:15.0%;border:solid black 1.0pt; border-top:none;mso-border-top-alt:solid black .75pt;mso-border-alt:solid black .75pt; padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>close</p> </td> <td width="16%" valign=top style='width:16.0%;border-top:none;border-left: none;border-bottom:solid black 1.0pt;border-right:solid black 1.0pt; mso-border-top-alt:solid black .75pt;mso-border-left-alt:solid black .75pt; mso-border-alt:solid black .75pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&lt;<span class=SpellE>fd</span>&gt;</p> </td> <td width="69%" valign=top style='width:69.0%;border-top:none;border-left: none;border-bottom:solid black 1.0pt;border-right:solid black 1.0pt; mso-border-top-alt:solid black .75pt;mso-border-left-alt:solid black .75pt; mso-border-alt:solid black .75pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Close the file associated with &lt;<span class=SpellE>fd</span>&gt;.</p> </td> </tr> <tr style='mso-yfti-irow:6'> <td width="15%" valign=top style='width:15.0%;border:solid black 1.0pt; border-top:none;mso-border-top-alt:solid black .75pt;mso-border-alt:solid black .75pt; padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span class=SpellE>mkdir</span></p> </td> <td width="16%" valign=top style='width:16.0%;border-top:none;border-left: none;border-bottom:solid black 1.0pt;border-right:solid black 1.0pt; mso-border-top-alt:solid black .75pt;mso-border-left-alt:solid black .75pt; mso-border-alt:solid black .75pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&lt;<span class=SpellE>dirname</span>&gt;</p> </td> <td width="69%" valign=top style='width:69.0%;border-top:none;border-left: none;border-bottom:solid black 1.0pt;border-right:solid black 1.0pt; mso-border-top-alt:solid black .75pt;mso-border-left-alt:solid black .75pt; mso-border-alt:solid black .75pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Create a sub-directory &lt;<span class=SpellE>dirname</span>&gt; under the current directory.</p> </td> </tr> <tr style='mso-yfti-irow:7'> <td width="15%" valign=top style='width:15.0%;border:solid black 1.0pt; border-top:none;mso-border-top-alt:solid black .75pt;mso-border-alt:solid black .75pt; padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span class=SpellE>rmdir</span></p> </td> <td width="16%" valign=top style='width:16.0%;border-top:none;border-left: none;border-bottom:solid black 1.0pt;border-right:solid black 1.0pt; mso-border-top-alt:solid black .75pt;mso-border-left-alt:solid black .75pt; mso-border-alt:solid black .75pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&lt;<span class=SpellE>dirname</span>&gt;</p> </td> <td width="69%" valign=top style='width:69.0%;border-top:none;border-left: none;border-bottom:solid black 1.0pt;border-right:solid black 1.0pt; mso-border-top-alt:solid black .75pt;mso-border-left-alt:solid black .75pt; mso-border-alt:solid black .75pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Remove the sub-directory &lt;<span class=SpellE>dirname</span>&gt;.</p> </td> </tr> <tr style='mso-yfti-irow:8'> <td width="15%" valign=top style='width:15.0%;border:solid black 1.0pt; border-top:none;mso-border-top-alt:solid black .75pt;mso-border-alt:solid black .75pt; padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span class=SpellE>chdir</span></p> </td> <td width="16%" valign=top style='width:16.0%;border-top:none;border-left: none;border-bottom:solid black 1.0pt;border-right:solid black 1.0pt; mso-border-top-alt:solid black .75pt;mso-border-left-alt:solid black .75pt; mso-border-alt:solid black .75pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&lt;<span class=SpellE>dirname</span>&gt;</p> </td> <td width="69%" valign=top style='width:69.0%;border-top:none;border-left: none;border-bottom:solid black 1.0pt;border-right:solid black 1.0pt; mso-border-top-alt:solid black .75pt;mso-border-left-alt:solid black .75pt; mso-border-alt:solid black .75pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Change the current directory to &lt;<span class=SpellE>dirname</span>&gt;.</p> </td> </tr> <tr style='mso-yfti-irow:9'> <td width="15%" valign=top style='width:15.0%;border:solid black 1.0pt; border-top:none;mso-border-top-alt:solid black .75pt;mso-border-alt:solid black .75pt; padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>link</p> </td> <td width="16%" valign=top style='width:16.0%;border-top:none;border-left: none;border-bottom:solid black 1.0pt;border-right:solid black 1.0pt; mso-border-top-alt:solid black .75pt;mso-border-left-alt:solid black .75pt; mso-border-alt:solid black .75pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&lt;<span class=SpellE>src</span>&gt; &lt;<span class=SpellE>dest</span>&gt;</p> </td> <td width="69%" valign=top style='width:69.0%;border-top:none;border-left: none;border-bottom:solid black 1.0pt;border-right:solid black 1.0pt; mso-border-top-alt:solid black .75pt;mso-border-left-alt:solid black .75pt; mso-border-alt:solid black .75pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Create a link named &lt;<span class=SpellE>dest</span>&gt; to an existing file or directory named &lt;<span class=SpellE>src</span>&gt;.</p> </td> </tr> <tr style='mso-yfti-irow:10'> <td width="15%" valign=top style='width:15.0%;border:solid black 1.0pt; border-top:none;mso-border-top-alt:solid black .75pt;mso-border-alt:solid black .75pt; padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>unlink</p> </td> <td width="16%" valign=top style='width:16.0%;border-top:none;border-left: none;border-bottom:solid black 1.0pt;border-right:solid black 1.0pt; mso-border-top-alt:solid black .75pt;mso-border-left-alt:solid black .75pt; mso-border-alt:solid black .75pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&lt;name&gt;</p> </td> <td width="69%" valign=top style='width:69.0%;border-top:none;border-left: none;border-bottom:solid black 1.0pt;border-right:solid black 1.0pt; mso-border-top-alt:solid black .75pt;mso-border-left-alt:solid black .75pt; mso-border-alt:solid black .75pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Remove a link to the name. (When link count drop to 0, delete the file or directory).</p> </td> </tr> <tr style='mso-yfti-irow:11'> <td width="15%" valign=top style='width:15.0%;border:solid black 1.0pt; border-top:none;mso-border-top-alt:solid black .75pt;mso-border-alt:solid black .75pt; padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>stat</p> </td> <td width="16%" valign=top style='width:16.0%;border-top:none;border-left: none;border-bottom:solid black 1.0pt;border-right:solid black 1.0pt; mso-border-top-alt:solid black .75pt;mso-border-left-alt:solid black .75pt; mso-border-alt:solid black .75pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&lt;name&gt;</p> </td> <td width="69%" valign=top style='width:69.0%;border-top:none;border-left: none;border-bottom:solid black 1.0pt;border-right:solid black 1.0pt; mso-border-top-alt:solid black .75pt;mso-border-left-alt:solid black .75pt; mso-border-alt:solid black .75pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Show the status of the file or directory with name &lt;name&gt;. It should display its <span class=SpellE>inode</span> information; whether it is a file or directory; its link count; size of the file/directory; number of blocks allocated; other information stored about this file/directory.</p> </td> </tr> <tr style='mso-yfti-irow:12'> <td width="15%" valign=top style='width:15.0%;border:solid black 1.0pt; border-top:none;mso-border-top-alt:solid black .75pt;mso-border-alt:solid black .75pt; padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span class=SpellE>ls</span></p> </td> <td width="16%" valign=top style='width:16.0%;border-top:none;border-left: none;border-bottom:solid black 1.0pt;border-right:solid black 1.0pt; mso-border-top-alt:solid black .75pt;mso-border-left-alt:solid black .75pt; mso-border-alt:solid black .75pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><o:p>&nbsp;</o:p></p> </td> <td width="69%" valign=top style='width:69.0%;border-top:none;border-left: none;border-bottom:solid black 1.0pt;border-right:solid black 1.0pt; mso-border-top-alt:solid black .75pt;mso-border-left-alt:solid black .75pt; mso-border-alt:solid black .75pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Show the content of the current directory.</p> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b style='mso-bidi-font-weight:normal'>Note!</b> You must implement this function.</p> </td> </tr> <tr style='mso-yfti-irow:13'> <td width="15%" valign=top style='width:15.0%;border:solid black 1.0pt; border-top:none;mso-border-top-alt:solid black .75pt;mso-border-alt:solid black .75pt; padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>cat</p> </td> <td width="16%" valign=top style='width:16.0%;border-top:none;border-left: none;border-bottom:solid black 1.0pt;border-right:solid black 1.0pt; mso-border-top-alt:solid black .75pt;mso-border-left-alt:solid black .75pt; mso-border-alt:solid black .75pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&lt;filename&gt;</p> </td> <td width="69%" valign=top style='width:69.0%;border-top:none;border-left: none;border-bottom:solid black 1.0pt;border-right:solid black 1.0pt; mso-border-top-alt:solid black .75pt;mso-border-left-alt:solid black .75pt; mso-border-alt:solid black .75pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Show the content of the file.</p> </td> </tr> <tr style='mso-yfti-irow:14'> <td width="15%" valign=top style='width:15.0%;border:solid black 1.0pt; border-top:none;mso-border-top-alt:solid black .75pt;mso-border-alt:solid black .75pt; padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>create</p> </td> <td width="16%" valign=top style='width:16.0%;border-top:none;border-left: none;border-bottom:solid black 1.0pt;border-right:solid black 1.0pt; mso-border-top-alt:solid black .75pt;mso-border-left-alt:solid black .75pt; mso-border-alt:solid black .75pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>&lt;filename&gt; &lt;size&gt;</p> </td> <td width="69%" valign=top style='width:69.0%;border-top:none;border-left: none;border-bottom:solid black 1.0pt;border-right:solid black 1.0pt; mso-border-top-alt:solid black .75pt;mso-border-left-alt:solid black .75pt; mso-border-alt:solid black .75pt;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Create a file with &lt;filename&gt; as the name in the current directory, and fill it with &lt;size&gt; amount of data, then close the file. (For testing purpose)</p> </td> </tr> </table> <h2><span style='mso-fareast-font-family:"Times New Roman"'>Files for this assignment<o:p></o:p></span></h2> <p>You should use the code template as a starting point for your project.&nbsp;You only need to change three of the files: <span class=SpellE><b>fs.h</b></span>, <span class=SpellE><b>fs.c</b></span><b>, </b><span style='mso-bidi-font-weight: bold'>and <span class=SpellE><b>shell.c</b></span></span>.<span style='mso-spacerun:yes'>  </span>However, feel free to add other files so that you can better organize your code, or modify existing files, but make sure to describe in the design document any additional files added or changes made to other files.</p> <p>You should use the functions provided in <span class=SpellE><b>block.h</b></span> to read and write blocks in the file system. These functions will use a file (on <span class=SpellE>linux</span>) or the USB disk (on our OS) as the store.</p> <h3><span style='mso-fareast-font-family:"Times New Roman"'>Testing on Linux<o:p></o:p></span></h3> <p>This project's code is designed so that you can build two targets: an image file for bochs, and a Linux executable.&nbsp; However, due to the new version of bochs that we are using this year or the alignment of the planets, the 'image' target will not produce a viable image. If you can get that to work, let us know, but it is not necessary because we will only test using the Linux executable.</p> <p>The following files are compiled and linked to the <span class=SpellE>filesystem</span> implementation to make a Linux executable:</p> <p style='margin-top:5.05pt;margin-right:0in;margin-bottom:0in;margin-left: .5in;margin-bottom:.0001pt;text-indent:-.25in'>·&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span class=SpellE><span class=GramE>shellutilFake.c</span></span><span class=GramE> :</span> Fake some helper functions for the shell </p> <p style='margin-left:.5in;text-indent:-.25in'>·&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span class=SpellE><span class=GramE>blockFake.c</span></span><span class=GramE> :</span> Uses a UNIX file as a disk </p> <p>You can test your code on <span class=SpellE>linux</span> by typing &quot;make <span class=SpellE>lnxsh</span>&quot; and executing &quot;<span class=SpellE>./lnxsh</span>&quot; on <span class=SpellE>linux</span>. This program will read/write to a file called &quot;disk&quot;. &nbsp;&quot;<span class=GramE>make</span> all&quot; will produce the broken image.</p> <h3>Test Cases</h3> <p class=MsoNormal>A test script will be provided that you can use to test your file system. You will also write your own test cases and submit these with your code.</p> <h2><span style='mso-fareast-font-family:"Times New Roman"'>Design Document<o:p></o:p></span></h2> <p>You will submit a design document with your final code in lieu of the typical design review. In the design document you need to provide details about the design of your file system. Since we will not go through the design document with you, you should provide a comprehensive and concise design description. Your document should contain at least the following sections:</p> <p style='margin-left:66.0pt;text-indent:-30.0pt;mso-list:l0 level1 lfo4'><![if !supportLists]><span style='mso-fareast-font-family:"Times New Roman"'><span style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>Overall file system layout</p> <p style='margin-left:66.0pt;text-indent:-30.0pt;mso-list:l0 level1 lfo4'><![if !supportLists]><span style='mso-fareast-font-family:"Times New Roman"'><span style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>Super block</p> <p style='margin-left:66.0pt;text-indent:-30.0pt;mso-list:l0 level1 lfo4'><![if !supportLists]><span style='mso-fareast-font-family:"Times New Roman"'><span style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span class=SpellE>Inodes</span></p> <p style='margin-left:66.0pt;text-indent:-30.0pt;mso-list:l0 level1 lfo4'><![if !supportLists]><span style='mso-fareast-font-family:"Times New Roman"'><span style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>Free block data structure and management</p> <p style='margin-left:66.0pt;text-indent:-30.0pt;mso-list:l0 level1 lfo4'><![if !supportLists]><span style='mso-fareast-font-family:"Times New Roman"'><span style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>Link/Unlink implementation (how you did it)</p> <p>The design document should be in PDF format. If what you are describing is best explained with a diagram, please create one (or more).</p> <h2>Grading</h2> <p>Design Document (5 points)</p> <p>Provided Test Cases (10 points): The test script and its expected output (also to be provided) will be used to evaluate your implementation</p> <p>Your Test Cases (2 points): Please indicate the purposes and expected results</p> <p>TA Test Cases (2 points): We will run our own test cases on your implementation</p> <p>Code Clarity (1 point): Is it readable?</p> 20 points total <h2><span style='mso-fareast-font-family:"Times New Roman"'>Submission<o:p></o:p></span></h2> <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='mso-fareast-font-family:"Times New Roman";color:windowtext'><a href="https://dropbox.cs.princeton.edu/COS318_F2012/Final_Project_-_File_System">Submit via Dropbox</a><o:p></o:p></span></p> </div> </body> </html>