Вы находитесь на странице: 1из 6

Performance Analysis of Scheduling Processes for FIFO and Round

Robin Algorithms in Internet of Things Device Operating System


Hayatun Nufus#, Mardhani Riasetiawan*, Ahmad Ashari#
# Computer Science and Electronic Faculty of Mathematics and Natural Science, Universitas Gadjah Mada, Sekip Utara, Bulaksumur,
Yogyakarta, 55281, Indonesia
E-mail: hayatunnufus@mail.ugm.ac.id, mardhani@ugm.ac.id, ashari@ugm.ac.id

Abstract— The process of CPU scheduling is a fundamental requirement in the operating system. One of the most important aspects of
determining a reliable operating system for an Internet of Things (IoT) device can be observed from the performance of the scheduling
process. The process especially runs in the G-connect project which focuses on Early Warning System (EWS) is real-time from multi-
sensors so that scheduling algorithms that support the real-time process are needed so that the incoming process can be scheduled more
effectively and efficiently. This study aims to analyse the performance of Round Robin (RR) and First in First Out (FIFO) scheduling
processes on Linux-based operating systems on ARM-based Single Board Computer (SBC), the Raspberry Pi3. This research was
conducted by implementing multi-processes on the Arch Linux and Raspbian operating systems on Raspberry Pi3; the parameters
being compared were CPU usage and waiting time. From the results of experiments that have been carried out, Arch Linux is better
than Raspbian. CPU usage in the Arch Linux operating system with RR and FIFO scheduling for the g-connect process is 103% and
102%, motion 57.6% and 54.1% the percentage achieved is higher than the CPU usage on the Raspbian operating system with RR
scheduling and FIFO for the g-connect process is 102% and 101%, motion 9.5% and 7.9%. The waiting time on the Arch Linux
operating system for the g-connect and motion process is 26µs for RR and 28µs for FIFO, the waiting time used is smaller than the
waiting time on the Raspbian operating system for the g-connect process, and the motion is 34µs for RR and 36µs for FIFO.

Keywords— Internet of Things, Operating System, CPU Scheduling, FIFO, Round Robin, CPU Utilization, Waiting Time, G-Connect.

can be run [4]. Also, the chosen scheduling system is expected


I. INTRODUCTION to save energy & multi-tasking in the IoT system [5].
Over the past decade IoT has attracted the attention of The algorithms available for CPU scheduling include RR
academics and industry, this is due to the concepts offered by (Round Robin) which is considered the most optimal
IoT in connecting all things (things) around us, both using algorithm for managing time. The effectiveness of Round
cable and wireless to the internet network and these objects Robin depends entirely on quantum timing [6]. The FCFS
can mutually communicate with the minimum human algorithm does not have preemptive characteristics. The
intervention [1]. An IoT device is a small device that process prioritizes the queue that is ready to be executed first
supporting the operating system (OS) specifically designed to by the CPU, so the length of the process waiting time
help a variety of applications and operational requirements for determined by the execution time from the previous
IoT devices. Besides that the IoT OS is also responsible for procedure. If the execution time of the prior process is too
managing limited IoT device resources efficiently and real- long, it will cause the process to wait too long, and affect the
time, the latest challenge in OS IoT is the presence of several efficiency of the overall process [7].
new OSes, such as RIOT, OS Mbed, embedded Linux, Zephyr A survey that accurately describes the development of IoT
which can still be further investigated [2]. architecture in research [8] has included health-care, smart
The further development from OS IoT is about the society, cloud service and management, social computing,
performance of the scheduling, where scheduling is part of the security, and there are still many that continue to develop, one
primary operating system because almost all computer of which is research in the University of Gadjah Mada, the G-
resources using scheduling before being used. Scheduling the Connect Project. G-connect is one of the community service
Central Processing Unit (CPU) is one of the primary computer projects of the Computer Science Department of Gadjah
resources. The CPU plays an essential role by sharing the Mada University with the aim of providing independent
CPU between various processes [3]. CPU scheduling is done access to information in a small area with limited
to determine which process will run when several processes infrastructure support and also areas with high levels of
disaster vulnerability. In this project, the application of CPU first. The FIFO queue easily managed by The
disaster information remote monitoring and monitoring FCFS implementation. When a process enters the
technology been carried out by implementing IoT and cloud queue is ready, the PCB will be associated at the end of
technology to help disaster-prone areas. The research phase the queue. When the CPU is free, the process will be
and prototype development until limited trials were carried allocated to the queue head. Therefore, the current
out in 2016 through an independent research scheme (Cloud process deleted from the queue. The code for FCFS
& Grid Technology Research Group, 2017). scheduling is easy to write and understand. [10].

