Sunteți pe pagina 1din 3

Box Hill Institute

Bachelor of Computer Systems (Networking) BCS01 Subject Week5 : ICT114, Mathematics for Computing : Queueing Theory, Algorithms and Flowcharts

Tutorial Questions
1. What are the different components of a queuing system? Give a brief explanation about each component. A queuing system is characterised by three components: Arrival pattern of customers Is usually specified by interarrival time, the time between successive customer arrivals Service pattern Customers arrive singly or in batches. It is specified by service time, the time required by one server to serve a customer Number of servers A customer may be served by a single server or a sequence of servers. The capacity of the facility to hold customers It is the maximum number of customers, permitted in the service facility at the same time. If a customer arrives at a facility that is full, the customer is denied entrance The order in which customers are served Discipline of a queuing system means the rule that a server uses to choose the next customer from the queue (if any) when the server completes the service of the current customer. FIFO (first in first out) LIFO (last in first out) Random basis Priority basis

2. Explain Kendalls notation. A queue is represented as M/ D/ 2/ 5/ LIFO. What are the characteristics of the queue? The characteristics of this queue are: M: Exponentially distributed in interarrival times D: Deterministic services times 2: Two servers 5: Limit of five allowed into at any time

LIFO: When the last customer to arrive being the next customer to go into service. 3. Write an algorithm to determine if a given number is a prime number. Draw the corresponding flowchart. Step 1: Step 2: Step 3: Input integer number Check if the inputted integer number is equal or greater than two. If inputted integer number is minor to 2 its not valid entry. Check whether any integer number from 2 to inputted integer number one divides to inputted integer number. If inputted integer number is divisible for any integer number then inputted integer number its not prime.
START

Input M

M>2

Y M=2

While A<=M-1 then

A=2

A=A+1 N N
IF M/A= Integer

error Not valid entry

M Is prime number

M Is not prime number

STOP

4. A router has 6 interfaces connected to 5 LANs and a WAN. Given an address block of 192.168.1.0/24, write an algorithm to create the required 6 subnets and their subnet mask. Draw the corresponding flowchart. 2^a 2 = N

N = Subnet number a = bits


2^(8-a) 2 = H H= Host number

5. Given a IP address 172.16.45.0 and the mask 255.255.224.0, write an algorithm to determine the network address. Draw the corresponding flowchart.

S-ar putea să vă placă și