Advances in Applied Information Science MATLAB Graphical User Interface For Study Through Modelling And Simulation Of The Waiting Systems Without Priorities MIHAELA OSACI, MANUELA PĂNOIU, CAIUS PĂNOIU, IONEL MUSCALAGIU Department of Electrical Engineering and Industrial Computer “Politehnica” University of Timisoara, Engineering Faculty of Hunedoara Revolutiei no. 5, Hunedoara ROMANIA mihaela.osaci@fih.upt.ro http://www.fih.upt.ro Abstract: - The scope of the paper is to create an interactive graphical user interface in MATLAB by using the utility Guide to study, by modelling and simulation, the waiting systems without priorities. This interface can be used both for teaching and for operational research studies of the systems that are suitable for these models, in fields such as: production planning, telecommunications, traffic control, computer performance prediction, medical services, air traffic, etc. Key-Words: - Interactive graphical user interface, waiting systems without priorities, waiting models. with known distribution. The knowledge of the service mechanism requires knowledge of the system topology, rule according to which the service is performed, also called ”service discipline” [1], [3] (e.g. FIFO (First−In First−Out) – first come, first served), and the distribution of the number of customers served per unit time, or the service length distribution. The service mechanism is also characterized by the assumed known system capacity, i.e. maximum number of customers that may exist at a given time in the system or, equivalent, the maximum length of the queue. The unknown elements of the waiting model are: waiting time in queue, waiting time in the system, queue length, number of customers in the queue and number of customers in the system. All these unknowns are random variables and, by solving the waiting model, we aim to determine their distribution or an average value, depending on the known elements. A waiting model is denoted by A / S / c: (L, d) [3], where: A – distribution of time between two consecutive arrivals, S – service length distribution, c – number of service stations (channels), L – maximum length of the queue, d – service discipline. The most accurate results from the waiting theory were obtained in those systems where the arrival rate of the consumers and/or the station service rate are governed by an exponential negative probability. In most waiting systems, at least the arrival rate of the consumers in the system is 1 Introduction The waiting theory (or the theory of waiting threads, or the queueing theory) [1], [2] deals with the study of evolution of the systems which have clusters (standby systems). In practice, the waiting theory is mainly used to highlight the shortcomings in an existing system in service and to show the directions to streamline its operation. The study of a waiting system is realised with a waiting model. A generic waiting model consists of the following three elements [1], [2]: - The customers (consumers) requesting a service; - The service station (server) which has the purpose to meet the customer demands; in a waiting system, the service station may have one post or multiple identical posts (finite or infinite number), working in parallel; - The waiting thread or queue that forms when the customers must wait. The models of the waiting systems differ between them by: the probability laws governing the arrival and serving of the customers, number of posts in the service station, discipline of the waiting thread and the structure of the consumer population (finite or infinite number of consumers). The known elements of a waiting model are: the flow of system inputs and the service mechanism. The entries are characterized either by the number of customers arriving per unit time, or the intervals between two consecutive arrivals. Either of these two quantities is a random variable ISBN: 978-1-61804-113-5 225 Advances in Applied Information Science exponential negative, because the consumers’ arrivals can be modelled using a Poisson distribution [1]. 2 Grafical Interfaces For Models Of The Waiting Systems Without Priorities The graphical user interfaces for the simulation model of the waiting systems without priorities are programmed with the utility Guide from Matlab [4]. The main graphical user interface of the application (Fig. 1) offers access possibility to the programmed model interfaces. Fig. 2 The interface of the model Exp(λ)/Exp(µ)/1:(∞,FIFO) and the graphic of the probability to have a certain number of customers in queue 2.The model Exp(λ)/Exp(µ)/1:(m, FIFO). Compared to the previous model [3], the maximum length of the queue is m<∞. The model interface and the graphical representation of the probability to have a certain number of customers in queue are shown in Fig. 3. Fig. 1 The main graphical interface of the simulation model Each interface allows entering the input parameters for simulation, the simulation of the output values and the graphical representation of the probability to have a certain number of customers in queue. The application allows the simulation of four models for the waiting systems without priorities. 1.Exp(λ)/Exp(µ)/1:(∞,FIFO). In this model, the entries are made according to the Poisson distribution [3], and the interval between two consecutive arrivals has an exponential distribution with parameter λ, as can be easily seen. The services are made using a negative exponential distribution, i.e. the length of the service as a random variable has the exponential negative distribution with parameter µ. The service distribution is FIFO. The model interface and the graphical representation of the probability to have a certain number of customers in queue are shown in Fig. 2. ISBN: 978-1-61804-113-5 Fig. 3 The interface of the model Exp(λ)/Exp(µ)/1:(∞,FIFO) and the graphic of the probability to have a certain number of customers in queue for this model 2.The model Exp(λ)/Exp(µ)/c:(∞, FIFO). These models [3] generalize the waiting models with a single service station, having parallel service 226 Advances in Applied Information Science stations (identical in terms of serving time) and the service discipline FIFO. The model interface and the graphical representation of the probability of having a number of customers in queue are represented in Fig. 4. 3 Analysis On The Modelling Of The Real System By Using The Waiting Models Without Priorities The operation of the computer systems, either sequential or parallel, is based on the organization of waiting threads for access to the shared resources of the system (processor, memory, peripherals) [5], [6], [7]. So, for each resource there is a waiting system, in which the resource represents the service station, and the system tasks are the customers [6], [8]. So, the average quantities of interest (average number of consumers in the queue and in the system, the average waiting time in threads and in the system) can provide a clear image of the overall system performance and the ways for improving. If the time required to complete the parallel program is finite, we can use: for the multiprocessing operating systems [2], [5] - the model Exp(λ)/Exp(µ)/c:(m,FIFO), for the network operating systems and the really distributed operating systems [5],[7], where the number of execution threads equals the number of processors – modelled with waiting network [2], each node of the network being modelled with the model Exp(λ)/Exp(µ)/1:(m,FIFO). If the execution time of the parallel program becomes very long [6], and the number of processes executed in the system increases significantly, we shall use the models Exp(λ)/Exp(µ)/c:(∞,FIFO) or Exp(λ)/Exp(µ)/1:(∞,FIFO). Fig. 4 The interface of the model Exp(λ)/Exp(µ)/c:(∞,FIFO) and the graphic of the probability to have a certain number of customers in queue 3.The model Exp(λ)/Exp(µ)/c:(m, FIFO). This model [3] represents the case of the waiting system with Poisson arrivals, exponential services, more stations serving in parallel (identical in terms of serving time), limited number of customers, m, and the service discipline, FIFO. 4 Conclusion The waiting theory is a very useful tool for predicting the performance of the waiting systems. So, the average quantities of interest (average number of consumers in the queue and in the system, the average waiting time in threads and in the system) can provide a clear image of the overall system performance and the ways to improve them. The paper presents an application realised in the Matlab medium, used to simulate the waiting systems without priorities. This application can be used either as teaching software, or in the operational research, for improving the operation parameters of the waiting systems. Fig. 5 The interface of the model Exp(λ)/Exp(µ)/c:(m,FIFO) and the graphic of the probability to have a certain number of customers in queue ISBN: 978-1-61804-113-5 References: [1] Emilia Petrisor, Simularea Monte Carlo (The Monte Carlo Simulation), Publisher: Politehnica Timisoara, Romania, 2006 227 Advances in Applied Information Science [2] Felician ALECU, Queuing Systems and Parallel Processing, Economy Informatics, vol. III, no. 3, pp.88, 2003 [3] Trandafir Romică, Modele şi algoritmi de optimizare (Models and optimization algorithms), Publisher: AGIR, Romania, 2004 [4] Osaci Mihaela, MATLAB pentru prelucarea datelor în laboratorul de fizică (MATLAB for processing data in the physics laboratory), Publisher: Cermi, Iasi, Romania, 2007. [5] Gh. Dodescu, Sisteme de calcul si operare (Computer and operating systems), Publisher: ASE, Bucharest, 1997 [6] Gh. Dodescu, B. Oancea, M. Raceanu, Procesare Paralelă (Parallel Processing), Publisher: Editura Economică, Bucharest, 2002 [7] A. S. Tanenbaum, Distributed Operating Systems, Publisher: Prentice Hall, 1995 [8] D. Gross, C. M. Harris, Fundamentals of Queuing Theory, Publisher: Wiley, New York, 2003 ISBN: 978-1-61804-113-5 228