Coordinating Distributed Objects Frlund Svend

osaimivennie 7 views 86 slides May 17, 2025
Slide 1
Slide 1 of 86
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59
Slide 60
60
Slide 61
61
Slide 62
62
Slide 63
63
Slide 64
64
Slide 65
65
Slide 66
66
Slide 67
67
Slide 68
68
Slide 69
69
Slide 70
70
Slide 71
71
Slide 72
72
Slide 73
73
Slide 74
74
Slide 75
75
Slide 76
76
Slide 77
77
Slide 78
78
Slide 79
79
Slide 80
80
Slide 81
81
Slide 82
82
Slide 83
83
Slide 84
84
Slide 85
85
Slide 86
86

About This Presentation

Coordinating Distributed Objects Frlund Svend
Coordinating Distributed Objects Frlund Svend
Coordinating Distributed Objects Frlund Svend


Slide Content

Coordinating Distributed Objects Frlund Svend
download
https://ebookbell.com/product/coordinating-distributed-objects-
frlund-svend-56389036
Explore and download more ebooks at ebookbell.com

Here are some recommended products that we believe you will be
interested in. You can click the link to download.
Coordination Of Distributed Energy Resources In Microgrids
Optimisation Control And Hardwareintheloop Validation Yan Xu
https://ebookbell.com/product/coordination-of-distributed-energy-
resources-in-microgrids-optimisation-control-and-hardwareintheloop-
validation-yan-xu-38251642
Distributed Coordination Theory For Robot Teams Ashton Roza Manfredi
Maggiore
https://ebookbell.com/product/distributed-coordination-theory-for-
robot-teams-ashton-roza-manfredi-maggiore-47284812
Distributed Coordination Of Multiagent Networks Emergent Problems
Models And Issues Ren
https://ebookbell.com/product/distributed-coordination-of-multiagent-
networks-emergent-problems-models-and-issues-ren-21986218
A Distributed Coordination Approach To Reconfigurable Process Control
1st Edition Nirav N Chokshi Phd
https://ebookbell.com/product/a-distributed-coordination-approach-to-
reconfigurable-process-control-1st-edition-nirav-n-chokshi-phd-4192950

Distributed Coordination Of Multiagent Networks Emergent Problems
Models And Issues Wei Ren
https://ebookbell.com/product/distributed-coordination-of-multiagent-
networks-emergent-problems-models-and-issues-wei-ren-1661548
Zookeeper Distributed Process Coordination Flavio Junqueira
https://ebookbell.com/product/zookeeper-distributed-process-
coordination-flavio-junqueira-4547282
Coordination Control Of Distributed Systems 1st Edition Jan H Van
Schuppen
https://ebookbell.com/product/coordination-control-of-distributed-
systems-1st-edition-jan-h-van-schuppen-4932550
Distributed Intelligent Systems A Coordination Perspective 1st Edition
Abdellah Bedrouni
https://ebookbell.com/product/distributed-intelligent-systems-a-
coordination-perspective-1st-edition-abdellah-bedrouni-11855266
Enhanced Coordination Strategy For An Aggregator Of Distributed Energy
Resources Participating In The Dayahead Reserve Market Cindy Paola
Guzman
https://ebookbell.com/product/enhanced-coordination-strategy-for-an-
aggregator-of-distributed-energy-resources-participating-in-the-
dayahead-reserve-market-cindy-paola-guzman-10905168

   

   
Coordinating Distributed Objects
An Actor­Based Approach to Synchronization
Svend Frølund
The MIT Press 
Cambridge, Massachusetts 
London, England

   
© 1996 Massachusetts Institute of Technology
All rights reserved. No part of this book may be reproduced in any form by any electronic or mechanical means (including photocopying, recording, or information 
storage and retrieval) without permission in writing from the publisher.
This book was set in Computer Modern by Omegatype Typography, Inc. and printed and bound in the United States of America.
Library of Congress Cataloging­in­Publication Data
Frølund Svend. 
Coordinating distributed objects: an actor­based approach to 
synchronization / Svend Frølund. 
p. cm. 
Includes bibliographical references and indexes. 
ISBN 0–262–06188–0 (hb: alk. paper) 
1. Electronic data processing—Distributed processing. 2. Object­oriented
programming (Computer science) I. Title. 
QA76.9.D5F76 1996 
005.2—dc20 
96–24467 
CIP

   
To my parents, Agnethe and Rudolf

   
 
Contents
 
List of Figures viii
 
List of Tables x
 
List of Examples xii
 
Foreword xiii
 
Acknowledgments xv
1 Introduction 1
1.1Object­Oriented Programming 2
1.2Actors 3
1.3Coordination 4
1.4Overview 9
2 Synchronization Constraints 11
2.1Design Considerations 11
2.2Specification of Synchronization Constraints 13
2.3Inheritance of Synchronization Constraints 17
2.4Refinement of Synchronization Constraints 25
2.5Possible Extensions 26
  2.5.1Set­Based Patlerns 26
  2.5.2 Message Priority 28
  2.5.3Garbage Collection of Obsolete Messages 30
2.6Related Work 31
  2.6.1Semaphores and Monitors 31
  2.6.2 Path Expressions 32
  2.6.3Receive Actions 32
  2.6.4 Activation Conditions 33
  2.6.5Explicit Method Enabling 34
  2.6.6Hybrid Approaches 35
2.7Conclusion 36
3  Synchronizers 39
3.1Design Considerations 39

   
 
Page viii
3.2Synchronizers and Synchronization Constraints 40
3.3Functionality of Synchronizers 41
3.4Language Support for Synchronizers 43
  3.4.1Message Patterns 44
  3.4.2Triggers 46
  3.4.3Disabling Constraints 46
  3.4.4Atomicity Constraints 50
  3.4.5Composing Disabling and Atomicity Constraints 55
3.5Combined Evaluation 56
3.6Application of Synchronizers 57
3.7Possible Extensions 67
  3.7.1Constraining Specific Messages 67
  3.7.2Conditions for Synchronizer Enforcement 68
  3.7.3 Multimessage Patterns 69
  3.7.4Incremental Strengthening of Atomic Constraints 69
3.8Related Work 71
  3.8.1Explicit Coordinators 71
  3.8.2Transactions 73
  3.8.3Atomic Broadcast 73
  3.8.4Multiparty Interactions 74
  3.8.5Triggers 74
  3.8.6Multimedia Synchronization 75
  3.8.7Constraint­Based Languages 76
  3.8.8Global Assertions 77
  3.8.9 Graph Rewriting 77
  3.8.10Documentation of Coordination 78
3.9Conclusion 78
4 Semantics 81
4.1Language Overview 81
4.2Language Syntax 84
  4.2.1Primitive Operations 86
  4.2.2Actors 86

   
 
Page ix
  4.2.3Synchronizers 87
  4.2.4Examples 88
4.3Representation of Actor Systems 91
  4.3.1 Representation of Actors 92
  4.3.2Representation of Messages 93
  4.3.3 Configurations 94
4.4Expression Evaluation 96
4.5Constraint Evaluation 99
  4.5.1Semantics of Disabling Constraints 101
  4.5.2 Semantics of Atomicity Constraints 104
4.6Trigger Evaluation 106
4.7Transitions Between Configurations 108
4.8Discussion 111
4.9Conclusion 112
5 Implementation 115
5.1 High­Level Design Decisions 115
  5.1.1Communication Topology 116
  5.1.2Constraint Evaluation 117
5.2Synchronization Constraints 118
5.3Synchronizer Instantiation and Representation 118
5.4Constraint and Trigger Evaluation 121
  5.4.1Information Flow 121
  5.4.2 Communication Protocols 123
  5.4.3Deadlocks 129
5.5Pseudocode 133
  5.5.1Evaluating Disabling Constraints 136
  5.5.2Constraint Servers 138
  5.5.3Evaluating Atomicity Constraints 141
  5.5.4 Evaluating Disabling and Atomicity Constraints 147
  5.5.5Discussion 149
5.6Serializability 151

   
 
Page x
5.7Fairness 153
  5.7.1 Weak Fairness 154
  5.7.2 Strong Fairness 154
  5.7.3 Our Notion of Fairness 155
5.8Message Complexity 158
5.9Performance 159
5.10Possible Extensions 168
  5.10.1 Migration 168
  5.10.2 Fault Tolerance 168
  5.10.3 Garbage Collection 169
5.11Alternatives 169
  5.11.1 Communication with Constraint Servers 170
  5.11.2 Deadlocks 170
  5.11.3 Concurrent Check Actions 171
  5.11.4 Optimistic Concurrency Control 171
  5.11.5 Distributed Mutual Exclusion 173
5.12Conclusion 174
6 Conclusion 175
 
Glossary 181
 
References 185
 
Name Index 193
 
Subject Index 195

   
 
Page xi
List of Figures
1.1
Producers, consumers, and a shared buffer
5
1.2 A distributed multimedia system
7
2.1 Abstract syntax for patterns and synchronization constraints
13
2.2 An object with synchronization constraints
14
2.3 A bounded buffer class
16
2.4 A bounded buffer subclass
18
2.5 A robot object hierarchy
19
2.6 A robot class
20
2.7 A robot subclass
21
2.8 A resource administrator class
22
2.9 A resource administrator subclass
24
2.10An abstract lock class
27
2.11A queue class
28
2.12A scheduler class
29
2.13A video monitor with garbage collection of old messages
31
2.14A bounded buffer class that is specified with enabled sets
35
3.1 Synchronizer instantiation
42
3.2 Notation for synchronizer behavior
43
3.3 Abstract syntax for patterns, constraints, and triggers
45
3.4 A button class
48
3.5 A synchronizer that provides mutual exclusion for radio buttons
49
3.6 A chopstick class
52
3.7 A synchronizer that enforces indivisible access to multiple chopsticks
53
3.8 Overlapping synchronizers in the dining philosophers example
54
3.9 Composition of constraints
55
3.10 Composed robots with a top­level object that serves as interface
58

   
 
Page xii
3.11
A synchronizer that coordinates cross­robot movement
61
3.12A synchronizer that coordinates multimedia devices
64
3.13 Structure of a virtual reality system
66
3.14A synchronizer that adjusts the rate of position measurements
66
3.15 A synchronizer that enforces indivisible access to two chopsticks and 
a spoon
70
3.16An explicit coordinator
72
4.1 Abstract syntax for LOS
85
4.2 Example actors and synchronizers in LOS
90
4.3 Definition of free variables
95
4.4 Substitution of free variables
97
4.5 The definition of C
map
101
4.6 The definition of D
map
102
4.7 The definition of P
map
 and matches
102
4.8 The definition of U
map
104
4.9 The definition of A
map
105
4.10The definition of T
map
107
4.11Possible transitions between configurations
109
5.1 Distributed and centralized communication topologies
116
5.2 Instantiation of synchronizers
119
5.3 Structure of method tables
120
5.4 Information flow between objects and constraint servers during 
constraint evaluation
123
5.5 Event diagram for constraint evaluation
124
5.6 Constraint evaluation that involves a constrained leaf message
127
5.7 Nesting of check actions
128
5.8 Deadlock between two objects
130
5.9 Deadlock between two constraint servers
131
5.10Deadlock between an object and a constraint server
132

   
 
Page xiii
5.11
Deadlock between two objects
134
5.12Pseudocode for checkDisable
137
5.13Pseudocode for ConstraintServer
139
5.14Pseudocode for checkAtomic
142
5.15Pseudocode for ConstrainedObject
144
5.16Pseudocode for checkMessage
148
5.17A synchronizer that illustrates weak fairness
154
5.18A synchronizer that illustrates strong fairness
155
5.19Round robin notification with overlapping constraint servers
157
5.20Synchronizer that enforces bound on collective allocation of resources
160
5.21A synchronizer that provides atomic access of chopsticks
165

   
 
Page xv
List of Tables
5.1
Check actions initiated by administrators
162
5.2 Check actions initiated by administrators with suspension of objects
163
5.3 Check actions initiated by administrators with single­object resumption
164
5.4 Check actions initiated by chopsticks
165
5.5 Check actions initiated by chopsticks without rechecking after state 
changes
167

   
 
