Software Design Document for Secret Simulation

This document provides a comprehensive design outline for a software application used in secret simulations.

Olivia Smith
Contributor
4.0
31
5 months ago
Preview (9 of 27 Pages)
100%
Purchase to unlock

Page 1

Software Design Document for Secret Simulation - Page 1 preview image

Loading page image...

Software Design DocumentforSecret SimulationProgrammingAssignment 1Monday, July 6, 2015Prepared ByDomicia N. Herringdnh0004@cs.uah.eduPrepared ForDr. Rick Coleman, InstructorCS 221, Data Structures in C++Computer ScienceDepartmentUniversity of Alabama in HuntsvilleFor the "Secret Simulation" system outlined in the Software Design Document, describe thearchitecture and functionality of the 3Q (three queues) Abstract Data Type (ADT). Specifically,explain how each of the five commands (C1, C2, C3, C4, C5) interacts with the queues and how

Page 2

Software Design Document for Secret Simulation - Page 2 preview image

Loading page image...

Page 3

Software Design Document for Secret Simulation - Page 3 preview image

Loading page image...

they are processed. Additionally, discuss how the queues facilitate the simulation's tasks andtheir importance in the broader system.Your response should be no longer than 500 words.Word count requirement:500 words

Page 4

Software Design Document for Secret Simulation - Page 4 preview image

Loading page image...

Table of Contents1.0 System Overview............................12.0 Referenced Documents.......................13.0 Architectural Design.......................13.1 Concept ofExecution...................13.2 Abstract Data Type.....................13.3 Code Outline...........................24.0 Detailed Design............................24.1 Source File: main.cpp..................24.2 Source File: ToDoList.cpp..............3AppendicesA. Sample Screen Display......................7

Page 5

Software Design Document for Secret Simulation - Page 5 preview image

Loading page image...

Software Design DocumentSecretSimulation1.0 System OverviewA secret government agency has need of a special Abstract Data Type (ADT) for use in aBasically Secret Simulation (BSS). The ADT may be thought of abstractly as three queues (3Qs).The 3Qs each can hold the same type of data structure. Commands at regular time intervals(CARTI) will be sent to this portion of the BSS. Command one (C1) will be to dynamicallycreate a data structure (DCDS), place into the data structure information to be supplied (TBS),and enqueue it into the first queue (Queue A). Command two and three (C2 and C3) will be todequeue a structure from Queue A and immediately enqueue it into Queue B (C2) or Queue C(C3). Command four and five (C4 and C5) will be to dequeue and destroy a structure from eitherQueue B (C4) or Queue C (C5). Details of this functionality are given in section 2.0. As usualshould you or any of your programming team divulge even the smallest bit of information aboutthis BSS we will have to shoot you.2.0 Referenced DocumentsProgramming Assignment 1Statement of Work.Dale, Nell and Teague, David,C++ Plus Data Structures2nd ed. 2001.“Programming Assignment 2 Hints” web page,http://cs.uah.edu/~rcoleman/CS221/ProgAssign/cs221Prog2Hints.html3.0 Architectural Design3.1 Concept of ExecutionForfthefhigh-levelfdesign,fafcall-returnfarchitecturefhasfbeenfspecifiedfusingfstructurefcharts.fForfproceduralfdesign,fthefhigh-levelfdesignfmodulesfhavefbeenfexplainedfusingfPDL.TheSchedulerfarchitecturefisfasffollows:

Page 6

Software Design Document for Secret Simulation - Page 6 preview image

Loading page image...

Theffileserverfstoresfthefworkspacesfoffallfprocesses,fasfwellfasfthefbinaryfexecutablesfoffthefschedulerfitself.fCommunicationsfdaemonsf(commd)farefrunningfonfeachfoffthefhostfonfafspecifiedfTCPfportf(786),fandfformfthefmeansfoffcommunicationfbetweenfhosts.fExecutionfhostsfcontainfexecutionfqueues,feachfwithftheirfownfschedulingfpolicies,fonfwhichfjobsfarefsentftofexecute.fThefmasterfhostfcontainsfthefcentralfqueuefmanagingfdaemon,fqmaster,fandfthefschedulingfdaemon,fwhichfmakesfthefactualfschedulingfdecisionsfregardingfwhichfjobfisftofbefassignedftofwhichfexecutionfqueue.fSubmitfhostsfarefthefentry-pointsfforfthefusers.fAfsubmitfhostfsubmitsfjobsfusingfthef‘qsub’fcommand,fwhichfsubmitsfthefjobfalongfwithfitsfcorrespondingfdetailsftofthefmasterfhost.fThefmasterfhostfsummonsfthefscheduler,fwhichfhasfaccessftofthefQueuefStatefTablefwhichfinfturnfcontainsfinformationfonfeachfoffthefexecutionfhosts.fBasedfonfthefschedulingfalgorithmfimplementedfviaffthefschedulerfwillfchoosefanfexecutionfqueue,fwhichfthefqmasterfwillfsubsequentlyfdispatchfthefjobfto.fQMonitorffJobfControlf(PendingfJobs)Oncefafjobfisfsubmitted,fitfgoesftofthefmasterfhostfwhichfplacesfitfinfthefpendingfjobsfqueue.fOncefthere,fitsfID,fPriority,fName,fOwner,fStatusfandfQueuef(tofwhichfitfwillfbefsent)farefstoredfuntilfthefjobfisfactuallyfdispatchedftofthefqueue.fEveryfjobfinitiallyfgoesftofthefpendingfqueuefwhilefthefschedulingfdaemonfrunsfthefselected

Page 7

Software Design Document for Secret Simulation - Page 7 preview image

