You are on page 1of 31

REALTIME SYSTEMS

Class 5 – Timing Constraints


Timing constraints
 kebenaran (correctness) dari real-time tasks tergantung 2 hal ;
kebenaran logis (logical correctness) dari hasil maupun pada
satisfaction of the corresponding timing constraints.
 Timing constraints  apply to certain events in a system.
 Events dapat digenerate oleh tasks/tugas itu sendiri atau dari
lingkungan sistem.
 Contoh dari event ; event aktivasi motor.
 Ingatlah bahwa hasilnya dapat dihasilkan pada waktu yang
berbeda dan mungkin tidak dalam bentuk hasil satu kali saja.
pertama-tama kita harus mengkarakterisasi peristiwa dengan
benar dalam suatu sistem, untuk memahami perilaku
pengaturan waktu dari sistem waktu nyata.
Timing constraints
 Remember that the results may be generated at
different times and it may not be in the form of a
single one time result.
 we must first properly characterize the events in a
system, to understand the timing behavior of real-
time systems.
7. Timing Constraints
7.1 Events in a Real-Time System
 an event may be generated either by the system or its environment.
 Events can be classified into the following two types ; stimulus events
and response events.
1. Stimulus Events
– Generated by the environment and act on the system.
– E.g. a user pressing a button on a telephone set generates
a stimulus event to act on the telephone system. (dihasilkan
secara asinkron/aperiodik).
– E.g the periodic sensing of the temperature of the reactor
in a nuclear plant. (dihasilkan secara asinkron/aperiodik).
7. Timing Constraints
7.1 Events in a Real-Time System
 an event may be generated either by the system or its
environment.
 Events can be classified into the following two types ; stimulus
events and response events.
2. Response Events
– Usually produced by the system in response to
some stimulus events.
– E.g. consider a chemical plant where as soon as the
temperature exceeds 100C, the system responds
by switching off the heater.
7.1 Events in a Real-Time System
 An event may either be instantaneous or may have
certain duration.
 Contoh;
7.2 Classification of Timing Constraints
 Klasifikasi berbagai jenis timing constraints menjadi
penting.
 memberikan wawasan tentang berbagai jenis timing
constraints yang dapat ada dalam suatu sistem,
 juga dapat membantu kita untuk dengan cepat
mengidentifikasi berbagai timing constraints yang bisa
ada dari pemeriksaan masalah.
 Artinya, selain pemahaman yang lebih baik tentang
perilaku (behavioral) suatu sistem,
 juga dapat memungkinkan kita mengerjakan spesifikasi
sistem real-time secara akurat.
7.2 Classification of Timing Constraints
 Timing constraints yang berbeda terkait dengan sistem waktu nyata
secara luas dapat diklasifikasikan ke dalam performance dan behavioral
constraints.
 Performance constraints adalah batasan yang dikenakan pada respons
sistem. behavioral constraints adalah kendala yang dikenakan pada
stimulli yang dihasilkan oleh lingkungan.
 Behavioral constraints memastikan bahwa lingkungan sistem berperilaku
baik (well behaved), sedangkan Performance constraints memastikan
bahwa sistem komputer berkinerja memuaskan.
Setiap kendala kinerja dan perilaku selanjutnya dapat diklasifikasikan ke
dalam tiga jenis berikut:
1. Delay Constraint
2. Deadline Constraint
3. Duration Constraint
7.2 Classification of Timing Constraints
1. Delay Constraint
2. Deadline Constraint
3. Duration Constraint
7.2 Classification of Timing Constraints
1. Delay constraint
– Captures the minimum time (delay) that must
elapse between the occurrence of two arbitrary
events e1 and e2.
– After e1 occurs, if e2 occurs earlier than
minimum delay, then a delay violation is said to
occur.
– Formal expression
t(e2) – t(e1) >=d
7.2 Classification of Timing Constraints
1. Delay constraint
– Captures the minimum time (delay) that must
elapse between the occurrence of two arbitrary
events e1 and e2.
– After e1 occurs, if e2 occurs earlier than minimum
delay, then a delay violation is said to occur.
– Delay constraint event e2 dapat diekspresikan scr
formal sebagai berikut:
t(e2) – t(e1) >=d
T(e2) dan t(e1) adalah time stamps pada masing-masing events
e2 dan e1 dan d adalah minimum delay yang ditentukan dari e2.
Delay constraints