Page xvii
List of Examples
1
Bounded Buffer
15
2 Bounded Buffer with get2 Method
18
3 Robot
18
4 Resource Administration
22
5 Distributed Mutual Exclusion
48
6 Dining Philosophers
51
7 Coordinating Robots
57
8 Multimedia Synchronization
63
9 Virtual Reality
65

   
Page xix
Foreword
It has been widely observed that software is in a perennial state of crisis. I believe that this crisis is in large measure due to the failure of research to focus on the 
problems of complex software systems. The cause of this failure lies in the historical roots of the theory of computing: programming has been defined in terms of the 
mathematical theory of functions. Functions inspired the concept of procedures, which provide both abstraction over a sequence of computational steps and reuse by 
parameterization.
As computation was used for more than numerical calculations, the need for more complex programming constructs arose. Quite early in the history of programming 
languages, Ole­Johan Dahl and Kristen Nygaard developed the concept of objects in the programming language Simula. By mimicking the real world in program 
structure, object­oriented programming simplified the task of doing simulations. The use of objects has since become very popular for programming in general.
Although parallelism is natural in real­world objects, concurrency in Simula was limited to coroutines. Carl Hewitt first proposed the concept of actors as a 
computational model for concurrent programming. The Actor model has evolved over the years and is now widely recognized as a way to unify objects and 
concurrency.
Although actors provide a general model for representing concurrency in distributed systems, the problem of actually building complex software systems has remained 
challenging: such systems not only have a large number of concurrent components, but these components can interact asynchronously to create an exponential number 
of possible outcomes. The need to coordinate the behavior of autonomous components to maintain coherence between components adds considerable complexity to 
the code. Such coordination involves dynamic temporal relations between events occurring in different components; it is usually implemented by explicitly programming 
a large number of messages and the responses to them.
Frølund's insightful observation is that coordination between components often involves temporal constraints between events at those components. Frølund describes a 
novel programming construct, called synchronizer, which allows an abstract, reusable specification over coordination constraints. Synchronizers provide a mechanism 
for reducing code sizes by an order of magnitude. Moreover, Frølund is able to demon­

   
Page xx
strate that such code reduction can be accomplished without sacrificing significant efficiency in execution.
What makes synchronizers particularly attractive is that they integrate well with currently understood ways of simplifying software construction: they maintain 
procedural abstraction, data encapsulation, and inherent concurrency. The net result is to raise the granularity of abstraction to a level that is much closer to the mental 
model of code developers.
This book should be read by both researchers and practitioners involved in programming distributed applications. To the researchers, the book provides insight into 
the problem of coordination that is central to distributed computing. To the practitioner, the book provides a programming methodology that is applicable to a broad 
spectrum of distributed software systems, such as process control, multimedia, and groupware.
In the end, software's perennial crisis will be solved only by revolutionizing how distributed applications are built and maintained. The concepts Frølund describes in 
this book represent a major advance towards that revolution.
Gul A. Agha

   
Page xxi
Acknowledgments
I thank my parents, Agnethe and Rudolf. Their patient support and encouragement made this work possible. I also thank my best friend, Brenda Kesler, for always 
being there for me and for putting up with my endless book writing.
This book is a modified and extended version of my doctoral dissertation. The work reported in this book was carried out at the Open Systems Laboratory, University 
of Illinois, Urbana­Champaign. The members of my doctoral committee—Gul Agha, Geneva Belford, Roy Campbell, Andrew Chien, and Simon Kaplan—provided 
me with invaluable feedback on my research. I especially thank Gul, my Ph.D. adviser, for his guidance and support, for encouraging me to submit my dissertation for 
publication, for writing the foreword to this book, and for extremely helpful and constructive feedback on drafts of this book.
I thank Carolyn Talcott for her thorough and very insightful feedback on drafts of this book. I also wish to acknowledge the very detailed feedback from Pankaj Garg, 
Reed Letsinger, Allan Shepherd, Daniel Sturman, and the anonymous reviewers appointed by MIT Press.
I have benefited greatly from countless discussions with past and present members of the Open Systems Laboratory at the University of Illinois. The laboratory 
members include Christian Callsen, Christopher Houck, Woo Young Kim, Rajendra Panwar, Anna Patterson, Shangping Ren, Daniel Sturman, and Nalini 
Venkatasubramanian. I especially thank Daniel Sturman for helping me to use the BROADWAY library as the basis of my implementation. I thank Shingo Fukui and Takuo 
Watanabe for the discussions we had during their visit to the Open Systems Laboratory. During my stay in Illinois, Ole Agesen, Rune Dahl, and Nayeem Islam all 
provided great inspiration and constructive criticism of my Ph.D. work.
Hewlett­Packard Company supported me in writing this book. I especially thank the members of the Application Engineering Department and the Performance 
Management and Design Department at the Hewlett­Packard Laboratories for their support in this undertaking.
The adviser of my Candidatus Scientiarum thesis at Århus University in Denmark, Ole Lehrmann Madsen, has been a constant source of motivation and support 
throughout my Ph.D. work in Illinois.
The College of Natural Science at Århus University made this work possible by awarding me a research fellowship (kandidatstipendium).

   
Page xxii
The Danish Research Council (forskerakademiet) has also provided generous funding for my stay in Illinois.
The research conducted at the Open Systems Laboratory was supported by the Office of Naval Research (ONR contract number N00014­90­J­1899 and N00014­
93­1­0273), Digital Equipment Corporation, NEC, Hitachi, and joint support from the Advanced Research Projects Agency and the National Science Foundation 
(NSF CCR 90­07195).

   
Coordinating Distributed Objects

   
Page 1
1  
Introduction
The computing industry is moving from centralized mainframe applications to distributed applications that run on a network of computers. This transition is due to 
several factors. First, distributed computing offers scalability; performance can be maintained in the presence of increased workload by adding more resources to the 
application. Second, many applications exhibit physical distribution as an inherent property. For example, an application that connects automatic teller machines with a 
bank database is distributed because the tellers are distributed. In such applications, distribution is not a feature but an inherent property.
Distributed computing introduces issues that are absent in a centralized application. Different components of a distributed application may execute on different 
computers without a common clock and are thus inherently asynchronous. Moreover, the communication between different components of a distributed application 
may be mediated by a computer network and may therefore be subject to network delays. The network delays may be unpredictable since the network may be 
shared with other applications.
Asynchronous execution and arbitrary communication delays give rise to nondeterminism; that is, the relative order in which events occur may be different for different 
executions of a distributed application. However, many applications contain events that must always occur in a particular order. It is therefore necessary to coordinate 
the different asynchronous components of a distributed application in order to guarantee that events occur in a correct order.
Issues such as coordination make the construction of distributed applications more complex than the construction of centralized applications. It therefore is essential 
that distributed programming languages help programmers deal with the added complexity. To address this need, I introduce language constructs that allow 
programmers to implement coordination using high­level abstractions. I do not introduce a complete programming language but only constructs that support 
coordination. My goal is to provide general insights about coordination, and my constructs are not tied to any specific host language.

   
Page 2
1.1 Object­Oriented Programming
Object­oriented programming is becoming the paradigm of choice for conquering the complexity of distributed applications. My language constructs describe 
coordination in an object­oriented setting; this section introduces the most important aspects of object­oriented programming. The basic concepts of object­oriented 
programming were first introduced as part of the Simula [DMN68] programming language. I assume that readers are already familiar with these basic concepts and 
thus provide only a brief summary. (For a more in­depth tutorial of object­oriented concepts, consult [MPN93] or [Mey85].)
Object­oriented programming provides a natural way to decompose a large, complex system into semiautonomous, encapsulated entities called objects. Each object 
has a state and a number of procedures, called methods, to manipulate this state. The state of an object is encapsulated; it can be manipulated only through the 
object's methods, not directly. The methods of an object constitute its interface to other objects. Objects interact by invoking each other's methods.
Besides encapsulation and data abstraction, object­oriented programming also provides concepts that help express the structure of programs. Inheritance is one of 
the more prominent structuring concepts in object­oriented programming. A class describes the behavior of a set of objects, namely, the objects that are instantiated 
from the class. Inheritance can be used to organize class descriptions hierarchically so that one class, called a subclass, is specified as a refinement of another class, 
called a superclass. Inheritance allows common behavior to be factored out and thereby reused. A superclass describes common behavior, and subclasses reuse this 
common behavior.
As an example of inheritance, assume that we want to describe the behavior of different kinds of vehicles, such as cars, trucks, and buses. We want to define a number 
of classes that each captures the behavior of a specific kind of vehicle. Inheritance allows us to define a superclass called Vehicle that captures the general 
behavior of vehicles—the behavior that is common to all kinds of vehicles. We can then define the Car, Truck, and Bus classes as subclasses of Vehicle. 
The advantage of using inheritance is that the Car class captures only the behavior specific to cars; the vehicle behavior of cars is specified in the Vehicle class. 
Similarly, the vehicle behavior of trucks and buses is also specified in the

   
Page 3
Vehicle class. With inheritance, we have to specify the generic vehicle behavior only once. Inheritance also allows us to reflect the inherent structure of the 
application domain: we can reflect the fact that cars, buses, and trucks are all special kinds of vehicles.
1.2 Actors
I use the Actor model [Hew77, Agh86] as the underlying framework for distributed, object­oriented programming. In the Actor model, a distributed application 
consists of a collection of asynchronous objects that execute concurrently.
Objects invoke each other's methods, and thereby communicate, by sending messages. Message passing is the only means of interobject communication; there is no 
notion of shared memory between objects. Messages are asynchronous, which means that sending a message is a nonblocking operation. Messages are guaranteed to 
reach their destination eventually, but may be subject to arbitrary communication delays. Message ordering is not guaranteed; messages may not arrive in the order that 
they were sent. A message invokes a method in its destination object; we say that messages are dispatched into method invocations. Objects are reactive entities that 
execute their methods only in response to messages.
Each object has its own thread of control, which is used to execute methods in response to messages. Since an object only has one thread of control, at most one 
method can be executed at a time by an object. There is no concurrency within an object, only interobject concurrency.
1
 Because an object can only execute one 
method at a time, each object has an input queue in which incoming messages are stored until they can be dispatched.
1. The Actor model as described in [Agh86] contains a notion of internal concurrency where multiple ''reader" methods and one "writer" method can execute concurrently within an 
object. However, the semantics of the model guarantees serializability; the effect of internal concurrency is equivalent to executing the methods one at a time. I have therefore 
chosen to ignore the Actor model's notion of internal concurrency.

   
Page 4
1.3 Coordination
Because objects execute asynchronously and because messages are subject to arbitrary communication delays, the relative order in which messages arrive at an object 
is, in general, nondeterministic. It is often the case, however, that an object must dispatch its messages in a particular order. For example, put and get messages 
sent to a one­element buffer must be dispatched in strict alternation; the buffer cannot consecutively dispatch two put messages.
Ensuring that messages are dispatched in a correct order is a fundamental aspect of coordination in distributed applications.
2
 To address this need, I introduce high­
level language constructs for describing and enforcing message­ordering constraints, along with specific applications in which message­ordering constraints are 
inherent.
Consider a distributed application in which n producer objects generate data for m consumer objects. A given consumer object can consume data from any producer 
object. Producers and consumers communicate through a shared buffer object; producers store data in the buffer, and consumers extract data from the buffer. The 
communication between producers and consumers is illustrated in figure 1.1.
We assume that the buffer has a limited capacity and can hold no more than MAX data elements at any point in time. With this assumption the buffer is subject to the 
following integrity requirements:
• The put method may not be invoked when the buffer is full.
• The get method may not be invoked when the buffer is empty.
These integrity requirements must be satisfied for the buffer to function correctly. The requirements give rise to a message­ordering constraint for put and get 
messages: the number of dispatched put messages minus the number of dispatched get messages must always be less than or equal to MAX and greater than or 
equal to 0.
One way to guarantee satisfaction of the buffer's integrity requirements is to arrange for put and get messages to arrive at the buffer always in an order that is 
consistent with the buffer's message­ordering
2. I use the term coordination instead of synchronization because it is a more precise description of the phenomenon of ordered message dispatch and because my constructs 
have a broader scope than traditional synchronization mechanisms such as semaphores and monitors.

   
Page 5
Figure 1.1 Producers, consumers, and a shared buffer
constraint. However, since the arrival order of messages is non­deterministic, arranging for put and get messages to arrive in a correct order requires that 
producers and consumers exchange "control communication" with the buffer. For example, the control communication needs to ensure that at most one producer sends 
a put message when the buffer holds MAX — 1 elements. The control communication would complicate the description of all the involved objects. Moreover, the 
control communication would include the producers and consumers in the implementation of the buffer's message­ordering constraints. Since the implementation of the 
buffer's message­ordering constraints would then be scattered across multiple objects, the buffer's encapsulation and modularity would be violated; if we were to 
change the buffer's message­ordering constraints, we would have to change the behavior of producers and consumers.
Rather than rely on producers and consumers to arrange for messages to arrive in a correct order, the buffer should be solely responsible for implementing its own 
message­ordering constraints. Rather than dispatch

   
Page 6
messages in their arrival order, the buffer should dispatch messages in an order that is consistent with its own message­ordering constraints. To implement such 
dispatch behavior requires that the programmer explicitly specify the buffer's message­ordering constraints and that the specification be executable; the specification 
should not only capture message­ordering constraints but should also enforce them. I define language constructs called synchronization constraints that allow 
programmers to write executable specifications of per­object message­ordering constraints.
Synchronization constraints delay the dispatch of messages so that the dispatch order is consistent with the message­ordering constraints. For example, if a put 
message arrives when the buffer is full, the synchronization constraints of the buffer delays this message until a get message has been dispatched.
Synchronization constraints express an object's message­ordering constraints as part of the object itself, not as part of the way in which the object is used. For 
example, the producers and consumers do not have to be concerned about the buffer's message­ordering constraints; they can rely on the buffer itself to dispatch 
messages in an order that is consistent with its message­ordering constraints. Since synchronization constraints express an object's message­ordering constraints as 
part of the object itself, they make it easier for programmers to express the logical structure of distributed applications directly. Moreover, synchronization constraints 
make it easier for programmers to maintain distributed applications since they can change an object's message­ordering constraints without modifying other objects.
The term synchronization constraint may be somewhat misleading since synchronization usually implies simultaneity: "Synchronize: occur at the same time; coincide in 
point in time; be contemporary or simultaneous" [Bro93]. Since synchronization constraints enforce ordered dispatch rather than simultaneous dispatch, they do not 
provide synchronization according to this definition. However, there is a long­standing tradition in computer science to interpret the term synchronization more 
broadly so that it is concerned with "correct order" rather than "same time." Rather than invent terminology, I have chosen to be consistent with the computer science 
literature and use synchronization in this broader sense.
The buffer illustrates a scenario where a single object, the shared

   
Page 7
Figure 1.2 A distributed multimedia system
buffer, must dispatch messages in a particular order. However, many applications require that groups of objects dispatch messages in a particular order.
For example, consider the distributed multimedia system in figure 1.2. The multimedia system contains an audio device object that can emit sound and a video device 
object that can emit picture. Moreover, the multimedia system contains an audio server object and a video server object; each server generates a stream of messages 
for its device. Each message contains digitized information. Messages sent to the video device contain digitized video frames, and messages sent to the audio device 
contain digitized sound samples. The devices convert this digital information to an analog signal and emit the signal.
Due to network delays and varying workload at the servers, the order in which messages arrive at the devices is nondeterministic. But there is a logical relation 
between sound samples and video frames: certain samples should be played when certain frames are displayed (this is called lip­synching). Maintaining the logical 
relation between sound samples and video frames is an integrity requirement for the multimedia system. The integrity requirement gives rise to a message­ordering 
constraint

   
Page 8
for play and display messages: if the logical relation between sound samples and video frames is one­to­one, the difference between the number of dispatched 
play and display messages must be within a certain tolerance.
Unlike synchronization constraints that coordinate the message dispatch of only single objects, the message­ordering constraint of the multimedia system is concerned 
with the collective behavior of a group of objects (the audio device and the video device). In order to specify the message­ordering constraint of the multimedia 
system, we need a construct that allows us to specify message­ordering constraints that span multiple objects.
Moreover, we want the specification of these group­level message­ordering constraints to be transparent to the individual group members. For example, we want to 
specify the multimedia message­ordering constraint in a manner that is transparent to the devices themselves. We do not want to use a construct similar to 
synchronization constraints and describe the constraint as part of the devices. Describing the constraint as part of the devices hard­wires the relationship between audio 
and video into the devices, and it prevents us from using the individual devices as part of different multimedia configurations or as stand­alone systems. In contrast, we 
want to specify the multimedia message­ordering constraint as a separate and distinct entity that is associated with the devices rather than part of the devices. Such 
separation allows us to reuse the same generic devices as part of many different multimedia configurations.
A synchronizer is a distinct entity that specifies the message­ordering constraints for a group of objects. A synchronizer transparently delays the dispatch of messages 
by a group of objects according to user­specified criteria. A synchronizer can transparently observe message dispatch by objects in the group, and these observations 
can influence the way in which message dispatch is delayed in the future. For example, the criteria for delaying audio messages may be specified in terms of the number 
of dispatched video messages.
The multimedia example illustrates the notion of an object group. The difference between an object group and a collection of independent objects is that group 
membership limits the autonomy of the group members. Synchronizers allow us to specify object groups that require coordination of the individual group members.

   
Page 9
It is common for group members also to be meaningful as stand­alone objects. For example, this is the case in the multimedia example: both audio and video devices 
can be used in isolation. Because we want to use the same objects as group members and stand­alone objects, it is important that group­level coordination is specified 
as a part of the group's behavior rather than as part of the group members' behaviors. Synchronizers provide us with the needed modularity.
Although both synchronizers and synchronization constraints express message­ordering constraints, there are significant differences between the two concepts. 
Synchronizers specify constraints as part of the context of objects, whereas synchronization constraints specify constraints as part of the implementation of objects.
Synchronization constraints often depend on the state of the objects whose message dispatch they constrain. By specifying synchronization constraints within objects, 
we can describe this state dependence without violating encapsulation. By contrast, because synchronizers should be transparent to objects, they should be specified 
external to objects as distinct entities.
1.4 Overview
Chapter 2 presents language constructs that support the description of synchronization constraints. In contrast to traditional approaches, these constructs allow 
synchronization constraints to be specified separate from the methods of an object. Constraints and methods are two different design concerns composed to describe 
the behavior of an object: methods describe how an object responds to messages, and constraints describe when an object may respond to messages.
Language support for synchronizers is the topic of chapter 3. Our notion of synchronizer facilitates message­ordering constraints to be transparently enforced on a 
group of objects. A synchronizer depends only on object interfaces, not on the encapsulated state of objects. The resulting modularity facilitates reuse and maintains 
the existing abstraction boundaries of a system. Moreover, synchronizers are specified as distinct entities, which makes it possible to describe groupwide ordering 
constraints as an aspect of the group rather than as part of the objects in the group.

   
Page 10
In order to make the language definition precise, chapter 4 provides a formal definition of the semantics of synchronization constraints and synchronizers. The semantic 
definition in chapter 4 assumes that readers are familiar with the basic concepts of programming language semantics, especially the lambda calculus. Readers who are 
primarily interested in the motivation for, expressiveness of, and practicality of synchronization constraints and synchronizers can safely skip chapter 4.
The semantics presented in chapter 4 is operational in the sense that it defines an (abstract) interpreter for distributed object systems with message­ordering 
constraints. A distributed object system is represented by a mathematical entity called a configuration, and computation is represented by transitions between 
configurations. Message­ordering constraints are represented as conditions associated with transitions.
A distributed implementation of constraints is presented in chapter 5. The implementation is complete in the sense that it realizes all the proposed language constructs. 
The implementation provides experimental feedback about the developed constructs, and I outline the trade­offs involved in implementing constraints.
Chapter 6 presents my conclusions, summarizes my most important findings, and points out directions for future work in the area of coordination for distributed object 
systems.

   
Page 11
2  
Synchronization Constraints
An object's synchronization constraints maintain its integrity and ensure that its methods are invoked in a user­specified order. Synchronization constraints express an 
inherent property of objects, whether sequential or concurrent: certain messages cannot be dispatched in all situations. With sequential objects, such message­ordering 
constraints can be an implicit part of the way in which objects are used. With distributed objects, the message arrival order is nondeterministic, and it is not feasible to 
implement an object's message­ordering constraints as part of the way in which it is used. In a distributed setting, message­ordering constraints should be described 
explicitly so that objects can maintain their own integrity.
Here, I present language constructs that support the description of synchronization constraints in an object­oriented manner. The constructs are not tied to any specific 
host language. I provide general insights about synchronization constraints. At the same time, I believe that my constructs could be incorporated into most existing 
concurrent object­oriented languages with minimum modification.
I show how synchronization constraints can be inherited and give examples of applications in which constraint inheritance can be elegantly utilized. I demonstrate how 
inheritance of synchronization constraints can be achieved by simple yet powerful language constructs.
2.1 Design Considerations
A programming language should separate the specification of synchronization constraints from the specification of methods. Methods specify how an object responds 
to messages; synchronization constraints specify when an object may respond to messages. A programming language should reflect this logical distinction between 
different design concerns of a distributed object: a primary purpose of a programming language is to help the programmer directly express the inherent structure of the 
system under consideration.
Besides helping the programmer express the inherent structure of a system, separate specification of synchronization constraints and methods also simplifies reasoning 
and supports modularity. Separation makes it possible to reason about synchronization constraints and methods in

   
Page 12
isolation, thereby reducing complexity. Furthermore, separation gives modularity: with separation of synchronization constraints and methods, the language supports the 
programmer in changing one design concern without changing the other. For example, consider a bounded buffer object. The synchronization constraints for a 
bounded buffer are that the put method cannot be invoked when the buffer is full and that the get method cannot be invoked when the buffer is empty. Suppose we 
wish to change the implementation of the buffer from an array representation to a linked list representation. The synchronization constraints are identical for both 
implementations, but the put and get methods must be changed. With separation, the language provides explicit support for the programmer to change the methods in 
isolation; the programmer does not have to be concerned with inadvertently changing the synchronization constraints as a side effect of changing the methods.
Since we are interested in distributed, object­oriented programming languages, our language constructs should provide support for synchronization constraints in an 
object­oriented manner. Support for synchronization constraints should integrate, rather than interfere with, object­oriented language features. Achieving this integration 
is an active area of research. Especially challenging is the integration of synchronization constraints and inheritance. It is a testimony to this challenge that numerous 
object­based concurrent languages, such as ABCL [Yon90], POOL­T [Ame87], and Procol [vdBL91], do not support inheritance.
Language constructs that integrate inheritance and synchronization constraints should satisfy the following two criteria:
1. The correct specification of synchronization constraints should not prevent method inheritance.
2. It should be possible to inherit, and incrementally modify, synchronization constraints.
The first criterion is important because the need to express method inheritance does not diminish when making the transition from centralized to distributed applications. 
The second criterion addresses the need to extend inheritance to cover synchronization constraints also. Otherwise, if inheritance applied only to methods, the 
synchronization constraints for inherited methods would have to be respecified in subclasses, leading to the following problems:

   
Page 13
Figure 2.1 Abstract syntax for patterns and synchronization constraints
• Duplication of information. The same synchronization constraints would be duplicated in the description of multiple classes. Duplication of information makes it 
harder to maintain programs
• Violation of encapsulation. Because synchronization constraints depend on the private state of objects, respecifying synchronization constraints in the definition of 
subclasses would expose the representation of superclasses.
In the following, I present the design of language constructs that support synchronization constraints in accordance with the design considerations I have set out. The 
constructs integrate with inheritance and support separation of synchronization constraints and methods.
2.2 Specification of Synchronization Constraints
The synchronization constraints of an object are a list of message patterns. Each pattern prohibits the dispatch of a category of messages—those messages that match 
the pattern. The programmer defines a pattern within the scope of an object, and a pattern can prohibit the dispatch of only messages destined for that ''enclosing" 
object.
Figure 2.1 introduces the syntax for patterns. The programmer specifies patterns separately from methods as a distinct part of objects. The pattern part of an object is 
identified by the disable keyword.
A pattern "method(x
1
 ,…, x
