Operating Systems and Middleware Supporting Controlled Interaction Max Hailperin All Chapters Instant Download
Operating Systems and Middleware Supporting Controlled Interaction Max Hailperin All Chapters Instant Download
com
https://ebookmeta.com/product/operating-systems-and-
middleware-supporting-controlled-interaction-max-hailperin/
OR CLICK HERE
DOWLOAD NOW
https://ebookmeta.com/product/survey-of-operating-systems-7th-edition-
jane-holcombe/
ebookmeta.com
https://ebookmeta.com/product/modern-operating-systems-5th-edition-
andrew-s-tanenbaum/
ebookmeta.com
https://ebookmeta.com/product/understanding-operating-systems-8th-
ed-8th-edition-ann-mchoes/
ebookmeta.com
https://ebookmeta.com/product/mechanical-design-and-manufacturing-of-
electric-motors-2nd-edition-wei-tong/
ebookmeta.com
Contracting and Contract Law in the Age of Artificial
Intelligence 1st Edition Martin Ebers
https://ebookmeta.com/product/contracting-and-contract-law-in-the-age-
of-artificial-intelligence-1st-edition-martin-ebers/
ebookmeta.com
https://ebookmeta.com/product/reference-frame-theory-development-and-
applications-1st-edition-paul-c-krause/
ebookmeta.com
https://ebookmeta.com/product/handbook-of-single-cell-technologies-
tuhin-subhra-santra-editor/
ebookmeta.com
https://ebookmeta.com/product/physique-secrets-the-underground-
playbook-for-building-a-muscular-and-aesthetic-male-body-nick-
schlager/
ebookmeta.com
https://ebookmeta.com/product/return-of-pal-ul-don-1st-edition-will-
murray/
ebookmeta.com
Operating Systems and Middleware:
Supporting Controlled Interaction
Max Hailperin
Gustavus Adolphus College
or send a letter to Creative Commons, 171 Second Street, Suite 300, San
Francisco, California, 94105, USA.
Preface xi
1 Introduction 1
1.1 Chapter Overview . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 What Is an Operating System? . . . . . . . . . . . . . . . . . 2
1.3 What Is Middleware? . . . . . . . . . . . . . . . . . . . . . . 6
1.4 Objectives for the Book . . . . . . . . . . . . . . . . . . . . . 8
1.5 Multiple Computations on One Computer . . . . . . . . . . . 9
1.6 Interactions Between Computations . . . . . . . . . . . . . . 11
1.7 Supporting Interaction Across Time . . . . . . . . . . . . . . 13
1.8 Supporting Interaction Across Space . . . . . . . . . . . . . . 15
1.9 Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2 Threads 21
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.2 Example of Multithreaded Programs . . . . . . . . . . . . . . 23
2.3 Reasons for Using Concurrent Threads . . . . . . . . . . . . . 27
2.4 Switching Between Threads . . . . . . . . . . . . . . . . . . . 30
2.5 Preemptive Multitasking . . . . . . . . . . . . . . . . . . . . . 37
2.6 Security and Threads . . . . . . . . . . . . . . . . . . . . . . . 39
3 Scheduling 45
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
3.2 Thread States . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
3.3 Scheduling Goals . . . . . . . . . . . . . . . . . . . . . . . . . 49
3.3.1 Throughput . . . . . . . . . . . . . . . . . . . . . . . . 51
3.3.2 Response Time . . . . . . . . . . . . . . . . . . . . . . 54
3.3.3 Urgency, Importance, and Resource Allocation . . . . 55
3.4 Fixed-Priority Scheduling . . . . . . . . . . . . . . . . . . . . 61
v
vi CONTENTS
9 Networking 395
9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
9.1.1 Networks and Internets . . . . . . . . . . . . . . . . . 396
9.1.2 Protocol Layers . . . . . . . . . . . . . . . . . . . . . . 398
9.1.3 The End-to-End Principle . . . . . . . . . . . . . . . . 401
9.1.4 The Networking Roles of Operating Systems, Middle-
ware, and Application Software . . . . . . . . . . . . . 402
9.2 The Application Layer . . . . . . . . . . . . . . . . . . . . . . 403
9.2.1 The Web as a Typical Example . . . . . . . . . . . . . 403
CONTENTS ix
11 Security 467
11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467
11.2 Security Objectives and Principles . . . . . . . . . . . . . . . 468
11.3 User Authentication . . . . . . . . . . . . . . . . . . . . . . . 474
11.3.1 Password Capture Using Spoofing and Phishing . . . . 475
11.3.2 Checking Passwords Without Storing Them . . . . . . 477
11.3.3 Passwords for Multiple, Independent Systems . . . . . 477
11.3.4 Two-Factor Authentication . . . . . . . . . . . . . . . 477
11.4 Access and Information-Flow Controls . . . . . . . . . . . . . 480
11.5 Viruses and Worms . . . . . . . . . . . . . . . . . . . . . . . . 485
11.6 Security Assurance . . . . . . . . . . . . . . . . . . . . . . . . 489
11.7 Security Monitoring . . . . . . . . . . . . . . . . . . . . . . . 491
11.8 Key Security Best Practices . . . . . . . . . . . . . . . . . . . 494
x CONTENTS
A Stacks 505
A.1 Stack-Allocated Storage: The Concept . . . . . . . . . . . . . 506
A.2 Representing a Stack in Memory . . . . . . . . . . . . . . . . 507
A.3 Using a Stack for Procedure Activations . . . . . . . . . . . . 508
Bibliography 511
Index 527
Preface
Suppose you sit down at your computer to check your email. One of the
messages includes an attached document, which you are to edit. You click
the attachment, and it opens up in another window. After you start edit-
ing the document, you realize you need to leave for a trip. You save the
document in its partially edited state and shut down the computer to save
energy while you are gone. Upon returning, you boot the computer back
up, open the document, and continue editing.
This scenario illustrates that computations interact. In fact, it demon-
strates at least three kinds of interactions between computations. In each
case, one computation provides data to another. First, your email program
retrieves new mail from the server, using the Internet to bridge space. Sec-
ond, your email program provides the attachment to the word processor,
using the operating system’s services to couple the two application pro-
grams. Third, the invocation of the word processor that is running before
your trip provides the partially edited document to the invocation running
after your return, using disk storage to bridge time.
In this book, you will learn about all three kinds of interaction. In all
three cases, interesting software techniques are needed in order to bring the
computations into contact, yet keep them sufficiently at arm’s length that
they don’t compromise each other’s reliability. The exciting challenge, then,
is supporting controlled interaction. This includes support for computations
that share a single computer and interact with one another, as your email
and word processing programs do. It also includes support for data storage
and network communication. This book describes how all these kinds of
support are provided both by operating systems and by additional software
layered on top of operating systems, which is known as middleware.
xi
xii PREFACE
Audience
If you are an upper-level computer science student who wants to under-
stand how contemporary operating systems and middleware products work
and why they work that way, this book is for you. In this book, you will
find many forms of balance. The high-level application programmer’s view,
focused on the services that system software provides, is balanced with a
lower-level perspective, focused on the mechanisms used to provide those
services. Timeless concepts are balanced with concrete examples of how
those concepts are embodied in a range of currently popular systems. Pro-
gramming is balanced with other intellectual activities, such as the scientific
measurement of system performance and the strategic consideration of sys-
tem security in its human and business context. Even the programming
languages used for examples are balanced, with some examples in Java and
others in C or C++. (Only limited portions of these languages are used,
however, so that the examples can serve as learning opportunities, not stum-
bling blocks.)
Where the book discusses the protection of each process’s memory, one
additional operating system is brought into the mix of examples, in order
to illustrate a more comprehensive range of alternative designs. The IBM
iSeries, formerly known as the AS/400, embodies an interesting approach
to protection that might see wider application within current students’ life-
times. Rather than giving each process its own address space (as Linux,
Windows, and Mac OS X do), the iSeries allows all processes to share a
single address space and to hold varying access permissions to individual
objects within that space.
Several middleware systems are used for examples as well. The Ora-
cle database system is used to illustrate deadlock detection and recovery
as well as the use of atomic transactions. Messaging systems appear both
as another application of atomic transactions and as an important form of
communication middleware, supporting distributed applications. The spe-
cific messaging examples are drawn from the IBM WebSphere MQ system
(formerly MQSeries) and the Java Message Service (JMS) interface, which
is part of Java 2 Enterprise Edition (J2EE). The other communication mid-
dleware example is Java RMI (Remote Method Invocation).
shakspere.
And Martha had to meet lesser creditors to whom Harry owed
smaller amounts for trifles of his own wardrobe, of furniture, and
other inconsiderable things. But the sum they came to altogether
was far from inconsiderable. Uncle Sandy, who steadily attended
and supported her, was grieved sometimes by the bitter and harsh
passion with which she received the faintest word which implied
blame of Harry. In every other particular Martha appeared a
chastened and sober woman; in this the fire and pride of her nature
blazed with an unchecked fierceness which grieved the gentler spirit.
Within himself there was something also which sprang up with
instinctive haste to defend the memory of Harry; but Martha’s
nervous impatience of the most remote implied blame, and the
headlong fiery passion with which she threw herself upon any one
who attempted this, made the old man uneasy. And people who
encountered Martha’s anger did not know its strange inconsistency,
nor could have believed how well she was aware of Harry’s faults, or
how in her heart she condemned them; but Martha had devoted her
life to restore to Harry’s memory the honour he had lost in his
person, and whoso struck at him, struck at her very life.
They were walking home on their return—for the carriage was
already sold—and John, who had not yet got another place, carried
their little travelling-bags behind them. It was a bright November day,
not very cold, but clear and beautiful, and the sunshine lay calmly
like a glory on the head of Demeyet, crowning him against his will,
though even he bore the honour more meekly than in the dazzling
days of summer. The air was so clear, that you could see the white
houses clustering at his feet, and hear the voices of distant farm-
yards on every side, miles away, making a continual sound over the
country, which seemed to lie in a silent trance of listening; and from
this little height which the road descends, you can see the blue
smoke of Allenders curling over the bare trees, and make out that
the sunshine glances upon some bright childish heads under the
stripped walnut on the lawn. Uncle Sandy, looking towards it, prays
gentle prayers in his heart—prays to the God of the fatherless, the
widow, the distressed—to Him who blessed the children in His arms,
and wept with the sisters of the dead; and has his good heart
lightened and comforted, knowing who it is to whom he has in faith
committed the charge of these helpless ones; and the old man has a
smile upon his face, and many a word of tender kindness in his
heart, to comfort the “bairns” at home—for they are all bairns to him.
But other thoughts burn at the heart of Martha, as she walks
onward by his side. Unawares and unconsciously her soul shudders
at the sunshine—hates with fierce impatience the voices and
cheerful hum of ordinary life, which grow audible as they approach
Maidlin, and shrinks from returning home—home, where that one
vacant place and absent voice, makes her heart desolate for ever.
Through her bitter repinings, Miss Jean’s exultation passes with a
ghastly terror, and Martha shivers to think that this unholy age may
come upon her, and has her heart full of questionings almost
impious. That this old woman, envious, degraded and miserable,
should be spared in the earth to see many a hopeful head laid low;
that poor old Dragon, basking in the sunshine, should live on from
day to day, and see the children die; that she herself should remain,
and Harry be taken away. Martha said, “Why? why?” and groaned
within herself, and was burdened, hating the very light, and shrinking
with burning impatience from the respectful looks and half-spoken
sympathies of these cottar women at Maidlin Cross. She could not
accept sympathy; she turned away with loathing from all except
those who immediately shared her sorrow; and even them she bore
with sometimes painfully—for who could understand her grief?
A blasting fiery unblessed grief burning her heart like a tempest—
and a sullen gloom came over Martha’s face as she averted her
head, and walked on steadily, closing her ears to the pleasant
natural sounds which seemed to crowd upon her with so much
greater distinctness than usual, that they chafed her disturbed mind
into very fury. “The spirit of the Lord left Saul, and an evil spirit from
the Lord troubled him.” It was so with Martha now.
Little Mary Paxton has been learning to-day to make a curtsey—for
she is to go to school for the first time to-morrow; and her big sister,
Mysie, says the young ladies curtsey when they enter the school-
room at Blaelodge. Mary has blue eyes, little ruddy lips, always
parted by two small white teeth, which appear between them; and
cheeks, which the sun has ripened, according to his pleasure, all the
summer through. In her little woollen frock and clean blue pinafore,
Mary has been practising her new acquirement at the Cross. She is
only four years old, and has a licence which the elder children have
not; so little Mary rises up from the step of the Cross on which she
has just seated herself for a rest, and coming forward with her small
steps, pauses suddenly on the road before Martha, folds her little
bare hands on her breast, and looking up with the sweet frank
childish face, and the two small teeth fully revealed by her smile of
innocent satisfaction, makes her little curtsey to the lady, and stands
still to be approved with the confidence of her guileless years.
Upon Martha’s oppressed heart this falls like a blow under which
she staggers, scarcely knowing for the moment from whence the
shock comes. Suddenly standing still, and grasping at the old man’s
arm to support herself, she looks at the child—the child who lifts up
her sweet little simple face, with its smiling parted lips and sunny
eyes, and look of perfect trust and innocence. Little Mary wits not
that there are in the world such despairs and bitternesses as blind
the very heart in Martha’s breast; and Martha’s breast heaves with a
great sob as this sudden stroke falls upon her. The old woman’s
haggard face, with its ghostly triumph, disappears from her mind—
herself, heavy with the grief, which is greater than every other,
passes away from her relieved sight. Standing still in perfect silence,
a sudden burst of natural emotion which sweeps away all evil things
before it, falls upon her as from the skies—a strong revulsion, like
the witched mariner:
old play.
Maggie McGillivray clips no longer in the wintry sunshine at her
mother’s door. Poor little foolish girl, she has married a cotton-
spinner, and at eighteen has a baby, and many cares upon the head
which used to stoop under the light as she sang the “Lea Rig,” and
clipped at her web. And Bessie McGillivray, who has succeeded
Maggie, has no such heart for either the work or the song, but drawls
out the one dismally, and idles about the other, and thinks it would be
a great relief to marry a cotton-spinner too, and have no more webs
to clip—a fate which she will accomplish one of these days. And
Bessie is “cauldrife,” as her mother says, and prefers sitting at the
fireside to-day, though the sunshine comes down mellow and warm
through the November fog; so that the scene from Mrs. Rodger’s
parlour window loses one of its most pleasant features, when there
is nothing to look to opposite, but the idle light lying on the stones at
Peter McGillivray’s door.
Mrs. McGarvie’s Tiger, still tawny and truculent, winks in the sun, as
he sits upon the pavement, confronting it with his fierce red eyes. But
Mrs. McGarvie’s red-haired Rob has gone to Port Philip to make his
fortune in the bush, and pretty little Helen has undergone the
universal destiny, and is married. There is change everywhere
without—new names on the Port Dundas Road—new houses
springing up about its adjacent streets; but Mrs. Rodger’s parlour,
where Agnes and Rose, and Uncle Sandy, with the children, are now
assembled, though a long succession of tenants have passed
through it since they left it, remains still the same.
And still the same is gaunt Mrs. Rodger in her widow’s cap—
genteel and grim, terrible to taxgatherers, and innocent men of gas
and water; and Miss Rodger, care-worn, faded and proud; and the
prim Miss Jeanie. But “Johnnie,” in his chimney corner, has begun to
be moved to better things than this perpetual idleness; and though
he has not reached so far as to overcome himself, and his false and
unwholesome shame, he is approaching to this better state; and a
great clumsy good-natured lodger pays persevering court to Miss
Aggie. The hoyden is decidedly reluctant, and resists and rejects him
stoutly—but it is no use, for this is her fate.
And Agnes with the bright hair all hidden under her widow’s cap,
sits down by the window with her baby in her lap, and bending over
it, attending to its wants, lets her tears fall silently upon its frock, and
on the little round arms which stretch up to her, till a violent
paroxysm comes upon her, and she has to leave the infant to Rose,
and steal away into the inner room “to compose herself,” as she says
—in reality to sob and weep her strength away, and be exhausted
into composure. Poor little unconscious child, upon whom this heavy
baptism falls! for now, one by one, over the little hands with which he
strokes her cheek, steal the tears of Rose. It was unwise of them to
come here; the place is too full of memories.
By a way which Violet has often clambered up in the summer nights
long ago, it is possible to reach the high field which, closely
bordering upon Mrs. Rodger’s house, is level with the bed-room
windows. Here in the dusk, when the night cold has scarcely set in,
and one star trembles in the misty sky, strays Lettie’s friend, Mr.
John, pondering over many things; and here comes little thoughtful
Lettie, to search the old corners, where she used to find them, for
one remaining gowan, and keep it as a memorial of this place which
is like home. From the edge of the field you can look sheer down
upon the road with its din and constant population, and upon the
lights gleaming scantily in those little nooks of streets about the
Cowcaddens, where Violet knows every shop. From the other end of
the field, close upon the dangerous brink where it makes abrupt and
precipitous descent into a great quarry, comes the sound of those
distinct measured strokes, broken by continual exclamations and
laughter, with which two stout servants beat a carpet. The dust is out
of it long ago, but still their rods resound in quick time on either side,
and their voices chime in unison; and now they trail it over the dark
fragrant grass, and stealing to the edge call to the passengers below,
who start and look around in amazement, and would not discover
whence the voice comes, but for the following laugh, which reveals
the secret. And by and bye a “lad” or two, and some passing mill
girls, scramble up the broken ascent which communicates with the
road; and often will the mistress look from her door in dismay, and
the master call from the window, before Janet and Betsy lift their
carpet from the grass, and recollect that it is “a’ the hours of the
nicht,” and that there are a hundred things to do when they return.
But Lettie puts her hand softly into Mr. John’s hand, and begins to
answer, with many tears, his questions about Harry; and tells him
how Martha is to do everything that Harry wanted to be done, and
that they are all to work at the “opening,” and Katie Calder is to stay
at Allenders; but neither of them are to go to school at Blaelodge any
more. Violet does not quite know what makes her so confidential,
and has a compunction even while she speaks, and thinks Martha
would not be pleased—but yet she speaks on.
“And we’re all to be busy and work at the opening; for Martha says
we need not think shame,” said Lettie; “and Katie and me will be able
to help to keep the house, Mr. John; and Rose says it’s better to
work than be idle, and it keeps away ill thoughts; but I like best to
think it’s lane, without working, or to read books—only I’ve read all
the books in Allenders, and I’m no to be idle any more.”
“You see I’m aye idle yet, Lettie,” said John.
“Oh yes; but then you never need—and you’ve aye been,” said
Lettie, hastily; for to Lettie Mr. John was an institution, and his
idleness was part of himself—a thing quite beyond discussion, and
unchangeable.
But a burning blush came over John Rodger’s face, in the
darkness, and Lettie saw instinctively that his feelings were
wounded. This brought upon her a strange embarrassment; and
while anxiously casting about for something to say, which should