Loading page image...

fschedulingfalgorithmftofdeterminefthefexecutionfqueueftofwhichfthefjobfisftofproceed.fOncefthisfisfdone,fthefjobfgoesfintofthefRunningfJobsftabf(notfshownfinfthefscreenfimages),fafterfwhichfitfendsfupfinftheffinishedfjobsfqueue.This program will be a simple command line application with a text only interface. Whenstarted the application will display the title and copyrightinformation on the applicationand instructions on its use. When the user presses any key the screen will be cleared thenthe application will enter its main execution loop.In the main execution loop the main menu will be displayed (see Appendix A for diagramof the main menu). The user will be asked to enter a number corresponding to his/herchoice of actions from the main menu. That action will then be executed. This willcontinue until the user selects theQuitoption at which time the application will exit themain execution loop and terminate.3.2 Abstract Data TypeThe task list will be implemented as a linked list with all list functions and data stored ina single C++ class to be called ToDoList.3.3 Code OutlineThis program will consist of the following files:Prog1Class.cpp-This file will instantiate an instance of the ToDoList class, implementthe user interface, and handle all interactions between the user andthe ToDoList object.Thisfwindowflistsfthefcurrentlyfconfiguredfqueuesfforfthefexecutionfhostsfinfthefcluster.fInfthefabovefexample,fexecutionfhostsfmspc29fandfmspc36feachfhavefafqueuef(calledf‘q’)frunningfonfeachfoffthem,fandfeachfoffthesefqueuesfhasf0foutfoffafmaximumfoff1fjobfrunningfonfthem.fFurther,fmorefqueuesfmayfbefaddedftofthefspecifiedfexecutionfhosts,fandfexistingfqueuesfmayfbefmodifiedforfdeleted.Class: Prog1Class.h and Program1Class.cpp

Page 8

Software Design Document for Secret Simulation - Page 8 preview image

Loading page image...

1.Void setIntVal(int val)Stores a single argument value in the membervariable m_iVal2.Void setDoubleVal(double val)Stores a single argument value in themember variable m_dval3.Void setStringVal(char*val)Stores a char array string single argumentin the member variable m_sLine4.Void setStructVals(in arg1, double arg2, char*arg3)Thisfisfthe classffromfwhichfqueuefconfigurationsfmayfbefchanged.fForfinstance,fdifferentfload/suspendfthresholds,fwhichfspecifyfthefceilingfoffmaximumfallowedfloadfforfthefqueue,fbeyondfwhichfitfwillfbeginftofsuspendfjobsfrunningfonfitftillfthefthresholdfisfsatisfied.fAlso,fcomplexesfmayfbefattachedforfdetachedffromfthefqueue,fmakingfqueuesfcaterftofdifferentfresourcefrequirementsf(infourfcase,fdeadlinefandfbudget).fCheckpointingf(thefprocessfoffsavingfthefcurrentfstatusfoffanyfjob,fforflaterfrestarting,forfforfjobfmigration)fcanfalsofbefconfiguredfforfeachfqueuefindividually,ftofsetfthefconditionsfunderfwhichfcheckpointingfand/orfjobfmigrationfoccur.fUserfaccessfspecifiesfwhichfusers/hostsfareftofbefgivenfaccess,fandfwhichfareftofbefdenied.fSubordinatesfincludesfthosefqueuesfthatfareftoffollowfsuitfwithfwhateverfinstructionsfarefsentftofthisfqueue;fforfinstance,fiffafqueuefisfsuspended,fthenfitsfsubordinatesfwillfbefsuspendedfasfwell.fLimitsfspecifiesfthefhardforfsoftflimitsfimposedfonfjobsfrunningfonfthefqueuef(forfexample,fnofjobfmayftakefmorefthanf10fminutesfoffCPUftime,fotherwisefitfisftofbefsuspendedforfkilled).1.4.0 Detailed Design

Page 9

Software Design Document for Secret Simulation - Page 9 preview image

Loading page image...

4.1 Source File: ProgXMain.cpp4.1.1 Function: main()4.1.1.1 PurposeThis function will control thedisplay of all screens and the user interface.Infthisfwindow,fhostsfarefconfigured.fThefthreeftypefoffhostsfrecognizedfarefAdministration,fSubmit,fandfExecutionfhosts.fAdministrationfhostsfarefthosefhostsfthatfarefallowedftofviewfandfeditfthefconfigurationfforfthefclusterfasfafwhole,fforfhostsfindividually,fforfqueuesfwithinfspecificfhosts,fasfwellfasfforfjobsfrunningfonfspecificfqueues.fSubmitfhostsfarefthosefthatfarefallowedftofsubmitfjobsfintofthefcluster.fExecutionfhostsfarefthosefthatfhavefatfleastfonefqueuefsetfupfwherefjobsfscheduledfbyfthefclusterfmayfbefsentftofactuallyfexecute.f4.1.1.2 Argumentsint argc--standard argument to main()giving the number of command linearguments. Not used.char **argv--standard argument to main(). Pointer to an array of pointes to charlisting the command line arguments. Not used.4.1.1.3 Return valueThe function returns an int. Using standard programming procedure the value ofzero will be returned to indicate to the operating system normal termination of theprogram without error.4.1.1.4 Function outline in pseudocodeInstantiate a ToDoList object and other variables as neededPrint program title and instructionsPrint prompt to user requesting "Press any key to continue."Input key pressClear screenBegin Loop
Preview Mode

This document has 27 pages. Sign in to access the full document!

Study Now!

XY-Copilot AI
Unlimited Access
Secure Payment
Instant Access
24/7 Support
Document Chat

Document Details

Related Documents

View all