n
) if exp" matches a message m if the following two conditions are satisfied:
1. The message m is destined for the method called method.
2. The Boolean expression exp evaluates to true in an environment where the parameters "x
1
 ,…, x
n
" are bound to the content of m. Since

   
Page 14
a message is a request for invocation of a method, the content of a message corresponds to the actual values of the invocation.
The parameters of a pattern are similar to the formal parameters of a function, and the expression of a pattern is similar to the body of a function. The parameters of a 
pattern are visible only in the expression associated with the pattern. Furthermore, the formal parameters of a pattern must correspond with the parameter list of the 
method identified by the pattern. As syntactic sugar, I shall omit the parameter list from a pattern if the pattern's body expression does not depend on the content of 
messages.
The expression of a pattern can refer to the instance variables of the enclosing object. Thus, pattern matching may depend on the current state of the enclosing object.
Figure 2.2 illustrates the dispatch of messages when objects are subject to synchronization constraints. When a message arrives at an object, it is stored in the object's 
input queue. An object can dispatch
Figure 2.2 An object with synchronization constraints

   
Page 15
only those messages in its input queue that do not match any of its patterns. If a message matches any pattern, it remains in the input queue. A message that does not 
match any pattern in its destination object is said to satisfy the synchronization constraints of its destination object. Furthermore, a message that satisfies the 
synchronization constraints of its destination object is said to be legal.
The legality of messages may change over time: pattern matching may depend on the state of the enclosing object, and the state of that object can change over time. 
Hence, a message that matches a pattern at one point in time may not match any pattern at a later point in time. Even if it is not possible to dispatch a message initially, 
the message may be dispatched later. Since messages can become legal and be dispatched later than their arrival time, the effect of patterns is to delay messages rather 
than reject them.
Pattern expressions should be free from side effects. If pattern expressions have side effects, the outcome of executing application programs may depend on the order 
in which pattern expressions are evaluated and on when, and how often, pattern expressions are reevaluated. It is undesirable to have implementation aspects, such as 
the strategy for expression evaluation, affect the outcome of applications.
I illustrate the notation for synchronization constraints with a simple example:
Example 1 Bounded Buffer
A bounded buffer object has put and get methods and a size instance variable whose value reflects the current number of elements in the buffer. We assume that 
the bound of a buffer is given by a constant MAX; the buffer can hold no more than MAX elements. With these conventions, figure 2.3 sketches the structure of a 
bounded buffer class from which individual buffer objects can be instantiated.
The item argument for the put method denotes an item to be added to the buffer; the client argument of the get method denotes a "consumer" object to 
which the buffer sends an extracted item. The synchronization constraints ensure that a put message is not dispatched by a full buffer and that a get message is not 
dispatched by an empty buffer.
Consider the following pattern defined in the BoundedBuffer class:
put if size = MAX;

   
 
Figure 2.3  
A bounded buffer class 
Page 16
class BoundedBuffer
   size := 0; …
disable    
put if size = MAX;   
get if size = 0;   
method put (item) … end put;   
method get (client) … end get;
end BoundedBuffer;
This pattern describes the synchronization constraints for the put method. The pattern matches put messages if the current number of buffer elements is equal to 
MAX. If the buffer contains fewer than MAX elements, put messages do not match this pattern. Hence, put messages are delayed only if the buffer is full. Since the 
pattern's body expression (size = MAX) does not depend on the actual items being deposited in the buffer, I have omitted the parameter of the pattern.
We say that messages satisfy the synchronization constraints of an object if they do not match any pattern in the object. For example, put messages satisfy the 
synchronization constraints of the bounded buffer if the expression size = MAX evaluates to false. It is important to distinguish between satisfying the 
synchronization constraints and "satisfying" the Boolean expression of a pattern; these are two opposite notions of satisfaction.
The input queue of an object may contain multiple messages that all satisfy the synchronization constraints of the object. Since messages are dispatched one at a time, a 
choice must be made between the messages that can be dispatched. Hence, a message is not necessarily dispatched at the first point in time when it satisfies the 
synchronization constraints. However, the implementation should ensure that a message that continually satisfies the synchronization constraints is eventually dispatched. 
This notion of fairness can be ensured by recording the arrival order of messages and, when choosing between two messages, dispatching the

   
Page 17
"oldest" message that satisfies the synchronization constraints. As I discuss in chapter 5, the implementation guarantees this notion of fairness.
2.3 Inheritance of Synchronization Constraints
Inheritance allows a subclass to be defined by incremental modification of a superclass [WZ88]. Traditional inheritance mechanisms provide incremental modification 
operators for classes and methods. I introduce incremental modification of synchronization constraints.
I employ a simple notion of constraint inheritance: superclass patterns are always inherited, and they are inherited as is. Hence, the synchronization constraints of a 
subclass consist of the patterns defined in the subclass plus the patterns defined in its superclass.
1
 Put more formally, a class C is subject to a pattern P if and only if P 
satisfies one of the following two conditions:
• P is defined in the disable clause of C.
• The superclass of C is subject to P.
These rules imply that patterns are accumulated downward in an inheritance hierarchy; superclass patterns can never be "canceled." Since superclass patterns cannot 
be canceled, the synchronization constraints of a subclass are at least as restrictive as the synchronization constraints of its superclass. In section 2.4, I examine further 
the relationship between subclass and superclass synchronization constraints and describe the rationale behind my notion of constraint inheritance.
Since synchronization constraints are specified separately from the constrained methods, it is possible to define subclasses in which only the synchronization constraints 
are changed.
In the remainder of this section, I present three applications of constraint inheritance. Example 2 is a classic example from the literature on inheritance of 
synchronization constraints. It illustrates derivation of a subclass with additional methods and refinement of superclass synchronization constraints to handle these 
additional methods.
Example 2 Bounded Buffer with get2 Method
Suppose we want to extend the functionality of a bounded buffer by
1. For simplicity, we ignore the issue of multiple inheritance.

   
 
Figure 2.4  
A bounded buffer subclass 
Page 18
  disable get2 if size  1;  
method get2(client) . . . end get2; 
class Get2Buffer inherits BoundedBuffer
end Get2Buffer;
adding a method to retrieve two instead of one element from the buffer. This extension can be achieved by means of inheritance. A subclass Get2Buffer can be 
derived from BoundedBuffer. The Get2Buffer class inherits put and get from BoundedBuffer , and it defines a get2 method that sends 
two elements to a consumer object.
The Get2Buffer class is outlined in figure 2.4. The pattern defined in Get2Buffer ensures that the get2 method cannot be invoked when the buffer holds 
one or fewer elements. With our notion of constraint inheritance, the synchronization constraints for the get2 method can be described without interfering with the 
inheritance of the put and get methods and their corresponding patterns. As I illustrate in section 2.6.5, this absence of interference is not trivial to obtain.
The preceding example illustrates inheritance of synchronization constraints for subclasses that add new methods. The following two examples demonstrate the need 
for actual modification of inherited synchronization constraints.
Example 3 Robot
Consider a computer­controlled robot that moves widgets around in a workplace. The robot consists of a hand and an arm. The hand grabs and releases widgets, and 
the arm moves the hand around. We can model the robot as a part­whole hierarchy with a robot object that serves as an "interface" to the hand and arm objects. The 
hand and arm objects are then part of the representation of the robot: the outside world only communicates with the robot object that plays the role of interface. The 
robot object defines a method called move that other objects can invoke in order to move a widget from one position to another. The move method has two 
parameters: the start and end positions of a move operation.

   
Page 19
Figure 2.5 A robot object hierarchy
Figure 2.5 illustrates the structure of the robot object hierarchy. In order to service a move request, the robot object communicates with the hand and arm objects in 
order to activate them and cause them to carry out the actual physical movement of a widget. We assume that a hand object responds to grab and release 
messages. A hand object sends a grabDone message back to the robot object when the actual grab operation is complete at the physical robot hand. When it 
receives a grabDone message from its hand object, the robot object knows that it is safe to start moving the physical robot arm. In the same manner, the hand 
object sends back a releaseDone message to the robot object when the physical robot hand is done releasing. The arm object responds to move messages. 
In response to a move message, the physical robot arm moves the robot hand to a given position in three­dimensional space. When the physical move operation is 
complete, the arm object sends back a moveDone to the robot object.
Suppose that the robot is subject to the following integrity requirements:
• The robot should not move a widget to a position that is already occupied by another widget.

   
 
Figure 2.6  
A robot class 
Page 20
class Robot 
    active := false; 
    hand := …     
    arm := …     
    …   
disable 
    move if active; 
    move (from, to) if occupied (to); 
method move (from, to) … end move; 
method moveDone () … end moveDone;   
method grabDone () … end grabDone;   
method releaseDone () … end releaseDone;   
function occupied (position) … end occupied;
end Robot;
• While moving a widget, the robot should not start to move another widget. Move requests should be executed serially and not be interleaved.
We can use synchronization constraints for the move method to ensure satisfaction of these integrity requirements. Figure 2.6 sketches the structure of a Robot class 
that includes these synchronization constraints.
Instances of the Robot class have two instance variables, hand and arm, that refer to the hand and arm objects, respectively. We do not describe instantiation of 
the hand and arm objects. Since a robot should move only one widget at a time, a robot object should not dispatch additional move messages while it is 
communicating with the hand and arm objects in response to previous move messages. The variable active indicates whether a robot is currently engaged in a 
move request. The active variable is initially false. When invoked, the move method sets active to true, and the releaseDone method sets it to 
false (when the robot object receives a releaseDone message, the current widget movement

   
 
Figure 2.7  
A robot subclass 
Page 21
is complete). The first pattern in the Robot class prevents dispatch of move messages when a robot is busy serving another move request.
The second pattern in the Robot class prevents dispatch of move messages that will result in a collision at the end position. We assume that the robot records the 
position of widgets that it has moved and that the function occupied determines whether a given position is currently occupied by a widget. Furthermore, we 
assume that functions, as opposed to methods, in general are free from side effects, and we allow function invocation as part of pattern expressions. In particular, the 
second pattern invokes the function occupied.
The second pattern in the Robot class also illustrates the use of parameters in a pattern. The pattern parameters from and to are bound to the content of move 
messages. The content of a move message consists of two values: a start position for a movement and an end position for a movement. The name to is bound to the 
end position of a movement, and the second pattern's expression uses this end position value as a parameter for the function occupied in order to determine 
whether this specific position is already occupied.
Now, suppose we want to define a specialized notion of robot that can operate in a physical environment with temporary obstacles. An obstacle may temporarily 
prevent certain movements of the arm. The robot must keep track of current obstacles and delay move requests that are prevented by the obstacles. We assume the 
existence of a function obstructed that takes two positions and returns true if moving between these two positions is prevented by the current obstacles. Based 
on obstructed, figure 2.7 illustrates the structure of a subclass that refines the Robot class to incorporate support for movement in an environment with 
obstacles.
class ObstacleRobot inherits Robot   
   disable move (from, to) if obstructed (from, to) ;
   function obstructed (from, to)  …  
   end obstructed; 
   … 