Delay constraint Between Two Events e1 and e2


 Delta menunjukkan pemisahan aktual dalam waktu antara
terjadinya dua event e1 dan e2 dan
 d adalah pemisahan minimum yang diperlukan antara kedua
event(penundaan).
 Sangat mudah untuk melihat bahwa e2 harus terjadi setelah
setidaknya d unit waktu berlalu sejak terjadinya e1, jika tidak kita
akan mengalami pelanggaran keterlambatan (delay violation).
7.2 Classification of Timing Constraints
2. Deadline Constraint
– Menangkap pemisahan maksimum yang
diizinkan antara dua event e1 dan e2. dengan
kata lain, event kedua (mis. e2) harus mengikuti
event pertama (mis. e1) dalam waktu
pemisahan maksimum yang diizinkan.
– Pertimbangkan bahwa t (e1) dan t (e2) adalah
time stamps tentang terjadinya event e1 dan e2
masing-masing dan d adalah batas waktu
seperti yang ditunjukkan pada gambar 17.
7.2 Classification of Timing Constraints
Deadline Constraint Between Two Events e1 and e2

t(e2) – t(e1) ≤ d
– Delta menunjukkan pemisahan aktual antara waktu terjadinya dua event
e1 dan e2, dan d adalah batas waktu (deadline).
– Batasan tenggat waktu (deadline constraint) menyiratkan bahwa e2
harus terjadi dalam unit waktu d dari kejadian event e1. Sebagai
alternatif, kita dapat menyatakan bahwa t (e1) dan t (e2) harus
memenuhi batasan.
 The deadline and delay constraints can further be
classified into two types each based on whether the
constraint is imposed on the stimulus or on the
response event.
7.2 Classification of Timing Constraints
3. Duration Constraint
– Duration constraint pada suatu event menentukan
periode waktu di mana event tersebut terjadi. Duration
constraint dapat berupa tipe minimum atau tipe
maksimum.
– Duration constraint jenis minimum mengharuskan ketika
suatu event dimulai, event tidak boleh berakhir sebelum
durasi minimum tertentu;
– sedangkan batasan durasi jenis maksimum
mensyaratkan bahwa setelah suatu event dimulai, event
harus berakhir sebelum durasi maksimum tertentu
berlalu.
 berbagai kelas timing constraints digambarkan
dengan menggunakan contoh-contoh dari sistem
telepon yang dibahas dalam [1]. Diagram skematis
dari sistem telepon diberikan pada Gambar. 18.
 Di sini, handset telepon dan Public Switched
Telephone Network (PSTN) dianggap sebagai sistem
komputer dan pengguna membentuk lingkungan.
Berikut ini, diberikan beberapa contoh sederhana
dari sistem telepon untuk menggambarkan berbagai
jenis timing constraints.
7.3 Examples of Different Types of Timing Constraints

1. Deadline Constraints
In the following, we discuss four different types of deadline constraints
that may be identified in a real-time system depending on whether the two
events involved in a deadline constraint are stimulus type or response type.
– Stimulus-Stimulus (SS)
– Stimulus-Response (SR)
– Response-Stimulus (RS)
– Response-Response (RR)

2. Delay Constraint (only SS type)


