Skip to content
Solved Assignments

Software Design Document for Secret Simulation

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

Preview 9 of 27 pages

See the first 9 pages exactly as they appear in the document.

  1. Page 1
    Read page 1 as text

    Software Design Document for Secret Simulation Programming Assignment 1 Monday, July 6, 2015 Prepared By Domicia N. Herring dnh0004 @cs.uah.edu Prepared For Dr. Rick Coleman, Instructor CS 221, Data Structures in C++ Computer Science Department University of Alabama in Huntsville For the "Secret Simulation" system outlined in the Software Design Document, describe the architecture 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

  2. Page 2
  3. Page 3
    Read page 3 as text

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

  4. Page 4
    Read page 4 as text

    Table of Contents 1.0 System Overview............................1 2.0 Referenced Documents.......................1 3.0 Architectural Design.......................1 3.1 Concept of Execution...................1 3.2 Abstract Data Type.....................1 3.3 Code Outline...........................2 4.0 Detailed Design............................2 4.1 Source File: main.cpp..................2 4.2 Source File: ToDoList.cpp..............3 Appendices A. Sample Screen Display......................7

  5. Page 5
    Read page 5 as text

    Software Design Document Secret Simulation 1.0 System Overview A secret government agency has need of a special Abstract Data Type (ADT) for use in a Basically 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 dynamically create 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 to dequeue 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 either Queue B (C4) or Queue C (C5). Details of this functionality are given in section 2.0. As usual should you or any of your programming team divulge even the smallest bit of information about this BSS we will have to shoot you. 2.0 Referenced Documents • Programming Assignment 1 Statement of Work. • Dale, Nell and Teague, David, C++ Plus Data Structures 2nd ed. 2001. • “Programming Assignment 2 Hints” web page, http://cs.uah.edu/~rcoleman/CS221/ProgAssign/cs221Prog2Hints.html 3.0 Architectural Design 3.1 Concept of Execution For f the f high - level f design, f a f call - return f architecture f has f been f specified f using f structure f charts. f For f procedural f design, f the f high - level f design f modules f have f been f explained f using f PDL. The Scheduler f architecture f is f as f follows:

  6. Page 6
    Read page 6 as text

    The f fileserver f stores f the f workspaces f of f all f processes, f as f well f as f the f binary f executables f of f the f scheduler f itself. f Communications f daemons f (commd) f are f running f on f each f of f the f host f on f a f specified f TCP f port f (786), f and f form f the f means f of f communication f between f hosts. f Execution f hosts f contain f execution f queues, f each f with f their f own f scheduling f policies, f on f which f jobs f are f sent f to f execute. f The f master f host f contains f the f central f queue f managing f daemon, f qmaster, f and f the f scheduling f daemon, f which f makes f the f actual f scheduling f decisions f regarding f which f job f is f to f be f assigned f to f which f execution f queue. f Submit f hosts f are f the f entry - points f for f the f users. f A f submit f host f submits f jobs f using f the f ‘qsub’ f command, f which f submits f the f job f along f with f its f corresponding f details f to f the f master f host. f The f master f host f summons f the f scheduler, f which f has f access f to f the f Queue f State f Table f which f in f turn f contains f information f on f each f of f the f execution f hosts. f Based f on f the f scheduling f algorithm f implemented f via ff the f scheduler f will f choose f an f execution f queue, f which f the f qmaster f will f subsequently f dispatch f the f job f to. f QMonitor f – f Job f Control f (Pending f Jobs) Once f a f job f is f submitted, f it f goes f to f the f master f host f which f places f it f in f the f pending f jobs f queue. f Once f there, f its f ID, f Priority, f Name, f Owner, f Status f and f Queue f (to f which f it f will f be f sent) f are f stored f until f the f job f is f actually f dispatched f to f the f queue. f Every f job f initially f goes f to f the f pending f queue f while f the f scheduling f daemon f runs f the f selected

  7. Page 7
    Read page 7 as text

    f scheduling f algorithm f to f determine f the f execution f queue f to f which f the f job f is f to f proceed. f Once f this f is f done, f the f job f goes f into f the f Running f Jobs f tab f (not f shown f in f the f screen f images), f after f which f it f ends f up f in f the f finished f jobs f queue. This program will be a simple command line application with a text only interface. When started the application will display the title and copyright information on the application and instructions on its use. When the user presses any key the screen will be cleared then the application will enter its main execution loop. In the main execution loop the main menu will be displayed (see Appendix A for diagram of the main menu). The user will be asked to enter a number corresponding to his/her choice of actions from the main menu. That action will then be executed. This will continue until the user selects the Quit option at which time the application will exit the main execution loop and terminate. 3.2 Abstract Data Type The task list will be implemented as a linked list with all list functions and data stored in a single C++ class to be called ToDoList. 3.3 Code Outline This program will consist of the following files: Prog1Class. cpp - This file will instantiate an instance of the ToDoList class, implement the user interface, and handle all interactions between the user and the ToDoList object. This f window f lists f the f currently f configured f queues f for f the f execution f hosts f in f the f cluster. f In f the f above f example, f execution f hosts f mspc29 f and f mspc36 f each f have f a f queue f (called f ‘q’) f running f on f each f of f them, f and f each f of f these f queues f has f 0 f out f of f a f maximum f of f 1 f job f running f on f them. f Further, f more f queues f may f be f added f to f the f specified f execution f hosts, f and f existing f queues f may f be f modified f or f deleted. Class: Prog1Class.h and Program1Class .cpp

  8. Page 8
    Read page 8 as text

    1. Void setIntVal(int val) – Stores a single argument value in the member variable m_iVal 2. Void setDoubleVal(double val) – Stores a single argument value in the member variable m_dval 3. Void setStringVal(char*val) – Stores a char array string single argument in the member variable m_sLine 4. Void setStructVals(in arg1, double arg2, char*arg3) – • This f is f the class f from f which f queue f configurations f may f be f changed. f For f instance, f different f load/suspend f thresholds, f which f specify f the f ceiling f of f maximum f allowed f load f for f the f queue, f beyond f which f it f will f begin f to f suspend f jobs f running f on f it f till f the f threshold f is f satisfied. f Also, f complexes f may f be f attached f or f detached f from f the f queue, f making f queues f cater f to f different f resource f requirements f (in f our f case, f deadline f and f budget). f Checkpointing f (the f process f of f saving f the f current f status f of f any f job, f for f later f restarting, f or f for f job f migration) f can f also f be f configured f for f each f queue f individually, f to f set f the f conditions f under f which f checkpointing f and/or f job f migration f occur. f User f access f specifies f which f users/hosts f are f to f be f given f access, f and f which f are f to f be f denied. f Subordinates f includes f those f queues f that f are f to f follow f suit f with f whatever f instructions f are f sent f to f this f queue; f for f instance, f if f a f queue f is f suspended, f then f its f subordinates f will f be f suspended f as f well. f Limits f specifies f the f hard f or f soft f limits f imposed f on f jobs f running f on f the f queue f (for f example, f no f job f may f take f more f than f 10 f minutes f of f CPU f time, f otherwise f it f is f to f be f suspended f or f killed). 1. 4.0 Detailed Design

  9. Page 9
    Read page 9 as text

    4.1 Source File: ProgXMain.cpp 4.1.1 Function: main() 4.1.1.1 Purpose This function will control the display of all screens and the user interface. In f this f window, f hosts f are f configured. f The f three f type f of f hosts f recognized f are f Administration, f Submit, f and f Execution f hosts. f Administration f hosts f are f those f hosts f that f are f allowed f to f view f and f edit f the f configuration f for f the f cluster f as f a f whole, f for f hosts f individually, f for f queues f within f specific f hosts, f as f well f as f for f jobs f running f on f specific f queues. f Submit f hosts f are f those f that f are f allowed f to f submit f jobs f into f the f cluster. f Execution f hosts f are f those f that f have f at f least f one f queue f set f up f where f jobs f scheduled f by f the f cluster f may f be f sent f to f actually f execute. f 4.1.1.2 Arguments int argc -- standard argument to main() giving the number of command line arguments. Not used. char **argv -- standard argument to main(). Pointer to an array of pointes to char listing the command line arguments. Not used. 4.1.1.3 Return value The function returns an int. Using standard programming procedure the value of zero will be returned to indicate to the operating system normal termination of the program without error. 4.1.1.4 Function outline in pseudocode Instantiate a ToDoList object and other variables as needed Print program title an d instructions Print prompt to user requesting "Press any key to continue." Input key press Clear screen Begin Loop

18 more pages in the full document

Unlock it once and it stays in your library, ready to chat with or turn into flashcards.

Unlock the full document
See all

Study this document with CramX

Once it is in your library, every tool can work from it.