PENOEMBANW ALGORITMA tR4AGERRQCESSING UNTUK MENOUGA KEMASAKAN BUAH MMWSE -R (Developmnt of Image Processing Algorithm for Detmining the Mstutity of Fmsh Mangasteen
Similar to PENOEMBANW ALGORITMA tR4AGERRQCESSING UNTUK MENOUGA KEMASAKAN BUAH MMWSE -R (Developmnt of Image Processing Algorithm for Detmining the Mstutity of Fmsh Mangasteen
Similar to PENOEMBANW ALGORITMA tR4AGERRQCESSING UNTUK MENOUGA KEMASAKAN BUAH MMWSE -R (Developmnt of Image Processing Algorithm for Detmining the Mstutity of Fmsh Mangasteen (20)
PENOEMBANW ALGORITMA tR4AGERRQCESSING UNTUK MENOUGA KEMASAKAN BUAH MMWSE -R (Developmnt of Image Processing Algorithm for Detmining the Mstutity of Fmsh Mangasteen
3. Judul
Penulis
Distributed Systems
Prof. Dr. Kuda'13 Boro Seminar, M.Sc
p
--_ ... ~- distributed ~e:::: ..._
:::;::;.e 0 ked e .,;:~:-:=
- ~ ::5~n s 'site- ~~5:'::-~ _-
-~ .:o:r.mol. go 1-. Tr;.: :
-::-.:: :. -",:115. The ....:~:::
e:-.:. T-;:)_
:_:!':~S': of ~r...:.:,:e:-:.
--- ~e :-:0 of It:is ~ook :.: ~ -
ISBN 978-979-4S3-1S7-8
@2007
Hak Cipta dilindungi Undang-undang
Diterbitkan ok!1 IPB Press
Hak cipta dilindungi Undang-undang .
Dilarang memperbanyak sebagian utau seluruh isi buku ini
Dalam bentuk apapun. baik secara elektronik maupun mekanik.
Termastik memfotokopi, merekam, atau menggunakan sistem
Penyimpanan lainnya tanpa izin tertulis dari Penerbit
4. PREFACE
~.'> study of distributed systems is very popular in current research and practices of
-.Jdem interlIetorked enterprises. Distributeu systems enable a loosely coupled
__ operating agents/sites ~esiding in seC~r21 geographical areas to work togeth~r for
_::lieving common goals. This book describes the very essential features, the
_- ::erlying theories, development methodology, and sample applications of
_s::ibuted systems. The target readers of this book can represent students,
--::-::J.rchers. IT practitioners, IT-Based system developers, or IT consultants.
~-:.S ~ook consisTs of 8 chapters, each of which is provided with chapter summary.
~-.e structure flo' of this book is organized as follows:
=--._;·er I begins with the introductory part embracing definitions, characteristics,
_ );,:omy. motivations of a distributed system. Chapter 2 describes variou~ n~twork
:: ):ogies connecting distributed sites, and provides comparisons amo:1g topologies.
__ dist;ibuted sites intf>r-communic(1te, variol~s communication techniques, and
-':ard comJ11unication protocol OSI (Open System Interconnection) are discussed
- ':::-apter 3. Chapter 4 discusses the distrjbu~ion aspects: computat;o:l, data and task,
_= :03lancing, synchronization, recovery and deadlock handling. Chapter 5 describes
-: .:.::sign methods of developing a distributed system and provides example of some
::~g systems. Chapter 6 discusses implementation issues of inter-proces<;
-.~unic3tions hich are very vital to a distributed system. Chapter 7 provides
_: ::~alion of multiuser-tools that enable various sites to worK together in
;:.::~atie modes. Finally Chapter 8 concludes the overall discussions of the
-::::':2ng chapters.
--: 2.Jthor is willing to thank and appreciate all helpful people involved in the
- :"'::';;0 and prodLction of this book. Constructive and fruitful critics al'e sincerely
:: :0:ne to improve the quality of this book in the future.
Bogor, August 2007
Kudang B. Seminar
v
5. Contents
Preface
Contents
List of Figures
List of Tables
Distributed Systems ..
1.1 Definition .
1.2 Characteristics .
1.3 Taxonomy of Distributed Systems ..
1.3.1 Degree of Coupling ..
1.3.2 Elements of a Dis:,ibuted Systcn ..
1.3.3 Location of the Sites .
1.4 rviotives of Distributed El1ironments ..
1.5 Chapter Summary ..
:letwork Topologies ..
2.1 Fully Connected .
2.2 Partially Connected ..
2.2.1 Star Network .
2.2.2 Ring Network .
2.2.3 Cube Connection .
2.2.4 Mesh Connection .
_.3 Hierarchical Network .
_.4 Multi-Access Bus ..
_.5 Chapter Sumrr.ary .
Conllnunications .
=.1 Characteristics and Types of Communication .
Communication Techniques .
3.2.1 Transfer Strategy .
3.2.2 Routing Strategies ..
3.2.3 Connection Strategies .
3.2.4 Contention ..
__ :vlessage Systems and Buffering .
Communication Delays .
: , The Open Systen1S Interconnection (OSI) .
3.5.1 The OS1 Layers .
v
vii
xi
xii
::'
2
3
3
4
4-
:5
5
5
6
6
..,
I
8
8
9
10
11
1j
12
12
13
14
14
15
16
16
17
VI!
7. 17
7
18
18
18
19
_0
20
_1
_I
_2
.2
23
23
23
23
I_"'T
24
_4
2(
27
27
27
_8
_9
29
29
_9
30
32
32
33
35
35
36
37
38
38
40
40
41
42
47
48
4.4 Recovery · 48
4.4.1 Logging............................................................ 49
4.4.2 Shadows................................................................ 49
4.5 Load Balancing............................................................... 49
4.0 Chapter Summary............................................................ 51
5 The Design of Distributed Environments 52
5.1 Basic Design Approaches................................................... 52
5.1.1 Abstract An~lysis of Distributed Systems Using LBB Model.... 52
5.1.'1.1 The Context of Distributed Systems....................... 52
5.1.1.2 System Size................................................... 53
5.1.1.3 Interconnection Topology......................... 54
5.1.1.4 Svstem Bandwidth..... 54
5.1.2 Bottom-up and Top-down Design Approaches..................... 54
5.1.3 System Transparency................................................... 55
5.2 The Existing Tools for Designing Distributed Envilonments.. 56
5.2.1 Provision of TrclIlsactions.............. 56
5.2.1.1 l'.!ulticomputer Transactions................ 56
5.2.1.2 Transaction Tables..................................... 57
5.2.2 The Use of Expert Systems...................... 58
5.2.3 The Use of the Object-Oriented Paradigm.......................... 59
5.2.3.1 Basic Object-Oriented Concepts............................ 60
5.2.3.2 Database of Semantic Information...................... 60
5.2.3.3 Object Immutability and Inter-relationships.. 61
5.2.3.4 System Abstraction and Scalability.... 61
5.2:3.5 Real-Time Shared Objects.............. 61
5.2.4 The Use of Distributed Programming Languages................... 62
5.2.4.1 Object-Oriented Programming Languages.......... 62
5.2.4.2 Knowledge-Based Languages......................... 63
5.2.4.3 Open Network Programming................................. 64
5.3 Chapter Summary........................................................... ..... 64
6 Imple!l1entation Issues on Interproce,s Communication.............. ..... 65
6.1 Pipes.............................................................................. 65
6.2 FIFOs............................................................................. 66
6.3 Message Queue.................................................................. 66
6.4 Shared Memory................................................................. 67
6.5 Berkeley Sockets..................................................... 68
6.6 Remote Procedure Call (RPC)............. 72
6.6.1 RPC Application Interface............................................. 72
6.6.2 The Implementation of RPC........................................... 73
6.6.3 Semantics of RPC....................................................... 74
6.6.4 RPC-to-XDR Interface................................................. 74
6.6.5 Related Problems with RPC............................................ 75
6.7 Remote Evaluation (REV)....... 75
IX
8. 6.8 Generative Communication... 76
6.8.1 Logically Shared Memory.............................................. 76
6.8.2 The Implementation of Tuple Space............................. ..... 77
6.8.3 Distributed Make Utility................................................ 77
6.9 Networking and Windowing Systems........................................ 79
6.9.1 The X Windov System................. 7r;
6.9.1.1 Packet Types..................................................... 80
6.9.1.2 Openin~ the Cl)nner;tion....................................... 80
6.9.1.3 Interclient Communicatioll.................................... 80
6.9.2 Network Extensible Window System (NeWS)....................... 81
" 6.10 Chapter Summ'1ry................................................................ 82
of Figures
: _::.' ronnected ;letwor;; .
':::2: network .
. ::g networks (a)Si £::: ~
-. ~-~ube network .... ~ ....
- . fe h network (b) . 't.-.
~~::-" -tru tured neto:-: ...
.::. -~ r.e work (a) Li e::::-':_~
7 Multiuser Tools
7.1 Components of a Multiuser Tool. ..
7.2 The What-You-See-Is-What-I-See (WYSIWIS) Concept ..
7.3 Computer-Supported Cooperative Work (CSCW) ..
7.3.1 CSCW Application~ ..
'7.3.1.1 CaJencar Management. .
7.3.1.2 Real-Time Conferencing ..
7.3.1.3 Collaborative Document Ed;ting .
7.4 Chapter Summary ..
8 Conclusions .
Bibliography .
x
83
83
8S
8S
RS
8S
86
86
86
87
89
-':: 8 I Ar hite ture
- -~ lasses of dist: :;:.:: ~
. :::.•i 'e time for co. L:7':;:"
-=-:-:.: geometric represe:::..:::...
. _.:::= out schedules ~'. :: :
.:: :':~ ati "ie' of ;-;:~:-_.:_
--.. :-::oni or simulati ;:-.,:.. -- ~ .::: .... _.. -
- ~e. unsare. an de::::: _::
:::Q..:r e al oca 'on F-:=-:-.
::~ ., e alloca;io. f:-:::=-~
-. ere bl k box . r ::_:::::
- .':",..pli ari'e p :,:-':~: •
.-. ;::~e used between :~, .... :~c
... .;-es for a tVO- va,:: '.; ._-
~.?i al movement'o: e::.:..:: ;0::
~:?i al movement 0 dz.:c:o::
. :~;nory .
- .:,et system calls or -c:-:
-_.: 'et system calls for ·C:--
-=-:-:e C ode for the mas e:- ;::.
-=-:-:.: C ode of the pr es~"
-_.~ ser tool compor.e:::: ...
9. 6
6
7
7
9
7r;
o
o
o
I
2
List of Figures
2.1 Fully ronnected network .
_.2 Star network .
2.3 Ring networks (a)Single ring (b)Multiple rings .
_.4 A 3-cube network .
:.5 (a) Mesh network (b) Me;h redrawn .
~.6 Tree structured network .
_.7 Bus network (a) Linear bus (b) lung bus (c) Intercluster bLs .
6
6
7
7
8
9
10
RS
7
9
3.1
':'.1
-3
- 6
The OSI Architecture (Tanenbaum 1988) .
Four classes of distributed shared memory algorithms .
Relative time for concurre.nt processes .
The geometric representztion of a 2-transaction system .
Ruling out schedules by a closed forbidden area .
Schematic view of a mo:-.ilOr. .
A monitor simulating a binary semapho:-e .
Safe, unsafe, and deadlo-:k state spaces .
Resource allocation grapj with a cycle and deadlock .
Resource allocation grap:-, with a cycle but no deadlock .
Layered black box for distributed systems .
(a) Applicative participant and (b) Service participant templates "
A pipe used between tO processes .
Pipes for a two-way flow of data .
Typical movement of data between client and server. .
Typical movement of data between client and server using shared
Men10ry .
Socket system calls for connection-oriented protocol. ..
Sucket system calls for connectionless protocol .
The C code for the master in a distributed nuke facility .
The C code of the process worker .
17
26
30
33
34
36
37
43
46
46
52
57
65
66
67
68
71
71
78
79
Multiuser tool components................................................ ..... 84
Xl
10. List of Tables rl
3.1
3.2
The differences between Connection-Onented and Connectionless
Services .
Four classes of service primitives .
21
21
uted Sy t n
4.1
4.2
:4.3
4.-1-
6.1
6.2
6.3
XII
Four classes of a distributed memory algorithm ..
The compatibility ofread and write locks ..
The compatibility for two-version two-phase locking .
Three phases c~ optin,istic concurrency controL .
Protocols corresponding to socket family and type ..
Combinations of family, type, and protocoL ..
So..:kel system C21lS and association elements ..
25
38
38
40
69
70
70
o ·finition
-' .r!f:m ed 5. 'Siel': :: __ ::,
- .
-~ :-__-:-.::e:15l ....-
::
~-:e lo;::al ':0.•:: _:::~ _
~: :-:. 0: a :T:"-:e~ _ =-..::
11. Chapter 1
Distributed Systems
There are various definitions of a distributed system. These definitions result
:;: a classification of distributed systems. This chapter discusses the principal working
~~'lnirion, characteristics, taxonomy, and motivations of distributed systems.
1.1 Definition
r. distributed system is a set of autonomous interconnected computer systems
:.::h interact to perform compL'tational activities cooperatively. This definition can
.=:Jnher expounded by considering what services a distributed system can provide
'.': h011 they are provided. The terms sites, nodes. hosts, or computers are used to
.':: IO rhe physical distributio'1 of the autonomous computer sy~tems. According te
'~ s udied literature [33, 10. IS, 34. 51, 58. 68, 7, 21], a distributed e)1'ironment
..!-:: support the following facilities.
::-.ccr·site communication.
? e'ource and task distributiOlL
~::current computation.
. e::'.ore access.
- "':'urc detection.
_. ::c;n security and protection.
. :"'::":!bility.
_.3:lUC system configuration.
Characteristics
~e characteristics of distiibuted systems can be identified as the following
... IS. 34, 51, 58, 68, 46, 21].
~nity. The local computer systems can operate autonomously without direct
_;;crvision of a master computer system.
- ••:.nection. A number of sites are connected to each other by a communication
':': ,ork that enables them to exchange information.