II. MATERIAL AND METHODS  Round Robin


The Round-Robin (RR) scheduling algorithm is
A. Materials designed explicitly for time-sharing systems, similar to
1) Operating System: An IoT device is supported by a FCFS scheduling, but there are extra preemptions to
small operating system (OS) specifically designed to support allow the system to switch between processes. RR is
a variety of applications and operational requirements for IoT equipped with one unit of quantum time [10].
devices. Besides that, the IoT OS is also responsible for 3) Scheduling Criteria: Different CPU scheduling
managing limited IoT device resources efficiently and real- algorithms have different properties, and the right choice
time [2]. The latest challenge in OS IoT is the presence of of algorithms can support the process can run well. In
several new OSes, such as RIOT, OS Mbed, embedded Linux, choosing the algorithm used in certain situations, we must
Zephyr which can still be further researched. consider the properties of various algorithms. Many criteria
The operating system provides many functions, such as I / are recommended for comparing CPU scheduling
O management, memory management, process management, algorithms [11] The criteria are as follows:
and file management. Because the operating system is a set of  CPU Utilization
programs that interact with computer hardware during This criterion ensures that the CPU works as busy as
execution time, so that process management is the most possible. Conceptually, CPU utilities can range from 0
critical function provided by the operating system where CPU to 100 percent for the utilization of just one CPU. In
scheduling is needed, a multi-tasking environment that keeps real time, it should only be around 40 percent (for
the CPU and I / O devices busy at any time and results in CPU systems that are not full load) up to 90 percent (for a
utilization. Many scheduling algorithms have been designed full system). The higher the percentage of CPU
to regulate path and process access to the CPU, such as FCFS- utilization in the process it proves that the CPU is
SJF-SRT-RR [9]. Some operating systems that support the working busy so there is no chance the CPU is idle.
internet of things devices include: CPU utilization in this context concerns the proportion
 Raspbian of the total available processor cycles consumed by
Raspbian is a Debian GNU / Linux based operating each process. The operating system divides 100% of the
system that has been optimized for Raspberry Pi computing resources that are available fairly among the
devices. Raspbian is an operating system officially processes that request them [12]. However, sometimes
supported by the Raspberry Pi Foundation (Raspberry high CPU utilization can also be inadequate. When
Pi Foundation, 2015). circumstances have non-critical processes that work for
hours with high CPU utilization, other more critical
 Arch Linux ARM processes cannot obtain a fair CPU portion and take
Arch Linux is an i686 / x86-64 distro that was longer to complete [9]. In the book [10] also explains
developed independently based on the rolling-release that process scheduling is related to the problem of
package model. This distro developer design approach deciding which process will be carried out in a system.
focuses on minimalism, minimalist code, program The process that has not received the location quota
truth, and modernity. search for the CPU will queue at the ready queue. The
2) Scheduling Algorithm: Scheduling is the concept of scheduling algorithm functions to determine which
sharing the execution time of existing tasks. To do a process is in the ready queue that will be executed by
scheduling process, a scheduler is required to be held. The the CPU. Process scheduling will work as reasonably
scheduler is required to determine the execution time of a as possible based on the mechanism in the operating
task, the length of time executed, postponements system relating to the sequence of work carried out by
execution, and when a task is resumed. Scheduling is the computer systems. The scheduling is in charge of
basis of a multi-programming operating system by deciding: The process that must be running and when
diverting the CPU between processes; operating systems and for how long the process is running. According to
can make computers more productive. CPU scheduling is [10] when the CPU changes status becomes inactive,
related to the problem of deciding which of the processes the operating system must choose one of the queue
in the queue is ready to be allocated to the CPU [10]. processes that are ready to be executed. The selection
process is carried out by the CPU scheduler. The
 First Come First Serve (FCFS)
scheduler selects the process in memory that is ready to
Thus far, the most straightforward CPU scheduling
be allocated to the CPU. The ready queue is not
algorithm is the first and first served scheduling
necessarily the first and first incoming queue (FIFO).
algorithm (FCFS). With this scheme, the process that
Conceptually, all processes in the queue that are in a
asks the CPU for the first time will be allocated to the
ready state must queue up waiting for the opportunity After analysing the software and hardware requirements
to run on the CPU. needed in this study, then the design of the device will be
 Waiting Time carried out to become an integrated IoT architecture system.
The CPU scheduling algorithm does not affect the The system scenario to be built can be seen in Figure 1.
amount of time during which the process is run or the I
/ O process but affects the amount of time spent in the
process waiting in the ready queue [10].
B. Research Methodology
The activities carried out in carrying out this research are:
1) Observation: Observation is done by observing directly
into the field to see the problems and solutions that will be
used so that problems can be overcome. Observations made Fig. 1 Overall System Scenario
in this study are observations regarding IoT standards, IoT
architecture that will be built include hardware and software In Figure 1, it is explained that the system scenario will be
and IoT environment which will be used as case studies. carried out using multiprocessing, in this case, there are two
2) Study of literature: At this stage, literature studies are processes that will be input, namely the process of the
conducted by looking for research references from journals webcam to capture images of each change in motion on the
and books, digital libraries, e-books, official websites, and ground and multisensory as the second process that acts as
scientific works related to IoT architecture, scheduling data capture in the field. Furthermore, the multiprocessing is
algorithms, multi-process, landslides, Linux-based IoT entered into the Raspberry Pi, which was previously custom
operating systems. kernel with the operating system and scheduling to be tested.
When multiprocessing runs, observations will be made on the
3) Requirements Analysis: At this stage analysis of the performance of the scheduling algorithm based on
requirement of the operating system environment predetermined parameters, namely CPU and waiting time.
requirement, multiprocessing is used, then an analysis of the
Scheduling algorithm is implemented that has been
implemented on IoT devices. At this stage, the first time that 4) Design: This study uses several supporting equipment
will be done is to prepare a research environment covering consisting of hardware and software. The following are the
software and hardware requirement. The requirements for devices used in the implementation and to analyze the
software and hardware will be explained in TABLE I. performance of the Round Robin scheduling and FIFO
algorithms on IoT device operating systems.
TABLE I
GENERAL REQUIREMENTS FOR SOFTWARE AND HARDWARE  Hardware:
The Raspberry Pi3 Model B is the earliest model of the
Minimum Software and Hardware Requirements third generation Raspberry Pi replacing the Raspberry
Software OS: Raspbian Pi 2 Model B in February 2016. In Table 4.2, it
Arch Linux describes the Raspberry Pi3 Model B hardware
specifications that will be used as a temporary server
Programming Language: C when retrieving real-time data from the field which will
be monitored every time that occurs is the g-connect
Sublime Editor process from a set of sensors and the moving process
from the camera. In Table II explained the
Wi-Fi specifications of the Raspberry Pi 3 Model B.
Hardware 4 unit Raspberry Pi 3 Model B TABLE II
SPECIFICATION OF RASPBERRY PI 3 MODEL B
with ARM Cortex-A53, 1.2GHz
specification CPU ARM Cortex-A53 Broadcom BCM2837

4 unit MicroSD 8GB.


CPU speed 1.2 GHz 64-bit quad-core
1 unit Webcam

Multisensor: GPU Broadcom Video Core IV @ 250 MHz


1 Sensor SHT11 (BCM2837: 3D part of GPU @ 300 MHz,
1 Accelerometer video part of GPU @ 400 MHz) MPEG-2
1 Anemometer and VC-1 (with license),[48] 1080p30

1 unit Laptop with r Core i-3,


1,2GHz Processor. RAM size 1 GB (shared with GPU)

On-Board 10/100 Mbit/s Ethernet, 802.11n wireless,


Network Bluetooth 4.1
several stages to determine the success of this study.
In Table III explained about the Webcam C170 The configuration flow before conducting the test, in
hardware specifications that will be used as image general, will be shown in Figure 4.4.
capture when there is ground movement in the field.
TABLE III
SPECIFICATION OF WEBCAM C170

Resolution VGA

Video Quality Good

Focus Fixed

Lens Standard

Field of View 58o

Microphone Mono

 Software
The software needed in this study are:
TABLE IV Fig. 1 General testing planning flow
SPECIFICATION OF SOFTWARE’S
Figure 4.4 describes the testing design flow in general,
Raspbian Oparating System Kernel support based on starting from the hardware configuration consisting of
Debian distribution.
Raspberry Pi3 as a server and webcam as a tool to capture
images if there is ground movement in the field. After
Arch Linux ARM Operating Targeted kernel and software configuring the hardware, a software configuration will
System support for hard-float ARMv6 then be carried out which starts with customizing the kernel
and ARMv7, ARMv5te, and for each scheduling and the operating system to be tested.
ARMv8 AArch64. So the expected output is to be able to choose the right
scheduling and operating system for the g-connect project
architecture.
Programming Language Supports custom kernel when
scheduling settings to be used. III. RESULTS AND DISCUSSION
A. CPU Utilization Parameter
The results of the CPU utilization parameter when the
multisensory process is running in real-time are presented in
this section. Monitoring and testing of CPU utilization for
In Table IV the specifications of the software used are
multiprocessing consisting of are carried out 30 times. Each
explained. The Raspbian Operating System is supported by a
process will be carried out in two schedules, Round Robin and
kernel based on Debian distribution. Arch Linux is supported
FIFO. Each schedule will be implemented on two operating
by the kernel and software targeted for ARMv6 hard-float and
systems, Raspbian and Arch Linux. The total data that must
ARMv7, ARMv5te, and ARMv8 AArch64 as well as the C
be monitored for CPU utilization parameters are 7.200 data.
programming language that is used for the scheduling process
Parameter CPU Utilization (%)

to be made. Sistem Operasi Raspbian dan Arch Linux


120
 Design implementation is carried out after all the 100
requirement obtained through the requirement analysis 80
and design phase are met. After the requirement are 60
40
met, the configuration of hardware and software is 20
needed. At this stage, it will be seen whether the 0
g- g-
system created is according to the objectives that want connect
motion
connect
motion
to achieved. Then the test begins by configuring the FIFO RR
FIFO RR
kernel on each Raspberry Pi that is used to see Raspbian 101 7.9 102 9.5
whether the Raspberry Pi can run an operating system
Arch Linux 102 54.1 103 57.6
that was previously done by a custom kernel on each
operating system to be tested. The test is divided into
Fig. 2 Graph summary of the comparison of the CPU Utilization Raspbian TABLE V
and Arch Linux operating systems SUMMARY OF RESEARCH RESULTS