end ObstacleRobot;

   
 
Figure 2.8  
A resource administrator class 
Page 22
The subclass defined in figure 2.7 illustrates incremental modification of synchronization constraints. The subclass will inherit the synchronization constraints of the 
robot class, and it will therefore "automatically" satisfy the integrity requirements of the robot hierarchy. The subclass can be defined without explicit reference to, or 
knowledge of, the synchronization constraints and instance variables defined in the robot superclass. Without inheritance, we would have to duplicate the 
synchronization constraint on move as specified in robot. Such duplication would expose information that is otherwise encapsulated in the superclass. []
Example 4 Resource Administration
A resource administrator regulates access to shared resources such as disks, processors, or memory. With a resource administrator, the availability of resources is 
centrally determined. User processes request resources from a resource administrator; a user process invokes a method called request in a resource administrator 
in order to request a number of resources. The parameters of a request message specify the type and number of resources requested. User processes send a 
release message to the administrator when they are done using previously requested resources. An administrator should dispatch request messages only if the 
requested resources are available. We can use synchronization constraints to describe this integrity requirement for an administrator.
Figure 2.8 sketches the code for a resource administrator class. The synchronization constraints of an administrator are described by a pat­
class ResourceAdministrator  
disable request (client, type, number)  if 
    (not available (type, number))    
method request (client, type, number)  … end request;
method release (client, type, number)  … end release;
function available (type, number)  … end available; 
end ResourceAdministrator;

   
 
Figure 2.9  
A resource administrator subclass 
Page 23
tern that regulates the dispatch of request messages. The pattern defined in an administrator calls a function called available that determines whether a specified set of 
resources is currently available. The pattern uses the content of request messages as arguments for the call of available. By calling available, the pattern can determine 
whether a specific request must be delayed in the current state of the administrator.
Resource administration may introduce deadlocks: two user processes may wait for each other's resources to be released. One way to address this deadlock problem 
is to avoid the possibility of deadlocks through conservative resource allocation. Deadlock avoidance requires user processes to specify up front the resources that 
they need during execution. If user processes declare their resource needs up front, the administrator can avoid deadlocks by using the bankers algorithm [SPG91]. 
Given the expected resource usage of processes, the bankers algorithm can determine whether a given request is safe. A request is safe if it can be granted without 
introducing the possibility of deadlocks.
We can incrementally modify the resource administrator to incorporate deadlock prevention by the bankers algorithm. A subclass that employs the bankers algorithm 
is depicted in figure 2.9. This subclass, called AdministratorWithoutDeadlocks, strengthens the synchronization constraints for the request method: a request for n 
resources is delayed, even if there are n resources available, if granting the request could lead to a future deadlock.
Notice that, in the subclass, the request and release methods must
class AdministratorWithoutDeadlocks  inherits   
   ResourceAdministrator    
disable request (client, type, number ) if     
       (not safe (client, type, number ))   
   function safe (client, type, number)  … end safe;  
   … 
end AdministratorWithoutDeadlocks ;

   
Page 24
be refined so as to maintain the data structures required by the bankers algorithm. These refined methods ''extend" the superclass behavior: the basic administration 
behavior is still part of the refined methods.[]
2.4 Refinement of Synchronization Constraints
We analyze the relationship between superclass and subclass synchronization constraints and characterize what it means for synchronization constraints to be refined 
under inheritance.
Let us first recapitulate the rules for constraint inheritance. With inheritance, a class is subject to both the patterns that it defines itself and the patterns that its 
superclasses define. Specifically, a class C is subject to a pattern P if and only if P satisfies one of the following two conditions:
• P is defined in the disable clause of C.
• The superclass of C is subject to P.
For example, if we assume that a superclass is subject to the patterns "p
1
; …; p
n
," and that a subclass defines "p
n + 1
; …; p
m
," then the subclass is subject to "p
1
; …; p
n
; 
p
n + 1
; …; p
m
." Hence, from a syntactic standpoint, the synchronization constraints of a subclass contains the synchronization constraints of its superclass. In the 
following I will analyze what this containment relation means at the semantic level.
We can characterize the semantics of synchronization constraints in terms of their effect on incoming messages: whether they delay messages or allow messages to 
proceed. Remember that a message is delayed by a list of patterns if it matches any pattern in the list. In particular, if a message is delayed by a pattern p, that same 
message will also be delayed by the list "p; p'" for any pattern p'. And in general, if a message is delayed by the list "p
1
, …, p
n
," that message will also be delayed by 
the list "p
1
, …, p
n
, p
n + 1
, …, p
m
." Hence, if a message is delayed by the synchronization constraints in a superclass, it will also be delayed by the synchronization 
constraints in a subclass. In summary: subclass synchronization constraints are more stringent than superclass synchronization constraints.
With our notion of constraint inheritance, subclass synchronization constraints delay messages at least as often as superclass synchroniza­

   
Page 25
tion constraints. Since synchronization constraints delay messages in order to maintain the integrity of their enclosing object, our notion of constraint inheritance 
assumes that the integrity of subclasses subsumes the integrity requirements of their superclasses. Integrity subsumption is a reasonable assumption because integrity is 
a fundamental aspect of the semantics of a class, and if the integrity of a subclass did not subsume the integrity of its superclass, it is questionable whether inheritance is 
the most descriptive way to capture the relationship between these two classes. In all the examples, the integrity requirements of the subclass subsume the integrity 
requirements of the superclass.
The simplicity of the notion of constraint inheritance is mainly due to the assumption that subclass integrity subsumes superclass integrity. With this assumption, we can 
design constructs so that superclass patterns are always inherited and do not need to include constructs for "selective" inheritance of patterns.
2.5 Possible Extensions
The constructs primarily address issues that are related to the integration of synchronization constraints and inheritance. They ignore a number of general issues 
associated with the description of synchronization constraints. In this section I identify some of these issues and outline a number of extensions to the constructs that 
address them. We can integrate all the proposed extensions with the basic constructs without interference.
2.5.1 Set­Based Patterns
In my notation, a pattern can constrain only a single method. For example, if we want to constrain n methods, we need to define n patterns. One possible extension 
would be for patterns to constrain a set of methods rather than single methods.
In order to illustrate the notion of set­based pattern, I illustrate a concrete proposal for such patterns as described in [Frø92]. In this proposal, I used all­except and 
or set operators to construct sets of method names.
The expression "all­except m" describes a set that contains all methods in the enclosing object except the method with name m. A pattern

   
 
Figure 2.10  
An abstract lock class 
Page 26
class Lockable     
       locked : =  false;  
   disable all­except unlock if locked;   
   method lock() locked : =  true; end lock;   
   method unlock() locked : =  false; end unlock;
end Lockable;
that uses the all­except operator can constrain methods without explicitly naming them. For example, consider the class Lockable defined in figure 2.10. The 
Lockable class captures the abstract behavior of an object that can be locked. A lock method locks an object, and the object can be unlocked only by 
invoking the unlock method. The instance variable locked is true if the object is locked, and false otherwise.
The all­except set operator allows definition of superclass patterns that can constrain "new" methods added in subclasses. For example, if a buffer object inherits from 
Lockable, all the methods in the buffer object would be constrained by the pattern defined in the Lockable class. In particular, it is impossible to invoke the 
buffer's put and get methods if the variable locked is true. The all­except operator allows the definition of generic synchronization constraints that can be 
factored out into abstract superclasses such as the Lockable class.
The or operator describes a set by enumeration. For example, the expression "m or n" describes the set {m, n}. We can use the or operator to describe a 
synchronization constraint that is common to a number of methods. Consider the Queue class in figure 2.11. The Queue class has two methods, getFront and 
getRear, to extract elements from an instance of the Queue class. With the or operator we can directly express that getFront and getRear are subject 
to the same synchronization constraint. As for the bounded buffer in example 1, the variable size keeps track of the current number of elements in a queue object. 
Furthermore, the constant MAX denotes the maximum number of elements that can be stored in a queue.

   
 
Figure 2.11  
A queue class 
Page 27
class Queue    
      size := 0;  
   disable     
      getRear or getFront if size = 0 ;     
      put if size = MAX;   
   method getRear (client)  … end getRear;   
   method getFront (client)  … end getFront;  
   method put (item) … end put; 
end Queue;
I do not claim that the or and all­except operators constitute a sufficient means of expressing set­based patterns. I described the functionality of these specific 
operators in order to illustrate concretely the notion of set­based patterns. In practice, more flexibility may be needed. For example, it may be necessary for method 
names to be first­class values so that a method name can be specified as the result of an expression evaluation rather than as a literal. Moreover, it may be necessary to 
have sets of method names as first­class values so that the programmer can perform set operations on method set values in addition to method set literals.
2.5.2 Message Priority
Another extension would be to describe priority of messages, that is, user­defined policies for choosing between multiple messages, which can all be dispatched. The 
built­in dispatch policy is to choose the oldest message, but in some cases the programmer may want to "overwrite" this policy. For example, consider a scheduler 
object in an operating system. Messages sent to the scheduler represent jobs to be scheduled. If it was possible to have user­defined policies for choosing between 
messages, the scheduling strategy, such as "shortest job first," could be described as a user­defined dispatch policy. Describing the scheduling strategy as a user­
defined dispatch policy has the advantage that the scheduler object

   
 
Figure 2.12  
A scheduler class 
Page 28
does not have to implement a job queue as part of its representation: the input queue of the scheduler object is an implicit job queue.
User­defined dispatch policies could be incorporated directly into our notion of synchronization constraint using a construct similar to by in Synchronizing Resources 
[AOC
+
88]. The by construct is part of in statements, which in many ways are similar to input statements in CSP [Hoa78]: objects in SR can explicitly "receive" 
messages by executing in statements. The by clause of an in statement determines the order in which messages for the same method are received. For example, 
suppose we want to express the operating system scheduler outlined above. If the scheduler has a schedule method to which jobs are sent, the scheduler could 
receive jobs using an in statement of the following form:
in schedule (job) by job.length ni
For simplicity we assume that incoming jobs have an attribute length, which indicates the length of the job. The expression of a by clause must be an arithmetic 
expression, and the clause causes selectable messages to be received in ascending order of the arithmetic expression. In the above example, the shortest job is 
received first.
We could incorporate a feature similar to by in our language. We could supplement the disable clause with a dispatch clause that specifies the dispatch policy. With a 
dispatch clause, we could specify message priority separately from the involved methods, along with the synchronization constraints of an object. In figure 2.12, we 
sketch the structure of a scheduler object where the scheduling strategy is specified with a dispatch clause.
The purpose of the discussion is to illustrate the concept of user­defined dispatch policies and to demonstrate, in a concrete way, that
class Scheduler   
   dispatch schedule (job) by job.length  
   method schedule (job) … end schedule;
end Scheduler;

   
Page 29
we could extend the notion of synchronization constraint to incorporate the specification of such policies. The by construct is an interesting mechanism to specify 
dispatch policies; I do not discuss its advantages and weaknesses here.
2.5.3 Garbage Collection of Obsolete Messages
Garbage collection of obsolete messages is another possible extension to the notion of synchronization constraint. In some applications, the synchronization constraints 
will delay certain messages forever. These messages are obsolete since they will never be dispatched. Garbage collecting such messages is a safe operation since it will 
not change the functionality of applications. Moreover, garbage collection is desirable because it will free wasted space in the input queue.
An example application of garbage collection is a multimedia system where a video monitor displays a stream of video frames in increasing order. The monitor is 
allowed to skip frames occasionally but should never display old frames. In the multimedia system, it would be desirable to "garbage collect" messages that represent 
old frames since these messages will never be dispatched.
In some cases, it is possible to infer, by means of static analysis, when particular messages will be obsolete. For example, it may be possible to infer statically that the 
synchronization constraints of a video monitor are "monotonic" and thereby conclude that old frame messages will be obsolete. However, it is not always possible to 
determine statically when a given message will be obsolete. For example, the synchronization constraints may depend on program input that is known only at run time. 
Because it is impossible always to determine statically when a given message is obsolete, the language should provide facilities for the programmer to describe which 
messages are obsolete. The description of obsolete messages could be accomplished using patterns. A discard clause could list a number of patterns with the 
interpretation that a message matching any pattern in a discard clause is obsolete.
Figure 2.13 illustrates the use of a discard clause in connection with a video monitor that displays a stream of video frames. The video frames are sent to the method 
called display in the monitor. Each frame has an attribute called number that indicates the sequence number of that frame. This attribute makes it possible to 
avoid showing "old" frames even if frame messages do not arrive in the order that they were sent.

   
 
Figure 2.13  
A video monitor with garbage collection of old messages 
Page 30
class VideoMonitor     
      frameNumber := 0 ;  
   discard display (frame) if frame.number ‹ frameNumber;  
   method display (frame)     
      frameNumber := frame.number ;     
       …   
   end display; 
