0% found this document useful (0 votes)
19 views

Operating System Project Customer Queue

...

Uploaded by

aervaneha reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Operating System Project Customer Queue

...

Uploaded by

aervaneha reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

CUSTOMER QUEUE MANAGEMENT PROGRAM THAT APPLIES THE

CONCEPT OF CPU PROCESS SCHEDULING

Kong Hao Yang A19EC0065 (Leader)


School of Computing, Faculty of Engineering, University of Teknologi Malaysia

Brynard Bryan Edmund A19EC0029


School of Computing, Faculty of Engineering, University of Teknologi Malaysia

Mostafa Musab Naveed A19EC4017


School of Computing, Faculty of Engineering, University of Teknologi Malaysia

ABSTRACT

The normality of long queues of customers at banks can increase the risk of COVID-19
infection during this period of COVID-19 pandemic. Thus, We as a team propose to develop
a Customer Queue Management Program that can manage the queue of customers in a more
efficient way by applying the concepts of CPU process scheduling as well as Shortest Job
First (SJF), Shortest Remaining Time First (SRTF) and priority. By using this program, the
waiting time and turnaround time for a customer to obtain their services at banks can be
minimized and this can indirectly increase the efficiency of the bank and also minimize the
risk of COVID-19 infection. The development of the program will be conducted in stages as
planned. Among the three algorithms applied, the average waiting time and average
turnaround time of SRTF is the shortest among them and thus SRTF is the most efficient
algorithm among them.

1. INTRODUCTION
During this period of COVID-19 pandemic all over the world, social distancing is one
of the important measures that can be taken to minimize the risk of COVID-19 infection.
However, social distancing is hard to implement at the bank as most of the banking services
still need to be done physically at the bank even though some of the banking services are
accessible via online. This will result in a situation where there is a long queue of customers

1
formed at the bank in order to obtain services from the staff and this will increase the chance
of physical contact among customers while they are waiting in a queue.
Therefore, in order to solve this situation, our team would like to propose a program
that can help the staff of a bank to manage the queue of customers more efficiently while
reducing the risk of COVID-19 infection among customers when queuing. The program is
Customer Queue Management Program (CQMS) and it is a program that applies the three
different algorithms of CPU process scheduling which are the algorithms of Shortest Job First
(SJF), Shortest Remaining Time First (SRTF) and priority when managing the queue of
customers.
Process scheduling is the activity of the process manager that handles the removal of
the running process from the CPU and the selection of another process on the basis of a
particular strategy. Process scheduling follows different algorithms. (Tutorialspoint, 2021)
Shortest job first is a scheduling algorithm in which the process with the smallest execution
time is selected for execution next. Shortest job first can be either preemptive or
non-preemptive (Techopedia, 2021). Shortest Remaining Time First(SRTF) is the preemptive
version of the SJF algorithm. The process with the least amount of time until completion is
chosen first to run (Studytonight, 2021). Priority Scheduling is a way of scheduling processes
based on priority (Guru99, 2021). The processes with the highest importance should be
executed first.
Based on the above algorithm, this program can schedule the queue of customers
based on the types of banking services that wish to perform, estimated required time for the
services and also the priority of the services. Besides that, this program can also reduce the
waiting time and turnaround time for a customer who obtains services at the bank.

2. PROBLEM STATEMENT

The main cause of the long queue of customers at banks is due to lack of proper
scheduling for the customers which focuses on minimizing the waiting time and turnaround
time for each customer. The current management of the queue of customers is inefficient and
results in long waiting time for customers to obtain their banking services.

2
3. RESEARCH OBJECTIVES
● To obtain the waiting time and turnaround time for customers in queue using different
algorithms of process scheduling
● To determine the most efficient algorithm among the three algorithms.

4. SCOPE OF RESEARCH
● The customer that went in the bank will be the target audience.
● The program will be developed in C++ programming language.
● Data that customers enter will be used for analysis for the best outcome to queue.

5. SIGNIFICANCE OF THE RESEARCH

● The findings of this research will contribute to how a queue can be formed to
minimise the waiting time and turnaround time of customers that went into the bank.
● It increases the efficiency of banks to serve their customers.
● The gap between customer waiting time can be greatly reduced.
● The waiting time of customers is reduced and it indirectly lowers the chances of
getting infected by covid-19 as the queue does not pile up.
● The turnaround time of customers can be minimized to make the banking services
more efficient.
6. RESEARCH METHODOLOGY

The project will be divided into several phases to make sure we are going in the right
direction. These phases contain their own deliverables and guide the project members to
move on to the next step of phase step by step.
● Phase 1: Project Planning
● Phase 2: Identify the constant, manipulated and responding variables.
● Phase 3: Application designing
● Phase 4: Application development
● Phase 5: Data analysis and discussion
● Phase 6: Conclusion

3
7. DESIGN & IMPLEMENTATION

Flow Chart

1. Main Function

Main Function URL

Figure 1: Flow chart for main function

4
2. Menu function

Menu function URL


Figure 2: Flow chart for menu function

5
3. SJF implementation

SJF implementation URL


Figure 3: Flow chart for SJF implementation

6
4. SRTF implementation

SRTF implementation URL


Figure 4: Flow chart for SRTF implementation

7
5. Priority Scheduling (Non-preemptive)implementation