The graph in Figure 2 is an overview of the comparison of N Para Raspbian Arch Linux
CPU Utilization for multiprocessing real-time g-connect and O mete
motion on 2 Raspbian and Arch Linux operating systems. The r
graph in Figure 6.11 shows that the CPU Utilization process FIFO RR FIFO RR
is g-connect, and the motion for Round Robin scheduling on g- m g- m g- m g- m
co oti con oti con oti con oti
the Arch Linux operating system is much busier, namely
nn on nec on nec on nec on
achieving 103% for g-connect and 57.6% for motion ect t t t
compared to FIFO scheduling on the operating system 1. CPU 10 7,9 102 9,5 102 54, 103 57,
Raspbian is 102% for G-connect FIFO and 9.5% for FIFO Utili
motion. 1 % % % % 1 % 6
zatio
n % % %
B. Waiting Time Parameter
4. Wait 36 µs 34 µs 28 µs 26 µs
The results of the waiting time parameter during a ing
multisensor process run in real-time presented in this section. time
Monitoring and testing of waiting times for multi-processes
were carried out in 30 trials in each experiment. At this stage, TABLE II is a summary of the overall test results obtained
the process will be run simultaneously on two schedules, from each scheduling and operating system used. It is seen in
Round Robin and FIFO. Each schedule will be implemented Table 6.3 that the differences between process parameters that
on two operating systems, Raspbian and Arch Linux. The are run on the Arch Linux operating system far better meet the
total data that must be monitored for response time parameters best scheduling criteria when compared to Raspbian and
is 3.600 data. between the two RR scheduling is more effective and efficient
in scheduling the g-connect and motion processes. The results
Sistem Operasi Raspbian dan Arch Linux of the comparison Table 6.5 show the testing of each
60.000000 parameter using the CPU, and the waiting time for the results
50.000000
is as follows:
interval wakttu tunggu (µs)

40.000000

30.000000
120
100
20.000000
80
10.000000
60
0.000000
g-connect
g-connect dan motion
g-connect
g-connect dan motion
40
(%)

dan motion RR dan motion RR Arch


Raspbian
FIFO Raspbian
Linux
FIFO Arch Linux
20
min 0.000034 0.000036 0.000026 0.000028
0
max 51.388728 50.561476 10.001689 10.002787 g-connect g-connect motion motion
FIFO RR FIFO RR
Penggunaan CPU
Fig. 3 A summary graph of the comparison of the g-connect waiting 101 102 7.9 9.5
Raspbian
times and the Raspbian and Arch Linux operating systems
Penggunaan CPU
102 103 54.1 57.6
C. Advanced Analysis Arch Linux
Comparison of performance of FIFO and Round Robin
Fig.4 CPU Utilization comparison chart g-connect and motion process with
scheduling on the Arch Linux and Raspbian operating system scheduling FIFO and RR on Raspbian and Arch Linux operating systems
with the g-connect and motion processes in this study
obtained from data analysis based on parameters. Each The graph in Figure 4 is a summary of the CPU Utilization
parameter used is CPU Utilization and waiting time. The comparison of the g-connect and motion process with the
results of scheduling performance used in both operating scheduling of FIFO and RR on the Raspbian and Arch Linux
systems can be seen in Table 6.5 which is obtained from the operating systems which are obtained from testing 30
maximum value for CPU utilization and the minimum for and attempts on each process in real-time. CPU Utilization is g-
waiting times for each parameter test which is then compared connected and motion with RR scheduling on the Arch Linux
between scheduling FIFO and Round Robin. Raspbian and operating system higher because the nature of Round Robin
Arch Linux operating systems, so that conclusions can be is time sharing and has a quantum time that divides CPU time
drawn from the tests that have been carried out. evenly for all incoming processes so that all incoming
processes will be done, so there is no opportunity for idle
CPUs. In this study, the CPU on the IoT device has a multi-
core processor so that the CPU Utilization will be used
maximally by the g-connect process and if the process enters,
the motion process will be allocated to other cores so that the
CPU will work as much as possible and always in a busy state.
0.00004 for the g-connect and motion process is 26µs for RR and 28µs
0.000035 for FIFO, the waiting time used is smaller than the waiting
0.00003
0.000025 time on the Raspbian operating system for the g-connect
0.00002 process, and the motion is 34µs for RR and 36µs for FIFO.
0.000015
(%)