end VideoMonitor;
The video monitor has an instance variable called frameNumber that keeps track of the sequence number of the last frame that has been displayed. The discard 
clause contains a pattern that matches "old" messages. A message that matches a pattern in a discard clause is not dispatched, and it is eventually garbage collected.
2.6 Related Work
In this section I present other notions of synchronization constraints that have been proposed in the literature.
2.6.1 Semaphores and Monitors
Traditional synchronization constructs, such as semaphores [Dij68] and monitors [Hoa74, Han75], provide a notion of synchronization constraint. With semaphores 
and monitors, the programmer describes synchronization constraints as actions that conditionally delay the current thread of execution. Semaphores and monitors do 
not order the way in which messages are dispatched; they order the way in which threads are active within an object.
Monitors are used for synchronization in Mesa [LR80] and Emerald [RTL
+
91]. The BETA [MPN93] language uses semaphores for synchronization.

   
Page 31
With semaphores and monitors, synchronization constraints are described as part of methods. For example, consider a bounded buffer. As we have previously 
discussed, the get method may be executed only if the buffer is not empty. With semaphores or monitors, we cannot prevent invocation of the get method. Instead 
we can design the get method so that it can be invoked under all circumstances without causing integrity violations. This can be done by having the get method itself 
test whether the buffer is currently empty and, if so, delay the current thread of execution on a semaphore or, in a monitor, on a condition variable.
Since they describe synchronization constraints as part of methods, semaphores and monitors do not support separation of algorithms and synchronization constraints. 
Moreover, inheritance of synchronization constraints is subject to the rules for inheritance of methods. In particular, it is not possible to refine the synchronization 
constraints of an object without changing its methods.
2.6.2 Path Expressions
Path expressions [CH74] is a mechanism for synchronization constraints that specifies the sequences in which a single object can dispatch messages. The programmer 
specifies these sequences declaratively as regular expressions. A path is a regular expression over the method names of a single object. An object can dispatch only 
message sequences that constitute a string in the language defined by its paths. Numerous languages such as Procol [vdBL91] and SINA [TA88] build on this model 
for synchronization constraints.
Although specified separately from the constrained methods, path expressions cannot be incrementally modified; a path expression is a monolithic entity.
2.6.3 Receive Actions
In many languages, objects execute special receive actions to allow dispatch of messages. In addition to their methods, objects have a "body" process that executes 
these receive actions and thereby controls the dispatch of messages. The execution order of receive actions, by the body process, determines the order in which 
messages can be dispatched.
The use of receive actions is inspired by the communication model used in CSP [Hoa78]. In CSP, processes receive communications by

   
Page 32
executing input commands. Languages with receive actions include ADA [Uni82], Alps [Vis88], Concurrent Eiffel [Car90], Mediators [GC86], ­C++ [BSY92], 
POOL [Ame90], and SR [AOC
+
88].
Like path expressions, receive actions specify synchronization constraints in terms of the sequences in which messages may be dispatched. Path expressions specify 
these sequences declaratively and receive actions specify these sequences imperatively. Compared to path expressions, receive actions are less abstract but more 
flexible.
Languages that describe synchronization constraints as receive actions do not traditionally support incremental modification of synchronization constraints. A notable 
exception is the language described by Thomsen in [Tho87]. In Thomsen's language, subclass bodies and superclass bodies are executed in quasi­parallel mode as 
coroutines [Con63]. Because a subclass executes the receive actions defined in the superclass body and the receive actions defined in the subclass body, subclasses 
have more receive actions than superclasses do. Thomsen's language does not support the description of subclasses that restrict the receive actions defined in 
superclasses; rather, the language supports the description of subclasses that extend the dispatch of messages.
2.6.4 Activation Conditions
An activation condition is a Boolean expression associated with a method. The expression is evaluated prior to invocation of the method, and invocation is allowed 
only if the expression evaluates to true.
An activation conditions can typically refer to the instance variables of its enclosing object. This is the case in ABCL [Yon90], Maude [Mes93b], and the language 
proposed in [Shi91]. In some cases, an activation condition can also refer to built­in synchronization "counters" that keep track of the number of ongoing invocations, 
the number of completed invocations, and the number of messages waiting in the input queue. The concept of synchronization counter was originally proposed by 
Verjus et al. [BBV78] and is used in Dragoon [AGMB91], Guide [DDR
+
91], and Scheduling Predicates [MWBD91].
In synchronizing actions [Neu91], activation conditions are part of the interface of objects, and the conditions cannot refer to the instance variables of objects. Instead 
of instance variables, the activation conditions refer to special synchronization variables that are part of the interface and are updated by pre­ and postactions 
associated with methods. The

Random documents with unrelated
content Scribd suggests to you:

meanings attached to the word minstrel, would have been inclined to
have taken the persons here designated, as singers only, or singers for
the Royal Chapel exclusively, but for the directions as to their good
looks and comely shapes. These directions seem to him to point to
jesters, “tumblers or posture-masters.” It is certain that about a century
later, in the reign of Edward VI., it was lawful, when the Chapel Royal
lacked young choristers, to carry off duly qualified children from their
homes, wherever they might be found.
There is proof that the household jester, as well as minstrel—the
two characters often under one hood—was a very common and a
liberally-patronized professor of his respective arts, in the days of
Henry VI. Warton, in his first volume, cites the Prior’s accounts of
Maxtoke, in Warwickshire (to which I have before alluded), under one
of its general heads, “De Joculatoribus et Mimis.” Under this head, and
having reference only to various years in the reign of Henry VI., we find
several sums expended by the brotherhood for itinerant entertainers
who have different names, but whose shades of professional difference
it is not so easy to determine. Thus we find, “To a joculator, in the
Michaelmas week, the sum of fourpence.” Again, “At Christmas, to a
cithariste and other joculators, 4d.” The following entries are further
illustrations:—“To the mimes of Solihull, 6d.” “To the mimes of
Coventry, 20d.” “To Lord Ferrers’ mimes, 6d.” “To the lusores from
Eton, 8d.” “Ditto, from Coventry, 8d.” “To those from Daventry, 12d.”
“To the mimes from Coventry, 12d.” “To Lord Astley’s mimes, 12d.” “To
four of Lord Warwick’s mimes, 10d.” “To a blind mime, 2d.” “To six
mimes of the household of Lord Clinton.” ... “To two mimes from
Rugby, 10d.” “To a certain cithariste, 6d.” “To another from Coventry,
6d.” “To two others from Coventry, 8d.” “To the mimes of Rugby, 8d.”
“To Lord Buckridge’s mimes, 20d.” “To the mimes of Lord Stafford, 2s.”
“To the lusores from Coleshill, 8d.” “It is here to be observed,” says
Warton, “that the minstrels,” or jesters, “of the nobility, in whose
families they were constantly retained, travelled about the country to
the neighbouring monasteries; and that they generally received better
gratuities for these occasional performances, than the others.”
After the death of Henry VI., there appears on the stage a court
jester who is said to have made half England merry with his jests. I

allude to the famous Scogan (or Scoggin, or Scogin), who was attached
to the household of Edward IV., and whose name is not forgotten in
these later days.
Oriel College, Oxford, counted about a century and a half from the
time of its foundation, in the reign of Edward II. (1326), when, if credit
may be attached to the story told by merry Andrew Borde, of Pevensey,
Scogan became a student in that college. The young student is said to
have been of a good family; and tradition, to be more or less trusted as
the reader pleaseth, has preserved a few incidents of his life there, and
in other localities. We have a hint of his roystering career in the little
incident of Falstaff in his salad days, who “broke Scogan’s head at the
court gate.” Ben Jonson alludes to him, in the Masque of ‘The Fortunate
Isles,’ as—
“A fine gentleman, and a Master of Arts,
Of Henry the Fourth’s time, who made disguises
For the King’s sons, and writ in ballad royal
Daintily well....
In rhyme, fine tinkling rhyme, and flowing verse,
With now and then some sense; and he was paid for ’t,
Regarded and rewarded, which few poets
Are, nowadays.”
The specimens we have of Scogan’s poetry do not warrant the
praise above given; and we know, from some of his rhymes, that he
held the University graduates in very absolute contempt. What he said
of the M.A.’s, is not to be repeated. The substance was, that they were
mere dolts, beyond the schools; and Scogan did not rank the B.A.’s
much higher, as may be seen in the succeeding couplet, which says,—
“A B.A. is not worth a straw,
Except he be among fools.”
The joyous Suffolk student—for Scogan, it is believed, came from
Bury—became, in time, a very merry and not very scrupulous tutor.
Every sage has his maxim, and Scogan’s was, that “A merry heart
doeth good, like a medicine.” With such a lecturer, the pupils must have

conferred on Oriel a reputation something resembling that which
Merton once derived from its students; of which college an old warden
used to say, that there could be little doubt of the learning it
possessed, seeing that every pupil brought a little with him, and took
none away. But even Oriel, in Scogan’s time, had its solemn seasons;
and when the plague of 1471 broke out at Oxford, which ultimately
caused more devastation in England than the fifteen years of war
through which the country had recently passed, Scogan followed the
University fugitives who took refuge, and found safety, in the rural
hospital of St. Bartholomew.
If the season of trial rendered other men serious, it had no such
effect upon Scogan. His irregularities were numerous, and not the least
offensive of them was the irreligious spirit, combined with avarice,
which induced him to help an unworthy candidate into the priesthood,
for the bribe of a horse, presented to him by the candidate’s father.
Even Oxford grew at last weary of Scogan’s want of decorum; and
under compulsion, or following his inclination, the merry Suffolk Punch
withdrew from the University, but did not long lack employment. He
presented himself to Sir William Neville, a country gentleman, and
requested to be engaged by him as his household fool. This negotiation
was happily carried out; and some time after, Sir William introduced
Scogan to Edward IV. The knight took his jester to court, probably out
of vanity; for it was not every household fool that had the wit, talent,
and education of this gentleman-joculator. The King was so pleased
with his gossip that there was nothing left for the loyal knight, but to
offer to make over his joyous retainer to a royal patron. Henceforward,
Scogan became the court buffoon of Edward; but, as far as I can judge
from the sorry or dirty five dozen of “jests” of which Andrew Borde
makes him the hero, he assumed the office of buffoon and dropped
that of wit. The choicest story told of him, is that wherein he is
described as standing, for a long period, beneath a water-spout, under
heavy rain, for a reward, (or for a wager, by which he may not have
profited in the same degree,) of twenty pounds,—a large sum in those
days, but not too large for the fool who thus risked his life.
It was the characteristic of our English kings, to be liberal to their
buffoons,—more liberal, indeed, than they were to more valuable

servants,—as I shall more especially show, presently. Edward was so
well satisfied with Scogan, that he conferred upon him a town-house in
Cheapside, and, still greater mark of the Royal consideration, a country
mansion at Bury. At the latter place, he and the princely Abbot were on
the most intimate terms, and those of a very joyous complexion:—
“They’d haunch and ham; they’d cheek and chine;
They’d cream and custard, peach and pine.
And they gurgled their throats with right good wine,
Till the Abbot his nose grew red.
No De Profundis there they sang,
But a roystering catch to the rafters rang;
And the bell for matins, it went ‘ting tang,’
Ere the last of them rolled to bed.”
Scogan, it would seem, was married at this period; and it would
also appear that his wife was a fine lady in her way, who, among other
matters connected with the fine-ladyism of her times, was very
desirous of having a page who might precede her, as she went humbly,
in state, to church. In fact, she intimated that it would be impossible
for her to find her way to church, without a page. “Poor lass!” said the
jester, one Saturday night, “you shall have a guide to church, before
the bells ring tomorrow morning.” Accordingly, on the Sunday morning,
Scogan arose early, and chalked the road which lay between his house
and the church-door; he either strewed the chalk, or drew lines with it.
When church-time came, he led his wife to the thresh-hold of their
dwelling, to see her new page. When the extremely fastidious lady
beheld the practical trick played her by her husband, she waxed so
wroth that all his wit could hardly pacify her.
Among the practical jokes of this court fool I recognize many that
really belong to a much earlier period, and which must have been
current as “stories” at the time they are narrated as having been
performed by Scogan himself. The following, however, is said to be
properly assigned to him. He had borrowed a large sum of money of
the King. Some stories say the Queen, and Flögel even names Queen
Elizabeth as the patroness of this jester! The sum is set down at £500,
which is extremely doubtful. Be this as it may, a day for payment had

been named; and when that day had arrived, Scogan was not prepared
to pay the debt. After ranch thought upon the matter, he fell sick and
died, and requested his friends to bury him in such a way that the
Sovereign should encounter the funeral. They entered into the joke
with great alacrity, put on the trappings of mitigated affliction, and in
due time carried Scogan forth on a comfortably-arranged bier, when
they contrived, as directed, to encounter Edward. When Louis XV. saw
the funeral of his old favourite, Madame de Pompadour, he had the bad
taste to cut a sorry joke. When Edward met the funeral procession of
Scogan, he regretted the loss of his merry follower; and among other
kind things to which he gave utterance, remarked, that he freely
forgave Scogan and his representatives the sum for which the jester
was indebted to him. The buffoon, who had expected this act of
release, immediately jumped up, thanked his illustrious creditor, and
prudently called all present to bear witness to the Royal act of grace:
“It is so revivifying,” said Scogan, “that it has called me to life again.” If
this incident be true, we may also believe, as we are requested to do,
that great mirth followed thereupon.
Perhaps Scogan presumed upon the liberties allowed him by the
King; for we are told that his pranks at court became so boisterously
intolerable, that he was at last exiled, and forbidden to return on
English soil, upon pain of death. He went to France, thence came back
with his shoes full of the soil of Picardy, and he claimed impunity, on
the ground that he was not standing on English land. This sort of story
is told of so many jesters, that I leave its acceptance or rejection to the
decision of my readers. We come again to facts, when we encounter
Scogan dwelling for awhile at Jesus College, Cambridge; and there is,
probably, foundation for the story which represents him travelling in
Normandy.
In the collection of ‘Scogan’s Jests,’ to which I have before alluded,
as being collected by merry Andrew Borde, of Pevensey—that learned
and mirthful doctor who Latinized his name into “Perforatus,” we are
informed,—“How Scogan made the country-people of Normandy offer
their money to a dead man’s head.”
“Upon a time when Scogan lacked maintenance, and had gotten
the displeasure of his former acquaintance by reason of his crafty

dealing and unhappy tricks, he bethought himself in what manner he
might get money with a little labour. So, travelling up into Normandy,
he got him a priest’s gown, and clothed himself like a scholar, and
afterwards went into a certain churchyard, where he found the skull of
a dead man’s head, the which he took up and made very clean, and
after bore it to a goldsmith, and hired him to set it in a stud of silver.
Which being done, he departed to a village there by, and came to the
parson of the church, and saluted him, and then told him, that he had
a relic, and desired him to do so much for him as to show it unto the
parish, that they might offer to it; and withal promised the parson that
he should have one-half of the offerings. The parson, moved with
covetousness, granted his request, and so, upon the Sunday following,
told his parishioners thereof, saying, that there was a certain religious
scholar come to the town, that had brought with him a precious relic;
and that he that would offer thereunto should have a general pardon
for all his forepassed sins; and that the scholar was there present
himself, to show it to them. With that, Scogan went up into the pulpit,
and showed them the relic that he had; and said to them that the head
spoke to him, and bade him that he should build a church over it; and
that the money that the church should be builded withal should be
well-gotten. But when the people came to offer unto it, Scogan said
unto them, ‘All you women who have been faithless to your husbands, I
pray you sit still, and come not to offer, for the head bade me that I
should not receive your offerings.’ Whereupon, the poor men and their
wives came thick and threefold to this offering; and there was not a
woman but she offered liberally, because that he had said so; and he
gave them the blessing with the head. And there were some that had
no money, that offered their rings; and some of them that offered twice
or thrice, because they would be seen. Thus received he the offerings
both of the good and the bad, and by this practice got a great sum of
money.”
That he subsequently came again to England, may be gathered
from stories of a later date. One legend tells us of the King condemning
him to be hanged, but allowing him the privilege of choosing a tree
from which he was to be suspended. Scogan avoided the penalty by
being unable to fix on a tree exactly to his mind. The story, however, is

