Professional Documents
Culture Documents
(ISAS)
SMART HOME
Written By:
Muhammad Akmal Ardhia
Ragiliawan putra rencana
Class:
TI 3SE1
Faculty:
Mr. Muhammad Riza Iqbal
Honor the writer for the presence of God Almighty because, for his dignity and
guidance, the writer can complete this paper entitled “Process Synchronization.” Moreover,
the writer wanted to express thanks to those who had guided and helped us to complete the
task, because with their help we corrected the errors that made the paper better. This paper is
presented to complete the Information Search and Analysis Skill (ISAS) assignment. This
paper is expected to be able to deliver insights and information about process synchronization
that are valuable for writers as well as for readers.
Hopefully, through the explanation in this paper, readers can gain insight. We also
hope this paper can deliver little knowledge about process synchronization right and
absolutely. If there is any error or flaw in this paper, we apologize and will correct it in the
next isas writing. The author is open to constructive criticism.
Writer
i
Table of Contents
Preface.........................................................................................................................................i
Table of Contents.......................................................................................................................ii
Table of Figure..........................................................................................................................iii
CHAPTER I...............................................................................................................................1
INTRODUCTION......................................................................................................................1
1.1 Background.......................................................................................................................1
1.2 Writing Objective.............................................................................................................1
1.3 Problem Domain...............................................................................................................1
1.4 Writing Methodology..................................................................................................2
1.5 Writing Framework..........................................................................................................2
CHAPTER II..............................................................................................................................3
BASIC THEORY.......................................................................................................................3
2.1. Definition of Process synchronization.........................................................................3
2.2. How Process synchronization works...........................................................................3
2.3. Section of program......................................................................................................4
CHAPTER III.............................................................................................................................5
PROBLEM ANALYSIS............................................................................................................5
3.1 Critical Section Problem..............................................................................................5
3.1.1 Rules for Critical Section.....................................................................................5
3.1.2 Solutions to the Critical Section...........................................................................5
3.2 Race Condition............................................................................................................8
CHAPTER IV............................................................................................................................9
CONCLUSION AND SUGGESTION......................................................................................9
4.1. Conclusion...................................................................................................................9
4.2. Suggestions..................................................................................................................9
BIBLIOGRAPHY....................................................................................................................10
ii
iii
Table of Figure
Figure 2. 1 Imaginary of process synchronization (REF: https://www.guru99.com/process-
synchronization.html)..........................................................................................................................5
iv
CHAPTER I
INTRODUCTION
1.1 Background
In an increasingly digital age, the concept of a smart home has emerged as
one of the most prominent trends in household technology. Smart homes combine
modern technology with user convenience to create a more intelligent and
efficient living environment. This chapter serves as an introductory guide to
understanding the fascinating world of smart homes, exploring the evolution,
benefits, and the transformative potential they hold in our daily lives.
5
1.3 Problem Domain
he problem domain in the context of smart homes encompasses various challenges, issues,
and considerations that researchers, developers, and homeowners may encounter when
implementing, using, or expanding smart home technology. Here are some key problem
domains in the field of smart homes:
1 Privacy and Data Security: Smart home devices often collect sensitive data about
residents' activities, raising concerns about data privacy and security breaches. Ensuring
that data is securely stored and transmitted is a significant challenge.
3 Complexity and Usability: Smart home systems can be complex to set up and use.
Ensuring that the technology is user-friendly, especially for individuals who may not be
tech-savvy, is an ongoing challenge.
6
7
3.4Writing Methodology
1. Research Design
This research adopts a mixed-methods approach, combining both qualitative
and quantitative research methods to comprehensively explore various
aspects of smart home technology. The study encompasses the following key
components:
BASIC THEORY
So, process synchronization works the process one by one, and the
computer will begin the first process, then after the first process got executed,
the second process will get worked on because only one process can get
executed at a detailed time.
So, if the first process changes the data computer will work on it first.
After it is completed, the computer will let the second process read the data
that
3
4
has been changed in the first process. It will repeat similarly like that until all
processes have been executed.
Write Read
First Process Data Second Process
Memory
Figure 2. 1 Imaginary of process synchronization (REF:
https://www.guru99.com/process-synchronization.html)
CHAPTER III
PROBLEM ANALYSIS
3.1 Critical Section Problem
A critical section is a segment of code which can be accessed by a signal process
at a specific point of time. The section consists of shared data resources that required to
be accessed by other processes.
In the critical section, only a single process can be executed. Other processes,
waiting to execute their critical section, need to wait until the current process completes
its execution.
Progress : This solution is used when no one is in the critical section, and
someone wants in. Then those processes not in their reminder section should
decide who should go in, in a finite time
Bound Waiting : When a process makes a request for getting into critical
section, there is a specific limit about number of processes can get into their
critical section. So, when the limit is reached, the system must allow request to
the process to get into its critical section.
With the help of this solution whenever a process is executing in any critical
state, then the other process only executes the rest of the code, and opposite
can happen. This method also helps to make sure that only a single process
runs in the critical section at a specific time.
5
6
Example :
PROCESS Pi
FLAG[i] = true
while( (turn != i) AND (CS is !free) ){ wait;
}
CRITICAL SECTION FLAG[i] = false
turn = j; //choose another process to go to CS
Assume there are N processes (P1, P2, … PN) and every process at some
point of time requires to enter the Critical Section
The process which enters into the critical section while exiting would
change the TURN to another number from the list of ready processes.
Example: turn is 2 then P2 enters the Critical section and while exiting
turn=3 and therefore P3 breaks out of wait loop.
Then, a process has to wait until the lock becomes 0. Then, the
process can make the mutex semaphore value of 1 and start its critical
section. When the critical section is completed, it can reset the value of the
mutex semaphore to 0. And some other processes can enter its critical
section.
Counting Semaphores:
They can have any value and are not bound to a certain domain.
They used to manage access to a resource that has a limitation on the
number of simultaneous accesses. The semaphore can be initialized to
the number of instances of the resources.
After the process is over with the use of the instance of the
resource, it can leave the critical section by adding 1 to the number of
available instances of the resource.
8
Several processes access and process the manipulations over the same data
concurrently, then the outcome relies on the particular order in which the access takes
place. A race condition is a condition that may appear inside a critical section. This
happens when the result of multiple thread execution in the critical section differs
according to the order in which the threads execute.
It will help us to make a priority for the process because it can only run
one processes at a time and helped us to reduce the posibillity process read or
write an inconsistency data because to much procesess. And it regulates the
process so it goes in sequence as we command it first.
4.2. Suggestions
Like we know in this paper, there are several method to solve problem in
process synchronization like Peterson solution’s, Synchronization hardware,
Mutex Locks, and Semaphores. This several method will help us to solve critical
section problem, and make process synchronization run well again.
9
BIBLIOGRAPHY
10