Free Fire
Free Fire
* Required
in dan out
turn
counter
1 saja
0 saja
false saja
true saja
0 atau 1
flag[0] = true
turn = 1
turn = 0
flag[1] = false
flag[0] = false
flag[1] = true
flag[j] = true
turn = i
flag[i] = true
turn = j
None of these
it is invalid
1-3
10-12
5-8
3-4
8-12
Which of the following conditions must be satisfied to solve the critical section
problem? *
Progress
Bounded Waiting
Mutual Exclusion
while(turn != 0)
while(flag[0])
while(flag[1])
while(turn != 1)
can affect the execution of another process and cannot be affected by the execution
of another process
data inconsistency
None of these
data insecurity
data consistency
cannot affect the execution of another process and can be affected by the execution
of another process
one
two
four
three
static
None of these
single
atomic
jika false (turn=0) maka proses diijinkan untuk menjalankan critical section-nya
jika false (turn=1) maka proses diijinkan untuk menjalankan critical section-nya
1-3
9-14
6-9
3-5
17-20
The segment of code in which the process may change common variables,
update tables, write into files is known as ____________ *
program
critical section
synchronizing
wait
signal
hold
stop
1 saja
false saja
true saja
0 atau 1
0 saja
12-18
1-7
9-12
7-8
Bounded waiting implies that there exists a bound on the number of times a
process is allowed to enter its critical section ____________ *
after a process has made a request to enter its critical section and before the request
is granted
agar Pj dapat menjalankan cs-nya karena pada proses Pj "while(flag[i])" bernilai true
agar Pj dapat menjalankan cs-nya karena pada proses Pj "while(flag[i])" bernilai false
None of these
integer variable
The signal operation of the semaphore (no busy waiting) basically works on the
basic _______ system call. *
getup()
start()
continue()
wakeup()
if a process is executing in its critical section, then all the resources of the system
must be blocked until it finishes execution
7-8
12-18
1-7
9-12
The wait operation of the semaphore (no busy waiting) basically works on the
basic _______ system call. *
hold()
stop()
wait()
block()
mutual execution
bounded waiting
progress
bounded buffer
process
1-7
12-18
7-8
9-12
10-12
1-3
8-12
3-4
5-8
data inconsistency
data consistency
data insecurity
Berikut ini merupakan bagian dari bentuk umum algoritma 1 untuk Pi! (pilih 2) *
turn=j
flag[i]=true
while(flag[i])
while(turn != i)
flag[i]=false
A semaphore: *
None of these
is a binary mutex
6-9
1-3
3-5
9-14
17-20
synchronous exclusion
critical exclusion
asynchronous exclusion
mutual exclusion
while(flag[j])
while(turn != i)
while(turn != j)
while(flag[i])
flag[j] = true
while(flag[i])
while(!flag[i])
while(flag[j])
flag[i] = false
flag[i] = true
information sharing
convenience
modularity
computation sharing
information speed-up
computation speed-down
None of these
if a process is executing in its critical section, then all the resources of the system
must be blocked until it finishes execution
parent process
init process
child process
cooperating process
while(flag[0])
while(turn != 0)
while(turn != 1)
while(flag[1])
42
12
Bounded-buffer: (pilih 3) *
ukuran tertentu
Other:
Apa arti dari "turn=j" pada proses Pi dan "turn=i" pada proses Pj algoritma 1? *
8-12
10-12
1-3
5-8
3-4
Berikut ini merupakan bagian dari bentuk umum algoritma 2 untuk P1! (pilih 2) *
while(flag[1])
while(turn != 1)
flag[1]=true
flag[1]=false
turn=1
0.5
-1
1-3
3-5
6-9
9-14
17-20
thread
pipe
semaphore
socket
The following three conditions must be satisfied to solve the critical section
problem: (pilih 3) *
Waiting Time
Process
Mutual Section
Bounded Time
Progress
Mutual Execution
Bounded Waiting
Mutual Exclusion
entrace section
remainder section
excuse section
reminder section
escape section
turn = j
flag[j] = true
turn = i
flag[j] = false
flag[i] = false
flag[i] = true
P0 dan P1
Pj dan Pi
P1 dan P2
i=1-j
j=1+i
atomic
static
single
turn = 1
flag[0] = false
flag[1] = true
turn = 0
flag[1] = false
flag[0] = true
Kapan nilai counter diturunkan dan oleh siapa yang menurunkan nilai counter? *
nilai counter diturunkan oleh producer jika ada item baru ditambahkan ke dalam
buffer (oleh producer)
nilai counter diturunkan oleh producer jika ada item yang dibaca dari buffer (oleh
producer)
nilai counter diturunkan oleh consumer jika ada item baru ditambahkan ke dalam
buffer (oleh consumer)
nilai counter diturunkan oleh consumer jika ada item yang dibaca dari buffer (oleh
consumer)
each process receives a number (may or may not be unique) and the one with the
lowest number is served next
each process gets a unique number and the one with the lowest number is served
next
each process gets a unique number and the one with the highest number is served
next
Kapan nilai counter dinaikkan dan oleh siapa yang menaikkan nilai counter? *
nilai counter dinaikkan oleh consumer jika ada item baru ditambahkan ke dalam
buffer (oleh consumer)
nilai counter dinaikkan oleh producer jika ada item yang dibaca dari buffer (oleh
producer)
nilai counter dinaikkan oleh consumer jika ada item yang dibaca dari buffer (oleh
consumer)
nilai counter dinaikkan oleh producer jika ada item baru ditambahkan ke dalam buffer
(oleh producer)
A situation where several processes access and manipulate the same data
concurrently and the outcome of the execution depends on the particular order
in which access takes place is called ____________ *
aging
data consistency
race condition
starvation
lebih dari satu proses pada saat yang sama dan saling berinteraksi memerlukan
sinkronisasi agar terkendali dengan baik
dua atau lebih proses pada saat yang sama dan saling sinkronisasi memerlukan
berinteraksi agar terkendali dengan baik
When several processes access the same data concurrently and the outcome of
the execution depends on the particular order in which the access takes place, is
called? *
race condition
dynamic condition
critical condition
essential condition
Apa arti dari "while(turn != i)" pada struktur proses Pi algoritma 1? (pilih 2) *
jika nilai turn=j, maka saat Pi menjalankan pernyataan "while(turn != i)" hasilnya true
dan Pi do nothing
jika nilai turn=i, maka saat Pi menjalankan pernyataan "while(turn != i)" hasilnya true
dan Pi do nothing
jika nilai turn=i, maka saat Pi menjalankan pernyataan "while(turn != i)" hasilnya false
dan Pi diijinkan untuk menjalankan cs-nya
jika nilai turn=j, maka saat Pi menjalankan pernyataan "while(turn != i)" hasilnya false
dan Pi diijinkan untuk menjalankan cs-nya
This form was created inside of Politeknik Caltex Riau. Report Abuse
Forms