related of earlier jesters than Scogan, and seems to have originally
belonged to the buffoon of Alboin, King of the Lombards.
There is nothing more left worth telling, though there is much more
that might be told, of Scogan, the gentleman-buffoon of Edward IV. His
last expressed desire was characteristic of his vocation and his humour:
—“Bury me,” said he, “under one of the water-spouts of Westminster
Abbey; for I have ever loved good drink, all the days of my life.” It was
a fool’s wish; but for the grave of him who made it, no less an author
than Cardinal Pole composed in his younger days, an epitaph which
may be worthy the jester, but is certainly less worth citing than that
composed by Swift for one of the last of our household fools, and
which will be found in a subsequent page of this volume.
The stupid book, edited by Borde of Pevensey, and known to many
an antiquary whose patience is not stout enough to hold out to the end
of the dirt, dullness, and dreariness which mark what is called
‘Scoggin’s Jests,’ reminds me of a saying of Balzac, with reference to
two of the wittiest Frenchmen of the great revolutionary era,—
Chamfort and Rivarol. “Those good fellows,” remarks Balzac, “put a
whole volume into one of their witty sayings; but now-a-days, it is
difficult to find one witty saying in a whole volume.” The last part of
this remark is most applicable to collections of jests to which the name
of some court fool was appended in order to give them currency and
an air of authenticity. Even if Scogan’s so-called “Jests” were authentic,
they would not be worth citing. They offend in every possible way, and
it is impossible to read them and believe them to be genuine, without
feeling surprise at an Oxford student becoming such a buffoon, and at
such a buffoon as their hero being so liberally recompensed as he was,
by the royal Edward.
Let us pass, then, from Scogan and from a King who, with all his
patronage of the fool, could least of all the Kings of England bear a
political joke, to one who had scant time to listen to jesting. But I will
here remind the reader that out of Edward IV.’s barbarity, in executing a
merry tradesman in Cheapside, merely for saying that he would make
his son heir to the Crown,—meaning his house of business,
distinguished by that sign,—Fuller, in his ‘Holy State,’ draws an
argument against profane jesting which might have profited all, court

fools as well as others, could they only have heard the arguer. Fuller
upheld harmless mirth as a cordial for restoring wasted spirits; and he
only pronounced jesting unlawful when it trespassed in quantity,
quality, or season. When speaking against jesting with God’s word, he
asks, “Will nothing please thee to wash thy hands in, but the font? or
to drink healths in, but the church chalice?” With earthly monarchs,
fools may have their privilege; but then Fuller remembers the poor
mercer’s joke which so angered Edward IV., and he exclaims, “More
dangerous still is it to wit-wanton it with the majesty of God.” Finally,
he gives these rules against profane jesting,—rules which, when he
wrote, while fools were yet in remembrance, if not in favour at court,
he knew had been daily transgressed. “If,” he says, “without thy will,
and by chance-medley, thou hittest Scripture in ordinary discourse, yet
fly to the city of refuge, and pray God to forgive thee. Scoff not at the
natural defects of any which are not in their power to mend. Oh! ’tis
cruel to beat a cripple with his own crutches. Neither scorn any for his
profession, if honest, though poor and painful. He that relates another
man’s wicked jest, adopts it for his own. He that will lose his friend for
a jest, deserveth to die a beggar by the bargain. We read that all those
who were born in England the year after the beginning of the great
mortality, in 1349, wanted their four cheek-teeth. Such let thy jests be,”
adds the humorous commentator, “that they may not grind the credit of
thy friend; and make not jests so long till thou becomest one.” Such
was the comment of a moralist on jesting, suggested by the
consequence of non-professional joking on royalty.
From the young King Edward V., no jester had opportunity to draw
a smile, except at the banquet at Hornsey Park, the only festival which
young Edward held between his accession and his death. His uncle
Richard lacked leisure to be “i’ the vein” for these follies; but his wife,
Lady Anne, and the young Princess Elizabeth (afterwards Queen of
Henry VII.) kept, for a brief season, such joyous court at Greenwich,
such minstreling, and dancing, and witnessing or playing jests, that the
oppressed and impoverished people looked on grimly, and murmured
rather above their breath. Henry VII., again, was too mean or too wise
to lavish money on any mere court gauds, though he was not
ungenerous in other respects. He was, at all events, the first English

King who lived within his income; and he was better pleased by lending
money to fit out the first European expedition that ever reached the
American continent than he could have been by any jest, good, bad, or
indifferent, that he might have to pay for. Nevertheless, in the days of
the Tudors, court fools abounded, and indeed, till the fall of the
monarchy under the Stuarts, the nest of ninnies was filled with a
chirruping brood.
Among these was Patch, who is said to have been jester to Henry
VIII. By some, this name is supposed to stand for “fool” generally.
Others, with better reason, believe that Patch was the cant-name of
Williams and Saxton, fools of Cardinal Wolsey. However this may be,
we may be sure that a jester alone could have dared to make such a
King as Henry VIII. look ridiculous, as a fool called by this name,
“Patch,” is said to have done when he besought the King to grant him a
warrant authorizing him to exact an egg from every husband who had
serious reasons to be dissatisfied with the conduct of his wife. The King
thought it a fair joke, and the warrant being drawn up in sportiveness,
he signed the document in full gaiety of spirit. The ink was scarcely dry
when the jester, bowing with mock gravity, demanded the first egg
from the King. “Your Grace,” said he, “belongs to the class of husbands
on whom I am entitled to make levy.” The joke was not very well
relished, and the warrant was cancelled.
John Heywood, himself a “King’s Jester” and a poet, has made
Cardinal Wolsey’s fool the subject of an epigram, which serves, with its
title, to show both the real and the nick-name of the merry retainer.
The former, according to Heywood, was Sexton and not Saxton. The
epigram is entitled, ‘A Saying of Patch, my Lord Cardinal’s Fool,’ and
runs thus:—
Master Sexton, a person of unknowen wit,
As he at my Lord Cardinal’s board did sit,
Greedily caught at a goblet of wine.
“Drink none!” said my lord, “for that sore leg of thine.”
“I warrant, your Grace,” quoth Sexton, “I provide
For my leg; for I drinke on the tother side.”

That Patch was the name of a fool retained by the Cardinal, we
have further evidence in the touching biography of Wolsey by
Cavendish, his “gentleman-usher.” And that Patch had merit of a
superior quality, may also be seen in the same little work. When the
fallen statesman was proceeding up the hill near Putney, on his way to
Esher, having been just before compelled to retire from York House, he
was overtaken by Norris, a gentleman of the Royal bed-chamber, who
brought with him a gold ring and a letter from the King, with
assurances of his own that the Cardinal would soon recover both favour
and power. Wolsey, in sudden ecstasy, slipped from his mule; went on
his knees in the mud; poured forth very unheroic phrases, ringing of
gratitude, but the key-note of which was struck by self-gratulation. The
Cardinal was for giving anything he possessed to the bearer of such
good news; but then he had so little left to bestow! At length, he
rewarded Norris with a gold chain, to the end of which was attached a
relic of the True Cross, “which,” said Wolsey, “when I was in prosperity,
I would not have parted with for a thousand pounds.” Norris having
been thus rewarded, the downfallen but hopeful dignitary looked
around for a fitting messenger to convey the expressions of his
thankfulness to Henry,—“To that good master whom I have loved more
than myself, and whom I have well served. And to say that I have no
one now to convey to him the expression of my gratitude!” At this
moment, his eye fell upon poor faithful Motley, and the Cardinal
immediately exclaimed, “But Patch, my fool, who is with me, will be my
interpreter to his Majesty, with you, my good Norris. I give him to his
Majesty: Patch is worth a thousand pounds.”
The jester, who was thus set at as high a value as a relic of the
True Cross, had no inclination at all to become a court fool. Cavendish
describes the unwillingness of Patch in an almost pathetic manner. The
jester refused to leave his old master, but six stout men bound him to a
horse, not without great difficulty, according to Mr. Tytler; but having
accomplished the task, the steed was set off at full gallop, and Patch
was thus promoted to a court jestership, in spite of himself.
Patch seems to have been bold enough, when he got used to his
new service, if the anecdote I have told of him and the King be well
founded; but the best known of the jesters who fooled courtiers to the

very top of their bent, at the court of Henry VIII., and did not spare the
King himself, was Will Sommers, whose alleged portrait at Hampton
Court is familiar to all who have resorted to that most pleasant locality.
Armin, in his ‘Nest of Ninnies,’ has given another portraiture of Will,—
one that may be relied on, for Armin gave it when many persons were
alive, well able to judge of its correctness; and this portrait I proceed to
place before my readers.
“Will Sommers, born in Shropshire, as some say,
Was brought to Greenwich, on a holiday,—
Presented to the King;—which fool disdain’d
To shake him by the hand, or was ashamed.
Howe’er it was; as ancient people say,
With much ado was won to it that day.
Lean he was, hollow-eyed, as all report,
And stoop he did too; yet in all the court,
Few men were more beloved than was this fool,
Whose merry prate kept with the King much rule.
When he was sad the King with him would rhyme;
Thus Will exilëd sadness many a time.
I could describe him, as I did the rest,
But in my mind, I do not think it best;
My reason this, howe’er I do descry him,
So many knew him, that I may belie him;
Therefore, to please all people, one by one,
I hold it best to let that pains alone;
Only this much:—He was a poor man’s friend,
And help’d the widow often in her end.
The King would ever grant what he did crave,
For well he knew Will no exacting knave;
But wish’d the King to do good deeds great store,
Which caused the court to love him more and more.”
Will seems to have been contemporary with Saxton, or Sexton, a
fool of some notoriety at the Tudor’s Court, from the circumstance of
his being the first jester who wore a wig. There is an entry from the
accounts of the Treasurer of the Chambers, quoted in the Archæologia,

to the following effect:—“Paid for Saxton, the King’s fool, for a wig,
20s.” Is it not possible that this jester may have assumed this mode in
order to ridicule the new fashion of the ladies, who had now, for the
first time in England, adopted the wig—which English lords had begun
to wear as early as the reign of Stephen? However this may be, the
above is all we know of Saxton in his capacity of fool to Henry. How
Sommers looked at Court, the following entry will sufficiently show:
—“For making a doublet of worsted, lined with canvass and cotton, for
William Som’ers, our fool. Item, for making of a coat and a cap of
green cloth, fringed with red crape and lined with frieze, for our said
fool. Item, for making of a doublet of fustian, lined with cotton and
canvass, for our said fool. For making of a coat of green cloth, with
hood to the same, fringed with white and lined with frieze and
buckram, for our fool aforesaid.”
In this suit and office, Will’s reputation so stirred Shropshire, that
his old uncle trudged up to town to visit him at court. The uncle was no
ill man to look at, for when the “kinde old man,” as Armin calls him,
entered Greenwich, and on asking the way to the palace, was laughed
at by saucy pages, who directed him across the water to Blackwall,
others pitied his simplicity, and had respect for a man “with a buttoned
cap, a lockram falling band (coarse but clean), a russet coat, a white
belt of a horse-hide (right horse-collar, white leather), a close round
breech of russet sheep’s-wool, with a long stock of white kersey, a high
shoe with yellow buckles, all white with dust,—for that day, the good
old man had come three-and-twenty miles on foot.” Lusty old yeoman!
How much more respectable than the flaunting “gard and gentlewomen
in their windows,” who “had much sport” to see him pass on his way.
But the old man thought his nephew as good as any of them, and, with
dignified self-possession, inquires,—“if there be not a gentleman in the
court dwelling, called by the name of Master Will Sommers.” This was
giving Will a high position, but it was recognized; and the old uncle was
led to Will, who was taking an afternoon sleep in the park, with his
head on a cushion supplied by a woman whose son, addicted to the
gentle pursuit of piracy, Will saved from the hangman and the gallows
at Blackwall. After a little fooling and much hearty greeting, Will took
his uncle by the hand: “Come,” says he, “thou shalt see Harry, Cockle,

—the only Harry in England;” so he led him to the chamber of
presence, and ever and anon cries out, “Awere! room for me and my
uncle! and, knaves, bid him welcome!” This was done, perhaps, with a
little mock gravity, but Armin tells us that “the old man thought himself
no earthly man, they honoured him so much.”
Will, however, paused awhile, for he saw his uncle’s country suit,
pronounced it unfit for the King’s presence, and, telling the old man
that he must first don a full court-dress, Will takes him to his chamber,
and attires him in his best fool’s suit, cap and all. The simple old man
simply wore the costume, and when the two stood before the King,
Harry laughed at the ridiculous spectacle. The old man, and Will too,
seem to have had some purpose in the whole affair, for when the King
encouraged them to talk, the uncle bade Will tell him all about Tirrell’s
Frith,—a common, of the use of which the Shropshire poor had been
deprived by Master Tirrell, who had enclosed it. The King was so
interested that he gave orders that the common should be thrown open
again; and thereby the sturdy old uncle had not his long walk for
nothing, seeing also that, when he returned to his native county, “he,
while he lived, for that deed was allowed bayly of the common, which
place was worth twenty pound a year.”
Of Will’s power to please the King in his moody moments, we have
specimens in certain questions put, and indeed answered, by the fool.
He put them, as the fool of the play does, “with an anticke look, to
please the beholders;” for example, “What is it, that the lesser it is, the
more it is to be feared?”—which proves to be, “a little bridge over a
deep river,” at which the King “smiled.” At more foolish riddles, the King
“laught;” and at others, which cannot possibly be set down here, we
are told that “the King laught heartily, and was exceeding merry.” For
being made so merry, Harry promised Will any favour he might ask;
Will undertook to apply when he had grace to petition. “One day I
shall,” said he, “for every man sees his latter end, but knows not his
beginning.” And with this jester’s quip, Will took his leave and went
away, “and laid him down among the spaniels to sleep.”
Will was but scantily in favour with Cardinal Wolsey, whom he once
mulcted of ten pounds. He had entered the King’s private apartment
when the Sovereign and the Cardinal were together; and Will

apologized for the intrusion by saying, that some of his Eminence’s
creditors were at the door, and wanted to be paid their due. Wolsey
declared he would forfeit his head if he owed a man a penny; but he
gave Will ten pounds, on his promise to pay it where it was due. When
Will returned, he exclaimed, “To whom dost thou owe thy soul,
Cardinal?” “To God,” was the reply. “And thy wealth?” “To the poor.” At
which, Will declared the Cardinal’s head forfeit to the King. “For,” said
he, “to the poor at the gate I paid the debt, which he yields is due.”
The King laughed, and the Cardinal feigned to be merry, “but it grieved
him to give away ten pounds so; yet worse tricks than this Will
Sommers served him after, for indeed he (the Cardinal) could never
abide him.”
Will was not above human infirmities; he was jealous, like greater
men at court, and especially when a rival fool vied with him to gain
smiles and moidores from the King. We have an instance in the case
when “a jester, a big man, of a great voice, long black locks, and a very
big round beard,” was juggling and jesting before the King. Armin tells
us, that “lightly one fool cannot endure the sight of another;” and Will,
angry at his huge rival, sought to recover his supremacy by dashing a
bowl of bread and milk over the head, eyes, and beard of his titanic
rival. “This lusty jester, forgetting himself in fury, draws his dagger, and
begins to protest. ‘Nay,’ says the King, ‘are ye so hot?’ claps him fast;
and though he draws his dagger here, makes him put it up in another
place. The poor abused jester was jested out of countenance, and lay
in durance a great while, till Will Sommers was fain (after he broke his
head, to give him a plaister,) to get him out again. But never after
came my juggler in the Court more so near the King, being such a man
to draw in the presence of the King;” who (after all) could not have
been mortally stricken, seeing that jesters carried only daggers of lath;
but probably the act itself was considered a bad example and a serious
offence.
Of the generous feeling of Will, there is a well-known instance
recited in Grainger; according to which it would appear, that in early life
Will had been a servant in the family of a Northamptonshire gentleman
named Richard Farmor or Fermor. This gentleman was of a
compassionate spirit, and hearing of a destitute priest incarcerated in

