8.5 Applications of simulation

 < Free Open Study > 



8.5 Applications of simulation

To illustrate the use of simulation a few example problems are given and models developed in the Slam II simulation language. The first example is an industrial plant with five stations building a production in assembly line fashion. The problem can be viewed in Figure 8.16.

click to expand
Figure 8.16: Assembly line example.

The plant takes in subassemblies and finishes them off in five steps. There is storage room at the beginning of the line, but once in the line a maximum of one unit per station is possible. The statistics we wish to determine are workstation utilization, time to process through stations, number of units waiting, and total produced. The resulting Slam network is shown in Figure 8.17. The resultant code would allow us to examine the items of interest without causing any loss of detail from the intended model.

click to expand
Figure 8.17: Slam II network model for the assembly line problem.

A second, more detailed example shows how simulation can be used to model a distributed database management system. The model is shown in Figure 8.18. Depicted is the process or servers in a node that services user database transactions. Users provide requests, and the operating system services them by pipelining the database requests to the transaction manager, which, in turn, provides reduced requests to the network database server, which determines where the actual access is to be performed. The local site chosen then accesses the information from the appropriate device. The details at each level were commensurate with the intended model. The queues were all modeled as events and then the code necessary to simulate them was developed. This simulation is being used to analyze optimization algorithms for distributed database systems. The Slam network is shown in Figure 8.19.

click to expand
Figure 8.18: Queuing model of a distributed database system.

click to expand click to expand
Figure 8.19: Slam II network simulation model for a distributed database system.

8.5.1 The simulation program

The simulation program constitutes the realization of the simulation model. It is constructed as a modular software package allowing for the interchanging of simulated database management components without causing undue stress to the other components of the model. The simulation program is composed of a set of Slam II network statements and detailed discrete event code (similar to GASP IV), which model the major computational aspects of a distributed database management system, as previously defined. To provide the capability to model a wide range of topologies and database management architectures, the model is driven by a set of information tables that hold characteristics of the network topology and communications, location of the data items, the contents of the data items, and statistics of use. The Slam II network code to realize this model is shown in Figure 8.20. This code clearly depicts the major components of the simulation program. Additionally, note that the EVENT 5 shown indicates that the particular node is not a simple queue representation; it also indicates a drop in detail into discrete event simulation code. Such events allow for greatly expanding the details of the aspect of the model.

start figure

This is a list of the activities in the network

 1 Enter to OPSYS 2 OPSYS to DML 3 OPSYS to User 4 Optimize to LDBM 5 Optimize to User 6 NWDBM to DML 7 LDBM to memory 8 LDBM to disk 9 LDBM to tape 10 LDBM to DLOC 11 Memory to RLDBM 12 disk to RLDBM 13 Tape to RLDBM 14 RLDBM to LDBM 15 DLOC to NWDBM 16 DLOC to REQN 17 REQN to NWDEL 18 NWDEL to NWDBM 19 DML to NWDBM 20 DML to OPSYS 21 NWDBM to Optimize 22 NWDBM to User 23 LDBM to REQN 24 NWDBM to User 

The following statements are network input statements:

 Gen, P. Fortier, DBMS Queue SIMPROG, 5,22,2002,1; Limits, 10,20,500; Stat,1,hits on directory, 10,1.,1.; Stat,2 hits on dictionary, 10,1.,1.; Stat,3,processing time,20,0.,10.; Stat,4,remote time, 10,0.,.05; Stat,5,failure rate,10,1.,1.; Stat,6,optimizer time, 10,0.,10.; Stat,7,Optimizer algorithm delay, 10,0., 10.; Stat,8,parsing delay, 10,0.,.0015; Stat,9,illegal operations, 10,1., 1.; Stat,10, translate delay, 10,0.,.01; Stat,11,dictionary search, 10,0.,.00002; Network Resource/Opsproc(1),6; Resource/DMLproc(1),7; Resource/Netproc(1),8; Resource/Optproc(1),9; Resource/Locproc(1),10; Tape queue(4); act/13,,,RLDBM; Mem queue(2); act/11,XX(5),,RLDBM; Disk queue(3); act/12,XX(6),,RLDBM; RLDBM GOON; Request LDBM act/14,,,LDBM; DLOC Free, locproc/1; act; goon; act/15,,atrib(8).eq.15, NWDBM ret route, local source act/16,0.02,atrib(8).eq. 16; ret route, remote source reqn goon; act/17,0.02; NW DEL queue(5); Network delay act/18,0.03,,NWDBM user colct,int(1), tim in sys, 40,0.,10.; act/20; terminate; endnetwork; init,0; fin; Enter, 1; act/1; Opsys await(6),opsproc/1; event, 1; operating system act,XX(1); free, opsproc/1; act/3,,atrib(7).eq.3,user; service completed act/2,,atrib(7).eq.2; DML await(7),DMLproc/1; event,4; act,atrib(5); free, DMLproc/1; act/20,,atrib(7).eq.20,opsys service completed act/19,,atrib(7).eq.19,NWDBM; NWDBM await(8), Netproc/1; event,2; Network database manager act, XX(2); free, Netproc/1; act/6,,atrib(7).eq.6.DML processing completed act/22,,atrib(7).eq.22,user; data doesn't exist act/21,,atrib(7).eq.21; optim await(9), optproc/1; event,3; Query optimization act,XX(3); free, optproc/1; act/4,,atrib(7).eq.4.0and atrib(4).eq.0,WLDBM; act/26,,atrib(7).eq.4 and atrib(4).eq.1,LDBM; act/5,,atrib(7).eq.5, user; illegal query WLDBM await(10), locproc/1; LDBM event,5; local database manager act/7,XX(4),atrib(7).eq.7 or atrib(7).eq.78, mem; act/8,XX(4),atrib(7).eq.8 or atrib(7).eq.78, disk; act/9,999999,atrib(7).eq.10,DLOC; act/23,,atrib(7).eq.23,REQN; 

end figure

Figure 8.20: Slam II network model code.



 < Free Open Study > 



Computer Systems Performance Evaluation and Prediction
Computer Systems Performance Evaluation and Prediction
ISBN: 1555582605
EAN: 2147483647
Year: 2002
Pages: 136

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net