Mesquite Software Home
Products / FAQ
Customers
To Order
Contact Us
Site Map
Documentation
News / Events
News & Events

Mesquite Software Newsletter

Volume 8 - Spring 2008

Newsletter Contents
Introduction
Special Offer - Cheaper by the Double: Second CSIM 50% Off (and free tshirt with CSIM purchase)
Tech Tip - Globals, Locals, and Permanent Tables
Sneak Peek: CSIM 20! Now available through limited Beta program
Download Free Evaluation Version of CSIM for Java
SimuTools 2008 Conference Highlights

Greetings, CSIM Enthusiasts!

We hope this newsletter finds you well and your programs running fast and bug-free!

All is well here in Austin. We're getting our feet back on the ground after a successful (and enjoyable) trip to Marseilles for SimuTools 2008 and various other adventures in travel and software alike. Our big news is that CSIM 20 is now available through a limited Beta program!

In addition, we have a new special offer for you this spring - keep reading to learn more. This newsletter also features a Tech Tip from Dr. Herb Schwetman detailing the differences between CSIM's GLOBAL and LOCAL variables and Permanent Tables, a sneak peek at CSIM 20's new features (think 64-bit!), and conference highlights from SimuTools 2008.

return to top


Special Offer - Cheaper by the Double!

From now until August 31, we have a special deal for CSIM users who have current Extended Support agreements. If you already have CSIM (or are just now buying it together with Extended Support), you can purchase a second copy at 50% off!

And, with any CSIM purchases made between now and August 31, we'll send you a free t-shirt!

Please contact Mesquite directly to take advantage of this special offer.

return to top


Tech Tip - GLOBALs, LOCALs, and PERMANENT Tables
by Dr. Herb Schwetman

Occasionally we receive questions from users on topics of interest to the CSIM community. CSIM's founder, Dr. Herb Schwetman, will answer select questions in this newsletter and by email. If you would like to submit a question for Herb, please email him at hds@mesquite.com.

What is the difference between GLOBAL, LOCAL and PERMANENT Tables?

As you will recall, CSIM processes are at the heart of every CSIM model. One property of a CSIM process is that when a process terminates, all of its "local storage" (that is, storage located in the stack frame for the process) is released. Thus, if a CSIM event or mailbox is instantiated within the context of a process and is using local storage, that object (or the pointer to that object if it is a dynamic object) will disappear when the process terminates. In the remainder of this note, we use the term "object" to refer to an event or a mailbox.

Now, if a process instantiates a dynamic object and if the pointer to that object is a global variable (that is, not local), or if the pointer value has been passed to another process, then the pointer to the object will survive after the instantiating process has terminated; even so, the local object will still be deleted when the instantiating process terminates. Thus, there are two possible desirable cases: (1) a process terminates and its local objects or pointers to local objects should be deleted (this is the default behavior) and (2) a process terminates and some of its local objects should survive (in other words, not be deleted).