the gaol at Buckingham for denying the King’s supremacy, the kind
gentleman sent him a couple of shirts and eightpence. This small but
acceptable and praiseworthy charity entirely ruined the donor. It laid
him open to a charge of præmunire; and for giving a change of linen
and the price of a meal to a captive Papist, the King confiscated this
Fermor’s estates, and reduced him to beggary and starvation. Will
found opportunity to serve his old master, but not till death was
pressing hard upon the King, and making his heart also something less
tough and obdurate than it was wont to be. The fool improved his
opportunity, and leaving to others to bid the sick monarch repent of his
sins, hinted that it would be a better joke if he were to make reparation
for them. The fool’s divinity was not so contemptible, for it worked on
the dying King, “who,” says Mr. Thoms, in a note to Mr. Collier’s reprint
of the ‘Nest of Ninnies,’ “caused the remains of Fermor’s estate, which
had been dismembered, to be restored to him.”
The tracts and plays of succeeding years found purchasers or
spectators because they reproduced Sommers in his jests, gait, dress,
and manners. Rowland has him in his ‘Good and Bad News;’ Rowley, in
his chronicle play, ‘When you see me you know me;’ and Nash, in his
‘Summers’ Last Will and Testament.’ From these sources, no indifferent
idea may be gained of the once famous Will. The incidents of
Rowland’s poem are to be found in Rowley’s play. The latter, printed in
1605, is a chronicle play, including the years 1537–1546, the last year
being the one before Henry’s death. It abounds with anachronisms, but
also with illustrations of the manner in which Sommers lived at court,
how he joked with the King, capped rhymes with their Majesties, and
was sometimes anything but decent in his jokes. At his first
appearance, Will enters the presence “at Whitehall,” booted and
spurred, upon which the following dialogue takes place:—
“K. Why, where hast thou been?
W. Marry, I rise early, and ride post to London, to know what news
was here at Court.
K. Was that your nearest way, William?
W. Oh, ay, the very foot-path, but yet I rid the horse-way to hear it.
I warrant there is ne’er a Cundid-head keeper in London, but knows

what is done in all the courts in Christendom.
Wols. And what is the best news there, William?
W. Good news for you, my Lord Cardinal, for one of the old women
water-bearers told me for certain, that last Friday, all the bells in Rome
rang backward; there was a thousand dirges sung; six hundred Ave-
Marias said; every man washed his face in holy water; the people
crossing and blessing themselves to send them a new Pope, for the old
is gone to purgatory.... The news,” adds Will, “after leaving Rome last
Friday, was at Billingsgate by Saturday morning; ’twas a full moon, and
came up in a spring-tide.”
Queen Jane is represented as looking “bigger” upon the jester;
“But I care not,” says Will to the King, “an she bring thee a young
prince, Will Sommers mayhaps be his fool when you two are both dead
and rotten.” “Do you hear, wenches?” he subsequently says to the
maids of honour, likely to be anxious to announce the issue of the
event alluded to. “She that brings the first tidings, however it fall out,
let her be sure to say that the child’s like the father, or else she shall
have no reward.”
Will is described as extravagantly free, not only to the maids of
honour, but to the King’s sister. Patch, in this piece, is not the King’s
fool, but Wolsey’s. “All the fools follow you, my lord,” he says to the
Cardinal, when the latter observes the two fools near him: “I come to
bid my cousin Patch welcome to court; and when I come to York
House, he’ll do as much for me.” To which Patch, who seems here a
natural rather then an artificial fool, replies, “Yes, cousin; hey, da,
darry, diddel, day, day.” Will’s attempts to make the King merry are
sometimes roughly recompensed. “He gave me such a box on the ear,”
says the fool, “that strake me clean through three chambers, down four
pair of stairs. I fell over five barrels in the bottom of the cellar, and if I
had not well liquored myself there, I had never lived after it.” Patch,
too, declares that the King had almost killed him “with his
countenance.” This sort of fool’s flattery has been very acceptable, it
may be observed, to all despotic princes, from Augustus down to the
Czar Nicholas. The most amusing of Roman historians tells us that
Augustus was always well pleased with those persons who, in

addressing him, looked upon the ground, as though there were a divine
splendour in his eyes, too dazzling for them to gaze upon.
“Gaudiebatque,” says Suetonius, “si quis sibi acrius contuenti, quasi ad
fulgorem solis, vultum submitteret.” His eyes nevertheless grew dim as
he grew old, when the lustre of the left one, in particular, went out in a
most ungodlike fashion.
The Czar Nicholas had a similar weakness, and he used his eyes to
frighten or fascinate people. Playing them mildly, he subdued
Lieutenant Royer into ecstatic admiration; and, according to Mr.
Turnerelli, Nicholas once, with one of his terrible glances, terrified a
Swedish Admiral into the Russian service. On another occasion,
happening to encounter a poor fellow who had strolled into a private
part of the Imperial park, the Czar gazed at him with such lightning in
his glance, that the intruder was stricken with brain fever;—an amount
of flattery which even Patch never piled up as tribute to the withering
power of the terrible looks of Henry VIII. Patch indeed had cause to be
afraid of Henry, for his rude essay to make the melancholy Monarch
merry, is rewarded by a kicking; for which, however, the King makes
compensation. Patch gets an angel, to buy him points; but Will, who
contrived that his cousin fool should incur the punishment, obtains a
new cap and suit for his pains; for, sayeth he, “so long as the King
lives, the Cardinal’s fool must give way to the King’s fool.” But in the
latter there is some sound sense, as, for instance, when he exclaims:
“Dost hear, old Harry, I am sure the true faith is able to defend itself,
without thee!” For some such remark, Wolsey styles him “a shrewd
fool.” Will is ready to do anything but flatter, which is against his
vocation; and get drunk, which is against his health; but he no sooner
declines to follow Patch to the cellar, when he foregoes his resolution,
and foolishly drinks away his wit, but sleeps it back again.
Its awakening is first tried on the new Queen Catherine; and it is in
the accomplished jester’s vein. “Look to thy husband, Kate, lest he
cozen thee; provide civil oranges enough, or he’ll have a lemon,
shortly.” This play upon the word leman, or “mistress,” was
subsequently employed by Heywood, the “King’s Jester,” to point a jest
made in the hearing of Queen Mary. Will, however, is much more
addicted to uttering bitter sentences against Wolsey, than jokes on the

King, Queen, or little Prince Edward. He is especially severe on the
“Smoake pence,” a most unpopular tax levied by the priest, and turned,
as Will implies, to the Cardinal’s especial profit. The jester proposes to
the King, that Wolsey shall be permitted to take the chimneys, since
there were bricks enough in the land, or materials for them, to build
others. But he protests against the coin of the realm being carried
away, seeing, as he says, that there is no mint whence new money can
be issued. Indeed nothing can exceed the boldness of Will’s jokes
against the Cardinal, except the nastiness of those levelled at the
ladies. Both are doubtless traditional, and we may believe that they
were uttered with impunity, from the stereotyped speech of the King,
“Well, William, your tongue is privileged.”
Sommers was also brought upon the stage by Nash, in his
‘Summers’ Last Will and Testament.’ This piece was written in 1593,
and printed some years later. There were then persons living who may
have remembered Will, as having seen him in their youth; and what is
said of him personally in this piece, may be accepted, I think, as having
some foundation in fact. The incidents spoken of connected with his life
at court, may also rest upon a basis of truth, and are therefore worth
noticing. Nash’s play is more like a masque than a comedy, and
Rowley’s chronicle-drama abounds in anachronisms. The probable
facts, however, are only mistimed, and both dramatists agree, in the
main, in the character of Will, “who,” says Mr. Thoms, in the reprint of
the ‘Nest of Ninnies,’ “in all probability owes his reputation rather to the
uniform kindness with which he used his influence over bluff Harry,
than to his wit or folly.”
In the dramatic portrait, then, of this once famous court fool, as
limned by Nash, we find Will describing himself as “used to go without
money, without garters, without girdle, without a hatband, without
points to my hose, and without a knife to my dinner.” As in Rowley, so
here, Will quotes Latin; he is also apt at old proverbs, and verbose with
old classical stories and tales, in which there are more words, however,
than wit. His Latin, indeed, is not always to the point, for he translates
memento mori, “Remember to rise betimes in the morning;” nor are his
classical stories true to historical tradition, nor his tales remarkable for
delicacy of illustration. He has a simpleton’s philosophy, and talks little

matters of science very much after the fashion of ‘Conversations at
Home.’ He has, too, a fool’s contempt for learning, as may be seen in
the following passage, which contains some allusions to his early life:—
“Who would be a scholar? not I, I promise you! My mind always
gave me this learning was such a filthy thing, which made me hate it so
as I did. When I should have been at school construing Batte mi fili, mi
fili mi Batte, I was close under a hedge, or under a barn wall, playing
at span-counter or Jack-in-a-box. My master beat me, my father beat
me, my mother gave me bread and butter, yet all this would not make
me a squitter-book. It was my destiny. I thank her as a most courteous
goddess, that she hath not cast me away upon gibberish;” and so on,
with a diatribe against the divisions of grammar, and parts of speech
generally, as forming a portion of “the devil’s Pater-noster.” And yet, out
of the accidence, he coins almost his only fragment of wit throughout a
play in which he enacts the character of “Chorus.” “Verba dandi et
reddendi,” says Will, “go together in the grammar rule; there is no
giving but with condition of restoring.” Altogether we obtain fewer
ideas of what Will may have been, from Nash, than from Rowley. The
former makes him less attractive, and when the jester closes the piece
with a “Valete spectatores, pay for this sport with a Plaudite, and the
next time the wind blows from this corner, we will make you ten times
as merry,”—we are glad to rejoin, vale et tu, and to get away without
paying the price asked for sport which, had it been ten times as merry
as is vouched for the next play, would not have sinned with excess of
mirthfulness.
It only remains for me to add, that Will survived to hold office
under Edward VI. How he sustained his reputation during a portion of
the six years’ reign of that young monarch, I am unable to inform my
readers. The only trace I have found of him is in a paper by Bray, in the
eighteenth volume of the ‘Archæologia,’ from which we learn, according
to a citation from the household expenses, that the sum of
twelvepence was paid “for painting Will Somers’ garments.”
Before proceeding to the next reign, I will take this opportunity to
narrate an anecdote of the learned and skilful diplomatist, Pace,—not
because he was the namesake of Pace, the “bitter fool” of Queen
Elizabeth’s days, but because the anecdote itself has reference to

subjects from which Henry could draw amusement, and that there is an
illustration in it, in connection with the court jesters.
Pace, we are told, in the collection of letters to and from Erasmus
(Basle, 1558), was once in the church at Woodstock, with the King and
court, when the Franciscan monk who preached, confined himself in his
sermon to denouncing the Greek language, and devoting to destruction
all who studied it. The choice of such a subject, and the manner in
which it was treated, were the more remarkable, as, a short time
previously, a Franciscan monk had been silenced for preaching in the
same sense. The Oxford students had hooted him in his cell, and the
authorities had to interfere. The King had written to the heads of
colleges in favour of the study of Greek; and his amazement was all the
more unbounded at the audacity of the new monk, who went even
further in his wrath against Greek than the Jewish Rabbis, who were
wont to solemnly pronounce accursed the man who allowed his
children to learn that language. If the King was enraged, the grave and
learned Pace, who sat near him, was delighted. He did not dare exhibit
his ecstasy; but he was so overcome with a propensity to burst out
laughing, that he was compelled to bury his face in both hands, to
conceal his strong and risible emotion. He was rather bolder when
Henry subsequently ordered the monk to attend him in his closet,
where the king pelted him with questions and menaces, and nearly
frightened him out of his senses. The poor preacher had been abusing
Erasmus without having read his works. He had, however, as he
tremblingly remarked, “cast his eye over some pages of the ‘Eulogy of
Folly.’” “Ah,” said Pace, “I really believe that the work was especially
written with a view to your reverence.” The monk meekly smiled. He
had not heart enough to confront the scholar, but he had sense enough
to creep out of the difficulty into which he had fallen. He confessed
himself to be reconciled with Greek from the sudden conviction which
had descended upon him, that it was derived from the Hebrew. King
and courtiers present burst into loud laughter at this sapient
observation, under shelter of which the speaker was allowed to
withdraw in safety. Pace declared that the monk had wit enough to
make the fortune of a court jester; for if it did not save him from

getting into a scrape, it certainly was strong enough to draw him out of
one.
Having mentioned the faithful fool of Cardinal Wolsey,—Patch,—I
cannot pass over the simpleton, or Morio, Patteson, retained in the
household of Wolsey’s successor in the Chancellorship, Sir Thomas
More. All persons who are familiar with the biography of the latter
eminent individual, will remember how heartily Sir Thomas, from his
youth upwards, was addicted to jesting. When he was a page, being
then fifteen years of age, in the family of Cardinal Morton, Archbishop
of Canterbury, he kept the octogenarian prelate and all his guests in
roars of laughter, as he waited on them at table. Morton was delighted
with the frolicsome boy, who, especially at Christmas and other joyous
seasons, was worth any number of ordinary household fools, seeing
that his improvised jests were superior to anything done or uttered by
the professional joker. More’s manner on these occasions was, however,
quite after the fashion of “cousin Motley.” Thus, when the players were
representing some comic drama, for the entertainment of their
reverend patron, “young More,” as Roper relates in his Life, “would
suddenly step up among the players, and, never studying before upon
the matter, make often a part of his own invention which was so witty,
and so full of jests, that he alone made more sport than all the players
besides; for which, his towardliness, the Cardinal much delighted in
him, and would often say of him to divers of the nobility who at sundry
times dined with him, ‘This child here, waiting at the table, whosoever
shall live to see it, will prove a marvellous rare man.’” As More, in his
youth, gratified Cardinal Morton by his wit, so, in his manhood, by his
wit as well as his wisdom, he afforded amusement to his capricious
Sovereign. When Henry had had enough of the outpouring of
knowledge from More (who was yet but Under-Sheriff of London and
Master of the Requests) on astronomy, geometry, and divinity; then,
“because,” says his biographer, “he was of a very pleasant disposition,
it pleased His Majesty and the Queen, after the Council had supped,
commonly to call for him to hear his pleasant jests.” These latter must
have been of a very different quality from those which the King had
been wont to make merry with from the lips of Will Sommers, and we
cannot be surprised at their exciting such admiration in the Sovereign

that he detained the illustrious jester whole weeks at Court, away from
his home and domestic enjoyments. Sir Thomas beheld himself in great
peril of descending to the vocation of joker in ordinary, and he devised
a witty remedy in order to escape the uncoveted distinction. “When Sir
Thomas perceived his pleasant conceits so much to delight them that
he could scarce once in a month get leave to go home to his wife and
children, and that he could not be two days absent from the Court, but
he must be sent for again; he, much misliking this restraint of his
liberty, began therefore to dissemble his mirth, and so, little by little, to
disuse himself, that he from henceforth, in such seasons, was no more
so ordinarily sent for.” In short, he feigned heaviness of humour, that
he might escape the honours paid to, and the services expected from,
a court jester. Had any friend expressed astonishment at the change in
his bearing, More might have excused himself nearly in the words of
the essayist, who said:—“If my readers should at any time remark that
I am particularly dull, they may be assured there is a design under it.”
So More contrived for awhile to be more at home, where he had a
wife who missed all the points of his puns, and a household fool who
had about as much wit as his mistress. The latter was one Patteson, an
ex-mummer, half crazed by a fall from a church-steeple, who had lost
his old itinerant vocation, and whom More took into his family, poor,
shabby, droll fellow as he was, and amused himself, after application to
high subjects, by listening to his small wit, even as a man may take
now and then to small-beer after too hot and long an acquaintance
with ruddy Vin de Beaune.
Patteson founded his desire to be a household fool, on the very
sufficient ground that, as he was already laughed at for one, he
thought he might as well be hired in a great family, where he should be
paid, fed, and lodged for being thus the object of risibility. Sir Thomas
answered, that he had had little thought of employing such a retainer,
being rather inclined to do all the fooling in his family, himself. The
great negotiation, however, was brought to a conclusion by a
compromise; the business was to be divided, Sir Thomas continuing
unlicensed joker, and Patteson being paid full salary for inoffensive
small wit, cleanliness of life, and restraint of his tongue before ladies.