0.00001
0.000005 REFERENCES
0
g-connect, g-connect, [1] I. H. Santoso and K. Ramli, “Internet of Things : Visi, Arah
motion FIFO motion RR Kedepan, Dan Teknologi Kunci,” vol. 2016, no. Santika, pp. 18–
Penggunaan waktu 19, 2016.
0.000036 0.000034 [2] A. Musaddiq, Y. Bin Zikria, O. Hahm, H. Yu, A. K. Bashir, and
tunggu Raspbian
S. W. Kim, “A Survey on Resource Management in IoT
Penggunaan waktu
0.000028 0.000026 Operating Systems,” IEEE Access, vol. 6, pp. 8459–8482, 2018.
tunggu Arch Linux [3] P. Singh, V. Singh, A. Pandey, and R. Robin, “Analysis and
Fig.5 Comparison summary graph of the use of waiting time for the g- Comparison of CPU Scheduling Algorithms,” Int. J. Emerg.
connect and motion processes with scheduling FIFO and RR on the Technol. Adv. Eng., vol. 4, no. 1, pp. 91–95, 2014.
Raspbian and Arch Linux operating systems [4] L. Datta, “Efficient Round Robin Scheduling Algorithm with
Dynamic Time Slice,” Int. J. Educ. Manag. Eng., vol. 5, no. 2, pp.
Figure 5 is a summary of the comparison of the g-connect 10–19, 2015.
[5] P. Gaur and M. P. Tahiliani, “Operating systems for IoT devices:
and motion waiting times with scheduling FIFO and RR on A critical survey,” Proc. - 2015 IEEE Reg. 10 Symp. TENSYMP
the Raspbian and Arch Linux operating systems. It can be 2015, pp. 33–36, 2015.
seen in Figure 6.17 that the waiting time with Round Robin [6] A. R. Dash, S. Kumar Sahu, and S. K. Samanta, “An optimized
scheduling on the Arch Linux operating system is smaller round-robin CPU scheduling algorithm with dynamic time
quantum,” Int. J. Comput. Sci. Eng. Inf. Technol., vol. 5, no. 1, pp.
compared to FIFO scheduling due to Round Robin. The 7–26, 2015.
characteristics of a preemptive process that causes a process [7] Y. Te Tsai, S. C. Wang, K. Q. Yan, and C. W. Chen, “Availability
to be stopped, if another process is interrupted while non- enhancement in a four-layer based IoT use three-phase
preemptive FIFO requires a process that is being carried out scheduling,” J. Ambient Intell. Humaniz. Comput., vol. 9, no. 4,
pp. 1275–1291, 2018.
must be completed to the end so that the next incoming [8] P. P. Ray, “A survey on the Internet of Things architectures,” J.
process must wait a long time until the process is finished. King Saud Univ. - Comput. Inf. Sci., vol. 30, no. 3, pp. 291–319,
2018.
IV. CONCLUSIONS [9] S. Almakdi, M. Aleisa, and M. Alshehri, “Simulation and
Performance Evaluation of CPU Scheduling Algorithms,” Ijarcce,
From the results of the overall test, it has been showing that no. March, pp. 1–6, 2015.
Arch Linux is better than Raspbian which can be seen from [10] A. Silberschatz, P. B. Galvin, and G. Gagne, “Operating Systeme
Concepts,” Wiley, vol. 32, p. 575, 2005.
CPU Utilization on the Arch Linux operating system with RR [11] I. Singh Rajput and D. Gupta, “A Priority based Round Robin
and FIFO. Scheduling for the g-connect process is 103% and CPU Scheduling Algorithm for Real-Time Systems,” J. Adv. Eng.
102%, motion 57.6% and 54.1% percentages which are Technol., vol. Vol2, no. Issue3, pp. 120–124, 2013.
achieved higher than CPU Utilization on the Raspbian [12] C. Jayavarthini, A. Chattopadhyay, P. Banerjee, and S. Dutta,
“Performance analysis of CPU scheduling algorithms with the
operating system with the RR and FIFO scheduling for the g- DFRRS algorithm,” ARPN J. Eng. Appl. Sci., vol. 12, no. 12, pp.
connect process being 102% and 101%, motion 9.5% and 3757–3761, 2017.
7.9%. The waiting time on the Arch Linux operating system

Вам также может понравиться