Unfortunately, the CSIM runtime support routines cannot determine which of these two cases you want to implement. For this reason, CSIM adopts the convention that all events and mailboxes instantiated in the context of the first process instantiated as the model executes (process #1, often named "sim") are GLOBAL, and all events and mailboxes instantiated by any other process are LOCAL. GLOBAL objects (events and mailboxes) survive when the instantiating process terminates and LOCAL objects are deleted (disappear) when the instantiating process terminates.

In contrast, facilities, storages, buffer, tables, qtables, meters and boxes are always GLOBAL, even if they are instantiated in processes other than the first process.

But what if you need to have events and mailboxes instantiated as LOCAL even if they are not created by the first process? In these cases, an event or a mailbox instantiated in a process needs to survive the termination of that process. Such a case could arise when a process passes a pointer to an event in a message sent to another process or when a process passes a pointer to an event as an argument when a process is invoked. In these situations, the object can be instantiated explicitly as a GLOBAL object. For an event, the code for a C model is as follows:

	EVENT ge;
	ge = global_event("name");
In C++, the code would look like this:
	global_event *ge;
	ge = new global_event("name");
Here’s an example of using a global_event in C++:
	void process()
	{
		global_event *myEv;
		create("proc");
		myEv = new global_event("myEv");
		subProc(myEv);
	}  

In this example, if myEv had been a "normal" or LOCAL event, when the process terminated, myEv would be deleted and any future references to myEv would probably cause the program to abort, which is not the desired behavior. Thus, we use a global_event (a specific type of object) to force the desired behavior. A global_mailbox is specified in, and behaves in, exactly the same way as a global_event.

Now, in a much different situation, a model can be run (or executed) several times, using the rerun() function. When rerun() is called, the entire model is destroyed, and the program can then either rebuild that model or possibly construct a new model. As an example, the correct sequence of statements to use the rerun() function is as follows (in C++):

	extern "C: void sim()
	{
		int i;
		init();
		for(i = 0; i < numRuns; i++) {
			create("sim");
			initRun(i);
			.....
			report();
			rerun();
		}
	}

In some cases, it is desirable to have a table record the value of a statistic from each individual run. A permanent_table provides this capability. In other words, a permanent_table survives the call to the rerun() function. As an example of using a permanent_table (in C++):

	permanent_table *responseAll;
	table *responseRun;
	...
	extern "C" void sim()
	{
		int i;

		responseAll = new permanent_table("respAll");
		for(i = 0; i < numRuns; i++) {
			create("sim");
			responseRun = new table("respRun");
			initRun();
			...
			responseAll->record(responseRun->mean());
			rerun();
		}
		printf("overall mean = %.3lf\n", responseAll->mean());
	}

In this example, the permanent_table responseAll records the mean from each individual run and the mean from this table is the mean of the means from the individual runs.

In summary, a LOCAL object is destroyed when the instantiating process terminates; a GLOBAL object survives when the instantiating process terminates; and a permanent_table survives all calls to the rerun() function. It is all about survival.

return to top


Sneak Peek: CSIM 20!

You can now preview CSIM 20 through a limited Beta program. Some of its major features include:

  • Native 64-bit version of CSIM library
  • Optimized core routines
  • Additional Process classes for Storage, Buffer, Event, and Mailbox objects
  • Improvements to Facilities, Mailboxes, Random Number generation, and many other objects and functions

Please contact Mesquite if you'd like to participate.

return to top


Download Free Evaluation Version of CSIM for Java!

Have you been waiting to try out CSIM for Java? Now you can download a free evaluation version and don't have to wait for a CD! You can request a free evaluation copy online and download both CSIM for Java and CSIM 19. Of course, if you prefer a CD, you always have that option.

You can also find a complete set of CSIM for Java documentation online.

return to top


SimuTools 2008 Conference Highlights

I recently served as co-chair of the Technical Program Committee for the Industry Track for the SimuTools 2008 Conference, held in Marseilles, France, March 4 - 6. This conference focused on simulation tools for the communications and computer systems areas.

The Industry Track featured presentations covering applications of simulation tools. Two of the tools presented were OMNeT++ and NS3, both of which target simulating computer/communications networks. These two packages are application-oriented modeling packages, designed specifically to meet the simulation needs of particular applications (in contrast to CSIM, which is a general purpose simulation toolkit). Tom Henderson, an associate Technical Fellow at Boeing and an Affiliate Professor at the University of Washington, served as one of the keynote speakers. Tom, who is widely recognized as one of the leaders in the NS-3 (open source networking simulation) community, spoke about how to improve simulation credibility through open source simulators.

Another interesting keynote speaker was Prof. Richard Fujimoto, of Georgia Tech. Richard is well-known for his research in distributed and parallel simulation models. His keynote talk addressed ad hoc distributed simulations and included an insightful example of simulating transportation (roadways) near the campus of Georgia Tech. In a panel discussion, he talked about the need to develop better ways of exploiting multi-core and multi-thread processors for executing simulation models.

I presented a paper in the Industry Track titled, "A Simulation Model of a Database Management System." My paper discussed using CSIM to model a database management system. The paper presented some of the issues that must be addressed when creating an accurate model of a DBMS, including modeling the behavior of the data cache, modeling index file accesses, modeling locks and modeling transactions.

In summary, the conference presented interesting keynote talks and useful papers that addressed the state of the art in simulation-based tools and techniques… and you can't beat the French Riviera location. Consider SimuTools 2009 in Rome in your plans for next year, and keep an eye out for the 2009 call for papers, which will appear on the SimuTools 2009 website this summer.

- Herb

 

Mesquite Software would love to hear your questions, thoughts, and comments - send us an email or give us a call!

Best regards,

Nan Schwetman, President
Mesquite Software, Inc.
8500 North MOPAC, Suite 825
Austin, TX 78759, USA
Tel: (800) 538-9153 (US) or +1 (512) 338-9153
Fax: +1 (512) 338-4966
E-mail: nhs@mesquite.com
www: www.mesquite.com

This newsletter is sent to our user community and interested parties by Mesquite Software. You may subscribe by visiting: www.mesquite.com/newsletter/signup.html