3. Duration Constraint
1. Deadline Constraints
a. Stimulus-Stimulus (SS)
– Deadline didefinisikan antara dua stimuli.
– Ini adalah behavioral constraint, karena constraint
tersebut dikenakan pada event kedua yang
merupakan stimulus.
– Contoh: once a user completes dialing a digit, he
must dial the next digit within the next five seconds.
Otherwise, an idle tone is produced.
– : the dialing two consecutive digits represents the
two stimuli to the telephone system.
1. Deadline Constraints
a. Stimulus-Stimulus (SS)
– Deadline is defined between two stimuli.
– This is a behavioral constraint, since the
constraint is imposed on the second event
which is a stimulus.
– Example:
b. Stimulus-Response (SR)
– Deadline didefinisikan pada response event,
diukur dari terjadinya event stimulus yang sesuai.
– Ini adalah performance constraint, karena kendala
tersebut dikenakan pada response event.
– Contoh: once the receiver of the hand set is lifted,
the dial tone must be produced by the system
within 2 seconds, otherwise a beeping sound is
produced until the handset is replaced.
b. Stimulus-Response (SR)
– Deadline is defined on the response event,
measured from the occurrence of the
corresponding stimulus event.
– This is a performance constraint, since the
constraint is imposed on the response event.
– Example : once the receiver of the hand set is
lifted, the dial tone must be produced by the
system within 2 seconds, otherwise a beeping
sound is produced until the handset is replaced.
c. Response-Stimulus (RS)
– Deadline ada pada produksi tanggapan/response
yang dihitung dari stimulus yang sesuai.
– Ini adalah behavioral constraint, karena constraint
tersebut dikenakan pada stimulus event.
– Contoh: setelah nada panggil muncul, digit
pertama harus dipanggil dalam 30 detik, jika
tidak, sistem akan memasuki kondisi siaga dan
nada siaga akan dihasilkan.
c. Response-Stimulus (RS)
– Deadline is on the production of response
counted from the corresponding stimulus.
– This is behavioral constraint, since the constraint
is imposed on the stimulus event.
– An example : once the dial tone appears, the
first digit must be dialed within 30 seconds,
otherwise the system enters an idle state and an
idle tone is produced.
d. Response-Response(RR)
– Deadline constraint didefinisikan pada dua respons
event.
– Dalam hal ini, setelah respons event pertama terjadi,
respons event kedua harus terjadi sebelum batas
waktu / deadline tertentu.
– Ini adalah performance constraint, karena timing
constraint telah ditentukan pada respons event.
– Contoh: once the ringtone is given to callee, the
corresponding ring back tone must be given to the caller
within two seconds, otherwise the call is terminated.
d. Response-Response(RR)
– Deadline constraint is defined on two response events.
– In this case, once the first response event occurs, the
second response event must occur before a certain
deadline.
– This is a performance constraint, since the timing
constraint has been defined on a response event.
– Example : once the ringtone is given to callee, the
corresponding ring back tone must be given to the
caller within two seconds, otherwise the call is
terminated.
2. Delay Constraint:
– Only one type of delay constraint (SS type) in
the telephone system example that we are
considering.
– However, in other problems it may be possible
to identify different types of delay constraints.
– An example : once a digit is dialed, the next digit
should be dialed after at least 1 second.
Otherwise, a beeping sound is produced until
the call initiator replaces the handset.
3. Duration Constraint
– A duration constraint on an event specifies the
time interval over which the event acts.
– Example : if you press the button of the handset
for less than 15 seconds, it connects to the local
operator. If you press the button for any
duration lasting between 15 to 30 seconds, it
connects to the international operator.
– If the button pressed for more than 30 seconds,
the on releasing it would produce the dial tone.
 Mahasiswa diberikan tugas untuk mengidentifikasi
tipe timing constraints (deadline, delay/ duration)
dari sistem sederhana yang ditentukan sendiri.
 Dikumpulkan, dosen mengoreksi .
 Kemudian tugas dilanjutkan sebagai evaluasi dari
materi Modelling timing constraints, mahasiswa
dapat membuat model timing constraints dari tugas
sebelumnya.

You might also like