i have added an attachment

1 answer below »

i have added an attachment







iProject2 OperatingSystems CMPT424●Fall2022 OSiProject 2 © 2008-2112 Alan G. Labouseur, All Rights Reserved Page of 1 3 Goals TobuildonthefunctionalityfromiProjectOne(allofwhichisrequired)byaddingtheability toloadandexecuteoneuserprogramin256bytesofmemoryasspeciGiedbythe6502aop codesdocumentedonourclasswebsite. Func*onal Requirements Modifytheloadcommandtocopythe6502amachinelanguageopcodes intomainmemory. • Putthecodeatlocation$0000inmemory • assignaProcessID(PID) • createaProcessControlBlock(PCB) • returnthePIDtotheconsoleanddisplayit. Addashellcommand,run ,torunaprogramalreadyinmemory. Note:theusershouldbeabletoexecutemanyload/runcyclesinsequence. Executetherunningprogram(includingdisplayingmemory,CPU,andPCB statusaswellasanyoutput).BesuretosynchronizetheCPUexecution cycleswithclockticks. Astheprogramsexecutes,updateanddisplaythememory,PCB,andCPU status(programcounter,instructionreg,accumulator,Xreg,Yreg,ZGlag) inrealtime. Implementline-wrapintheCLI.(Thisisnotlongeroptional.) [challenge]Providetheabilitytosingle-stepexecution(viaGUIbuttons). [challenge]AllowtheusertobreakthecurrentprogramwithCtrl-C. [10points] [3points] [30points] [5points] [2points] [+8points] [+4points] Implementa*on Requirements DevelopaPCBprototypeandimplementitintheclientOS. DevelopamemorymanagerandimplementitintheclientOS. DevelopacorememoryprototypeandimplementitinthehostOS. DevelopamemoryaccessorprototypeandimplementitinthehostOS. DevelopaCPUprototypeandimplementitinthehostOS. Yourcodemustseparatestructurefrompresentation,beprofessionally formatted,useanddemonstratebestpractices,andgenerallymakeme proudtobeyourteacher. ContinuetopreserveGLaDOS.Thereisstillaneurotoxincanisternextto whatlookslikeanincineratedmoralitycore.(Isthatimportant?) [5points] [10points] [10points] [10points] [15points] [−∞ifnot] General Hints ConsiderrefactoringthehostOScodeintoatafewparts:events,interrupts,andservices. ImplementthehostcorememoryandCPUasaseparateobjectsandseparatesourcecode Gileswithinthehostdirectory. Runallaccessestomemorythroughyourhostmemoryaccessorsoitcandoaddress translationsonthenextproject. Readchapter4upto“Paging”inourtext.Itpresentsanicelookatmainmemorythatyou mightGindhelpful. Remembertheutilityofcommentsandhowmuchtheirpresenceandqualityaffectmy opinionofyourwork.Seriously.Badcodestylewillcostyouatonofpoints. iProject Two - 100 points OperatingSystems CMPT424●Fall2022 OSiProject 2 © 2008-2112 Alan G. Labouseur, All Rights Reserved Page of 2 3 Specific Hints • Continuetokeep.jsand.tsGilesinseparatedirectories. • Theshutdownfunctionalitymustoperateproperlyevenwhenaprogramisrunning. • ThememoryandCPUdisplaysmustupdateinrealtime.ThePCBneedstoupdateonly onschedulingevents,whichinthisprojectareonlywhenexecutionbeginsandends. • RememberthatyoumustcontinuetoprocessinterruptswhiletheCPUisexecuting. • Alwaysseparatelogicandstructurefrompresentation.DonotputGUIlogicinyour CPUormemoryroutines.KeeptheGUIstuffincontrol.tsorsomethingsimilar. • AsIwarnedyouinclass,it’seasytomixupbase10andbase16.Doublecheckallofthat. • Youarealmostguaranteedtomakeanoff-by-oneerrorimplementingorexecutingthe BNEoperation.Embraceit.ThenGixit. • Neverusemagicnumbers.Useconstantsforeverythingotherthan0,1,and∞. Very Specific Hints FollowtheCPUexamplewhenimplementingmemory. Inthemaindirectory: Declareglobally... //Hardware(host) var_CPU:TSOS.CPU; var_Memory:TSOS.Memory; var_MemoryAccessor:TSOS.MemoryAccessor; //Software(OS) var_MemoryManager:any=null; Inthehost/directory,put: cpu.ts memory.ts memoryAccessor.ts Inthehardwarecontrolcode: _CPU=newCpu(); _CPU.init(); _Memory=newMemory(); _Memory.init(); _MemoryAccessor=newMemoryAccessor(); IntheOS/directory,put: memoryManager.ts Inthekernelbootstrapcode: _MemoryManager=newMemoryManager(); SubmiFng Your Work UpdateGitHubwithyourcurrentcodeandletmeknowthatit’sreadyformetograde(and whichbranchtograde). OperatingSystems CMPT424●Fall2022 OSiProject 2 © 2008-2112 Alan G. Labouseur, All Rights Reserved Page of 3 3
Answered 6 days AfterSep 26, 2022

Answer To: i have added an attachment

Jahir Abbas answered on Oct 03 2022
55 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here