The Moses Tool Suite

India
October 12, 2006 2:21am CST
The Moses Tool Suite — A Networking Tutorial Number 1.5 Jan Beutel, Simon K¨unzli Computer Engineering and Networks Laboratory (TIK) Swiss Federal Institute of Technology Zurich CH-8092 Zurich, Switzerland {beutel,kuenzli}@tik.ee.ethz.ch The Moses Project November 2003 Computer Engineering and Networks Laboratory Swiss Federal Institute of Technology (ETH) Zurich 1 Contents 1 Introduction 3 1.1 StartingMoses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2 The Concept of IEEE 802.5 Token Ring 5 2.1 IEEE 802.5 Bus Arbitration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3 Building a Simple Network Interface 7 3.1 Creating a Project Folder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.2 Creating the Core Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.3 Creating a Test Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.4 Testing and Animating the Core Component . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 4 Assembling and Simulating a Whole Network 13 4.1 Preparing a Network Node for Simulation Output . . . . . . . . . . . . . . . . . . . . . . . . . 13 4.2 Integrating PtPlot for GraphicalOutput . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 4.3 Setting up Data Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4.4 Setting up a Network of Four Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4.5 Testing and Animating the Token Ring Network . . . . . . . . . . . . . . . . . . . . . . . . . 16 4.6 Variation of Simulation Parameters and Interpretation . . . . . . . . . . . . . . . . . . . . . . 16 5 The Graph Editor Commands 17 5.1 The Tool Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 5.2 TheMenu Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 6 Conclusion 21 Date Section Who Changes Nov 1999 Initial Version 1.01 May 2001 JB, SK Revised for new repository structure Oct 2001 JB, SK New tutorial with token ring Nov 2002 4, 5 SK Incorporated student suggestions Nov 2003 SK Incorporated changes suggested by CP Table 1: Revision History 2 1 Introduction Moses is a rich and powerful modeling and simulation environment. Systems in Moses are modeled as cooperating components that can be written in a number of di?erent formalisms. The standard release of Moses supports the following three formalisms: Time Petri nets A high level Petri net augmented with time and container places; Process Networks A very generic form of Kahn’s process networks where nodes can contain instances of any component; Harel State Charts This hierarchical state machine formalism allows control oriented (sub) systems to be de?ned naturally. In addition the user can de?ne additional formalisms using the Graph Type Description Language (GTDL). How this is done is beyond the scope of this tutorial, however interested users are referred to the Moses user manual for further information. This tutorial describes how to start Moses followed by the creation and animation of a simple example based on a token ring network. 1.1 Starting Moses Moses is written in the Java 2 language and requires either the Java runtime environment (JRE), if only prede?ned models are to be viewed and animated or the Java software development kit (SDK), if models are also to be created. In this tutorial you will be shown how to create models using a number of di?erent formalisms and hence the Java SDK will need to be installed on your machine. To test whether you have the correct version of Java installed on your machine enter java -version. The version information returned should be greater than version 1.3.1. To ascertain whether the Java SDK is installed enter javac. If this command executes successfully, showing the possible options, then you have the prerequisites required to run Moses. To start Moses ?rst ensure that your current directory contains the moses.jar ?le and the demo.rep directory. Then in a terminal window enter: java -jar moses.jar -d demo.rep/ When Moses successfully starts the splash screen similar to that shown in ?gure 1 will appear. This will be followed by the Moses desk–top appearing. Figure 1: The Moses start-up splash screen 3 Upon starting Moses the desktop shown in ?gure 2 contains just a single window in which all elements in the Basic repository are shown. The window is set up in two panes, tools on the left and all Moses objects contained in the repository on the right. Initially only a folder containing con?guration ?les con?g, tool con?gurations Tools and a library Lib is contained in this repository . The library contains Components and Formalisms with the Formalisms folder containing the 3 prede?ned component formalisms. It can also be seen that the elements in the repository are hierarchically structured. This enables the user to separate repository elements. The Moses desktop also contains menu items that are useful in any context within the Moses environment. Perhaps initially the most useful item is found under the Help menu. Here the online help system can be accessed. This help is in HTML format and can be viewed either using the in-built help viewer or in any external HTML web browser. Also of importance is the Exit menu entry found in the File menu. Currently Moses does not check if everything has been stored in the repository. As a result the user must take care to exit Moses only when all models have been checked into the repository. In this tutorial you will create a number of models that help illustrate features of the Moses environment. Upon completing this tutorial you will be able to independently model and simulate complex systems using the prede?ned formalisms. In Section 2, the tokenring network protocol is described, such that you will be able to understand how to create your own model of a tokenring network interface card (in Section 3) and ?nally model a complete tokenring network (in Section 4). In Section 5, you will learn more about the graph editor and its tools. Figure 2: The Moses Tool started using the Demo repository 4 2 The Concept of IEEE 802.5 Token Ring IEEE 802.5 Token Ring standard is based on the IBM Token Ring network. Token Ring has been used mainly in large corporations in the 80’s and early 90’s, and was considered in the past to be the only way to handle data communications in large networks (1000+ nodes). Token Ring equipment is more expensive than Ethernet, and is one of the reasons that Ethernet is more popular. The other reason is that Token Ring is a much more complex bus arbitration method than CSMA/CD, and few network personnel understand the full capabilities of Token Ring. 2.1 IEEE 802.5 Bus Arbitration Token Ring is a token-passing bus arbitration. A token is circulated on the ring. If a node on the ring needs to access the ring (transfer information), it claims the token. The token is a special packet that is circulated around the ring. It is read from one node, then passed to the next node, until it arrives at a node that needs to access the ring (transfer information/data). When a node receives the token, the node is allowed to send out its information packet. Figure 3: The basic con?guration of a Token Ring network. Example: 1. A token is circulating in the ring. Node B needs to send some data to Node G. Node B waits for the token to arrive (there is only one token allowed on the ring). When it receives the token, it can then send out its information packet. Node G is the destination address in this example. Figure 4: Token and data leaving Node B. 2. Node C receives the packet, reads the destination address, and passes it on to the next node. Node D, E & F do likewise. 5 Figure 5: Passing on of the Token and data. 3. When the packet arrives at node G, node G reads the destination address and it reads the information. Node G marks the information packet as read, and then passes it on. Note: the Source and Destination addresses remain unchanged after passing through Node G. Node B is still the Source address and Node G is still the Destination address. Figure 6: Node G sending the marked Token. 4. The packet continues around the ring until it reaches the source address Node B. Node B checks to make sure that the packet has been read (this indicates that Node G is actually present). The information packet is erased and Node B releases the token onto the ring. Figure 7: Token replaced and returned to the network. 5. Information marked READ is passed through the ring back to the Source (Node B). The information packet is called the ”Token Frame.” The token itself is just called the ”Token” (sometimes referred to as the ”Free Token”). This can be confusing. Remember, when we talk about a frame, we are talking about data/information. When talking about a token, we are talking about bus arbitration and permission to use the bus. 6 3 Building a Simple Network Interface In this section you will build a model of a basic Token Ring interface using Moses. It will contain the functions to accept an incoming Token, evaluate the Token, load and unload the bus with data, change information contained in the Token and release the Token to the ring. Additionally, you will build a testing environment, which you will use to check the proper functionality of your Token Ring interface. 3.1 Creating a Project Folder Create a project folder TokenRingNIC in the repository. 3.2 Creating the Core Component Create a new Moses component in your project folder TokenRingNIC using the TimePetriNet formalism. Save the component in the repository using the name NIC. Your basic Token Ring interface will contain the inputs
1 response
• India
12 Oct 06
You had made a good discussion