Patteson was not an educated jester, like Scogan and other great
wearers of the cap and bells under the roofs of kings. He could not
read. “But what of that?” he is said to have asked; “there never was
but one that I ever heard of, that never having learned, knew his
letters, and well he might, for he made them that made them.” The
witty remark deserved to procure for Patteson his desired engagement;
and this he had no sooner procured, than he affected to take
precedence of his master, in his own house; “for,” said he, “you,
brother, are but jester to King Harry, whereas I am jester to Sir Thomas
More; and I leave you to determine which is the greater man of the
two.”
Patteson occasionally went abroad with his master, probably
attending him as his servant, which was often one of the offices of
fools. The license of the latter also went abroad with the service of the
former, and we are told that once, after he had been many years in
More’s service, he attended his master, or at all events was present, at
a dinner given in Guildhall, when the conversation fell upon More’s
refusal to take the oath of supremacy. The conversation of the guests
was interrupted by a query of the fool:—“Why, what aileth him,” cried
Patteson, “that he will not swear? Wherefore should he stick to swear?
I have sworn the oath myself.”
Lord Campbell quotes another illustration of the license of this
jester, from ‘Il Moro’, an Italian account of Sir Thomas More, printed at
Florence, and dedicated to Cardinal Pole. The incident is supposed to
be narrated by the Chancellor himself, and Lord Campbell is of opinion
that it does not give us “a very exalted notion of the merriment caused
by these simpletons.” Perhaps we might more correctly say, that the
incident fails to convey a very elevated idea of the wit that raised the
merriment. However this may be, here is the trait in question:—
“Yesterday, while we were dining, Pattison” (so is the name here
spelt) “seeing a guest with a very large nose, said, there was one at
table who had been trading to the Promontory of Noses. All eyes were
turned to the great nose, though we discreetly preserved silence, that
the good man might not be abashed. Pattison, perceiving the mistake
he had made, tried to set himself right, and said, ‘He lies who says the
gentleman’s nose is large, for, on the faith of a true knight, it is rather a

small one.’ At this, all being inclined to laugh, I made signs for the fool
to be turned out of the room; but Pattison, who boasted that he
brought every affair that he commenced to a happy conclusion,
resisted, and, placing himself in my seat at the head of the table, said
aloud, with my tone and gesture, ‘There is one thing I would have you
to know,—that gentleman there has not the least bit of nose on his
face.’”
This sort of sparring between patron and jester was commonly
indulged in with considerable satisfaction by both parties. It was safer
for More to do so, by way of relaxation, with Patteson, than with the
King; whose humour might take a deadly turn against an unwelcome
joke, and particularly against an unlicensed joker. The authoress of ‘The
Household of Sir Thomas More,’ following the tradition, describes the
banter of Sir Thomas and Sir Witless, as never exceeding the bounds of
good-humoured pleasantry; “but Patteson,” it is added, “is never
without an answer, and although, it may be, each amuses himself now
and then with thinking, I’ll put him up with such a question; yet, once
begun, the skein runs off the reel without a knot, and shows the
excellent nature of both, so free are they alike from malice and over-
license.” It is true that the sayings put in the mouth of More’s “Morio”
by the authoress whose words I have just quoted, are for the most part
as apocryphal as Borde’s compiled jests to which he has prefixed the
name of “Scoggin,” to make them sell. The character of the fool is,
however, described according to tradition, in the pleasant addition to
the Romance of History, in the work last named. There we see
Patteson, with a peacock’s feather in his hand, sitting astride on a
balustrade, and exchanging sharp question and answer, and lively
comment and reflection, on peacocks themselves and their vanity; and
on the advantages of not having as many eyes in their heads as they
have in their tails, as they are in consequence less vain-glorious, and
see not what passes behind their backs. Patteson, according to this
authoress, chopped logic with the young daughters of More; touched a
little on sentimental matters; could speak feelingly of religion, death,
and the equality of the grave; spoke prophetically on political subjects;
and jested with them, or rather at them, on their several lovers.

Lord Campbell naturally suggests, that More’s fool ought to have
been a great proficient at jesting, since he practised under so great a
master. However this may be, when the Lord Chancellor had
commenced to decline from power and dignity, he provided for the
future well-being of his fool as carefully as he did for that of any
greater officer of his household. Wolsey, at his fall, sent Patch as an
acceptable gift to the King. More made over Patteson to a less exalted
sovereign,—the Lord Mayor of the City of London, “with a stipulation,”
says Lord Campbell, “that he should continue to serve the office of fool
to the Lord Mayor for the time being.” This rather loosely-worded
phrase probably points at the origin of the office of “Lord Mayor’s Fool,”
a title which was, however, given to the clubmen in provincial mayoral
processions from the year 1444. Whether Patteson was, or was not, the
original Lord Mayor’s Fool, by right of nomination to the office, he had
as little respect for the dignity of chief magistrate of the city, as any
modern merchant prince who, being too lazy or too unpatriotic to
perform the onerous duty of the office, affects to despise the dignity
which accompanies, and the titles which often follow, a distinguished
fulfilment of that duty. So this first official corporation jester flouted his
sublime chief. His humour in this respect is well hinted at by the
authoress of ‘The Household of Sir Thomas More,’ who depicts Patteson
as saying, on one first of April, “I told my Lord Mayor overnight, that if
he looked for a fool this morning, he must look in the glass.... I should
by rights wear the gold chain, and he the motley; and a proper fool he
is, and I shall be glad when his year’s service to me is out. The worst of
these Lord Mayors is, that we can’t part with them till their time’s up.
Why, now, this present one hath not so much understanding as would
foot an old stocking; ’twas but yesterday when, in quality of my Taster,
he civilly enough makes over to me a half-eaten plate of gurnet, which
I wave aside thus, saying,—I eat no fish of which I cannot affirm, ‘rari
sunt boni,’ few are the bones, ... and I protest to you, he knew it not
for fool’s Latin.” Patteson himself had a veneration for his old master
which he could not entertain for the new, from whose chattering
propensity at table, the jester picked out views of politics that
foreboded evil to his former and now disgraced patron. “For the love of
safety, then, Mistress Meg,” says Patteson, in a passage founded on this
stray scrap of history, “bid thy good father e’en take a fool’s advice, and

eat humble-pie betimes; for doubt not this proud madame (Anne
Boleyn) to be as vindictive as Herodias, and one that, unless he
appease her full early, will have his head set before her in a charger.
I’ve said my say.”
We may take Patteson at his last word, and, leaving him, proceed
to greater names than his on the register of Motley in the service of
kings.
* * * * *
We now come to a personage of some celebrity, who seems to
have been a court jester, without being exactly a court fool. I allude to
John Heywood, of North Mimms, in Hertfordshire, whom Sir Thomas
More introduced to the King as Sir William Neville did Scogan, and
whose introduction was followed by similar circumstances,—his
appointment as “jester” to the sovereign.
More had known Heywood early. The latter was a student at what
was then called Broadgate, Oxford, now Pembroke. Heywood’s spirit of
fun, his humour, and his readiness at repartee made him a favourite
with More, who was fond of spending leisure hours with him,—a man
of whom it was said that “he had wit at will, and art was all he missed.”
Heywood, moreover, was a good vocalist, and no mean instrumental
player. Previous to his introduction to the King, More presented him to
the lady (afterwards Queen) Mary, who found his merriment so
irresistible “that it moved even her rigid muscles,” says Warton; “and
her sullen solemnity was not proof against his songs, his rhymes, and
his jests.” Mary, however, was more easily moved to mirth than Warton
and those whose opinions were followed by him, suspected. Even in
her womanhood, when we are accustomed to think of her as one
solemnly severe, she could (albeit moody and melancholy at times)
laugh heartily at a mountebank. In 1556, Strype speaks of her as
holding a grand military review in Greenwich Park, at which “came a
tumbler, and played many pretty feats, the Queen and Cardinal (Pole)
looking on; whereat she was observed to laugh heartily.” Long ere she
had ascended the throne, she had learned to laugh at, with, or through
John Heywood. Of the latter, Warton says that “he was beloved and
rewarded by Henry VIII. for his buffooneries;” and, indeed, that

monarch was so satisfied with the quips of his daughter’s favourite,
that, as previously stated, he named John “King’s Jester.” He seems to
have been a favourite also in the mansions and at the tables of the
nobility; and a specimen of his wit there is offered us by Puttenham.
“The following happened,” he says, “on a time, at the Duke of
Northumberland’s board, where merry John Heywood was allowed to
sit at the board’s end. The Duke had a very noble and honourable mind
to pay his debts well, and when he lacked money, would not stick to
sell the greatest part of his plate. So had he done some few days
before.
“Heywood being loath to call for his drink as often as he was dry,
turned his eyes towards the cupboard, and said, ‘I find a great miss of
your Grace’s standing-cups.’ The Duke, thinking that he had spoken it
of some knowledge that his plate was lately sold, said somewhat
sharply, ‘Why, Sir, will not these cups serve so good a man as yourself?’
Heywood readily replied, ‘Yes, if it please your Grace, but I would have
one of them stand still at my elbow, full of drink, that I might not be
driven to trouble your man so often to call for it.’
“This pleasant and speedy reverse of the former words, helped all
the matter again, whereby the Duke became very pleasant, and drank
a bottle of wine to Heywood, and bade a cup should always be
standing by him.”
His boldness with the Queen was quite that of the privileged jester,
and he was recompensed for his puns and conceits when men more
meritorious were neglected. The following contains good proof of his
license. When the Queen once remarked to him that the priests must
forego their wives, John exclaimed (and he was a very strict Catholic
too), “Then your Grace must allow them lemmans [sweethearts], for
the clergy cannot live without sauce.” This epigrammatic turn was very
strong upon him; and indeed many of his epigrams, of which he was
the author of hundreds, are said to have been versifications of his own
jokes. I have already noticed the audacity of his jests with the
sovereign, a further instance of which we have in an incident connected
with one of his visits to the palace.

“Now, Master Heywood,” said Mary on the occasion in question,
“what wind blew you to court?” “There were two,” answered audacious
John; “one, that I might see your Majesty, and the other, that your
Majesty might see me.” When he was told that a certain Master of Arts
had assumed the ordinary attire of the court fool, “There is no great
harm in that,” remarked Heywood, “he is merely a wise man in a fool’s
coat; the evil is, when the fool puts over his motley the wise man’s
gown.”—“How do you like my beer?” asked a host of him, “is it not well
hopped?” “So well,” said Heywood, “that had it hopped a little further, it
would have hopped into water.” This reminds me of a far wittier saying
by a brighter English wit than Heywood—the late Douglas Jerrold; and
which is better worth recording. At an hotel at Hastings, Jerrold was
dining with two friends, one of whom, after dinner, ordered among
other pleasant things, “a bottle of old port.” “Waiter,” said Douglas, with
that twinkle of the eye which was always a promise of wit, “Mind, now;
a bottle of your old port, not your elder port.” Heywood never equalled
that, though he gave utterance to as many witty thoughts as the
wittiest man of his time. Among them was his remark, to a person
complaining that the great number of lawyers would spoil the
profession. “Not so,” exclaimed John; “for the more spaniels, the more
game!”
His familiarity with Mary, was doubtless founded on his long
service. When she was a mere little girl at Greenwich, Heywood
officiated as manager of the troop of child actors who performed in her
presence. On one occasion he appears to have received six and
eightpence for his pains. Later, he wrote ballads for her, sometimes
making herself the subject of them. When her coronation procession
passed St. Paul’s, there was mirthful John, seated beneath a vine; and,
as the Queen approached, he arose and delivered an oration. When
Mary was ill, he went to her chamber and recited verses or read plays
to her; and when she was dying, says Flögel, he stood by her death-
bed, and solaced her with music; “Er war auch ein berühmter Musikus,
und musste der Königin Maria von England, auf ihrem Todbette, mit
seiner Musik aufwarten.” This could not have been, however, when her
death was very near. Lingard simply says, that “on the morning of her

death, Mass was celebrated in her chamber; she was perfectly sensible,
and expired a few minutes before the conclusion.”
With the reputation of having been “King’s Jester,” Heywood is also
known to us as a poet, a dramatist, and a writer of epigrams. In the
first capacity, his most laboured piece is the least successful. I have
tried in vain to read through his ninety-eight chapters, in octave
stanzas, devoted to the subject of “The Spider and the Fly,” in the
gaily-bound copy in the British Museum. I quite agree with Harrison’s
description of it (quoted by Warton), that “neither he himself that made
it, neither any one that readeth it, can read unto the meaning thereof.”
It is far less amusing than the comic song, with the same title, by the
old free-and-easy poet, Tom Hudson.
As a dramatist, Heywood was among the earliest of English writers
of comedy. He was not among the best for delicacy, humour, or
decency. All these are of the roughest and dirtiest, such as might have
been expected from Will Sommers. I must however differ in some
degree from Warton, unassailable as his judgments generally are, when
he describes Heywood’s plays as “altogether void of plot, humour, and
character.” Yet, I confess, detestable as I hold idleness to be, a man
were better occupied in doing nothing than in reading these
productions. They hardly repay the curiosity of the student of literature,
and even he must rise from the perusal sorely in need of civet
wherewith to sweeten his imagination.
It is as an epigrammatist that this honorary jester was most
celebrated, and continues to be best known to the few who care to
cultivate acquaintance with him. Of the epigrams I will select a few
specimens. Bearing in mind that they are often the versification of his
jests, and that the latter must frequently have had allusion to passing
subjects, the following probably points at a then living prince. It is
entitled:—
OF AN ILL GOVERNOR CALLED JUDE.

A ruler there was in a country afar,
And of the people a great executioner,
Who by name, I understand, was called Jude.
One gave him an ass, which gift when he had view’d,
He asked the giver, for what intent
He brought him that ass. “For a present
I bring, Master Jude,” quoth he, “this ass hither;
To join Master Jude and this ass together,
Which two joined in one, this is brought to pass,
I may bid you good even, Master Jude—ass.”
“Maccabee or Iscariot, thou knave?” quoth he;—
“Whom it pleaseth your mastership, him let it be!”
The following, too, is very much after the fashion of the French
“fous à titre d’office” when they repelled the unwelcome familiarity of
certain courtiers.
TWO, ARM-IN-ARM.
One said to another, on taking his arm,
“By license, friend, and take this for no harm.”
“No, Sir,” (quoth the other,) “I give you full leave
To hang on my arm, Sir, but not on my sleeve.”
Here is a jester’s definition of
WIT, WILL, AND WISDOM.
Where will is good, and wit is ill,
There wisdom can no manner skill.
Where wit is good, and will is ill,
There wisdom sitteth silent still.
Where wit and will are both too ill,
There wisdom no way meddle will.
Where wit and will well-ordered be,
There wisdom maketh a trinity.

Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.
More than just a book-buying platform, we strive to be a bridge
connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.
Join us on a journey of knowledge exploration, passion nurturing, and
personal growth every day!
ebookbell.com