Priority Scheduling Implementation URL


Figure 5: Flow chart for priority scheduling implementation

8
8. RESULTS & DISCUSSION

Burst time and arrival time are the necessary data required for both Shortest Job First
and Shortest Remaining Time First algorithms to schedule CPU processes, while priority
scheduling algorithm requires 3 types of data which are burst time, arrival time and priority to
schedule processes. And, our system will read the required inputs for the algorithms from
users and those inputs are operation time representing burst time, arrival time and category of
membership representing priority. After that, these inputs will be used to schedule the queue
of customers by computing the completion time, waiting time and turnaround time of each
customer arriving at the bank.

Let’s assume a daily scenario at a random bank. Generally, banks open at 9.00 am. So,
if any person enters the bank at exactly 9.00 am he will put 0 as his arrival time. If anyone
enters at 9.10 am, the arrival time would be 10. Now we will assume the details of 6 random
persons who enter the bank at random times with different membership cards for different
purposes to test our Customer Queue Management System.

<<< Menu Options >>>

Please the following operations


1) Add customer into queue
2) View customer's queue
3) Terminate the system

<<< Type of banking services required to be performed >>>

1) Transaction Services
2) Consultation
3) Debit & Credit Cards Related Services
4) Insurance
5) Wealth Management
6) Account Opening & Closing Services
7) Loan & Financing Services
8) Account Security Issue

9
<<< The category of your membership >>>

1) Diamond
2) Platinum
3) Gold
4) Silver
5) Copper
6) Basic

The 1st person who comes to the bank at exactly 9.00am, first needs to select the kind of
service he wants to get. Suppose he wants to perform account opening & closing services so
he selects the option from the menu. The system then asks an estimated operation time from
him. So, he enters 50 minutes as this amount of time is enough for making a transaction.
Now, the system will ask to enter his arrival time. He entered 0 as he came at exactly 9.00am.
After that, the system will ask for his membership category. Let’s assume this person belongs
to the diamond category. So, he chooses from the option. And after that our system will add
the customer to the queue. Now we would assume entries for another 5 persons.

Customer ID Type of banking Operation Time Arrival Time Priority


services (Membership
Category)

C1 6 50 0 1

C2 2 25 5 2

C3 4 25 20 3

C4 7 50 20 6

C5 5 31 47 4

C6 2 25 25 2

Table 1: Inputs for 6 different customers

10
Based on the above scenario, we can obtain three different outputs for the three different
algorithms as follows.

1) Shortest Job First (SJF)

2) Shortest Remaining Time First (SRTF)

3) Priority

11
For Shortest Job First (SJF), the average waiting time and average turnaround time are 64.83
and 99.17 in minutes respectively, while for Shortest Remaining Time First (SRTF), the
average waiting time and average turnaround time are 52.5 and 86.83 in minutes respectively.
Besides that, the average waiting time and average turnaround time of priority scheduling are
64.83 and 99.17 minutes respectively.

Based on the average waiting time and average turnaround time of these 3 algorithms,
we can clearly observe that SRTF has the shortest average waiting time and turnaround time
among the three algorithms, while SJF and priority algorithms have the same average waiting
time and average turnaround time. Thus, we can conclude that SRTF is the most efficient
algorithm in increasing the efficiency of customer queue management as well as reducing the
waiting time and turnaround time of customers in queue.

9. CONCLUSION

Banking services are essential services in our daily life and due to its importance, it is
barely possible to avoid social contact among customers when they queue up to get banking
services at banks. Thus, it is necessary to take measures to make the queue of customers more
efficient with minimum amount of waiting time and turnaround time so that the risk of
COVID-19 infection can be minimized when customers are waiting in a queue. And, our
Customer Queue Management System is designed to handle this problem as it can schedule
the queue of customers based on their estimated required time for the services and also the
priority of the services by applying the algorithms of SJF, SRTF and priority. Based on the
analysis of the results of this research, different algorithms used in queue management will
affect the completion time, waiting time and turnaround time of a customer in the queue as
well as the average waiting time and average turnaround time for all customers. Among the
three algorithms studied, we found that the Shortest Remaining Time First (SRTF) algorithm
is the most efficient algorithm as it has the shortest average waiting time and average
turnaround time compared to the other two algorithms.

12
10. REFERENCES

Guru99. (2021). Priority Scheduling Algorithm: Preemptive, Non-Preemptive EXAMPLE.


Guru99.com. Retrieved 17 June 2021, from
https://www.guru99.com/priority-scheduling-program.html.

Studytonight. (2021). Shortest Remaining Time First Scheduling Algorithm - Studytonight.


Studytonight.com. Retrieved 17 June 2021, from
https://www.studytonight.com/operating-system/shortest-remaining-time-first-scheduling-alg
orithm.

Techopedia. (2021). What is Shortest Job First (SJF)? - Definition from Techopedia.
Techopedia.com. Retrieved 17 June 2021, from
https://www.techopedia.com/definition/22053/shortest-job-first-sjf.

Tutorialspoint. (2021). Operating System - Process Scheduling - Tutorialspoint.


Tutorialspoint.com. Retrieved 17 June 2021, from
https://www.tutorialspoint.com/operating_system/os_process_scheduling.htm.

13

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy