Professional Documents
Culture Documents
Full Download Understanding Operating Systems 7th Edition Mchoes Solutions Manual
Full Download Understanding Operating Systems 7th Edition Mchoes Solutions Manual
Full Download Understanding Operating Systems 7th Edition Mchoes Solutions Manual
https://testbankfan.com/download/understanding-operating-systems-7th-edition-mcho
es-solutions-manual/
Chapter 2 Exercises
1. Describe a present-day computing environment that might use each of the memory
allocation schemes (single user, fixed, dynamic, and relocatable dynamic) described in
the chapter. Defend your answer describing the advantages and disadvantages of the
scheme in each case. ANS: Answers in these cases will vary. Look for a fundamental
understanding of the comcepts presented about memory allocation. Students should
present original scenarios here because answers can range from real-time or embedded
computing described briefly in Chapter 1 to current environments.
2. How often should memory compaction/relocation be performed? Describe the advantages
and disadvantages of performing it even more often. ANS: Memory compaction should
be performed on a basis that the operator finds most efficient for the local stream of jobs.
Some industry analysts suggest 75 percent. Performing it more often might keep more
memory available but would necessarily result in increased overhead because processing
cannot take place during compaction. Likewise, performing it less often might keep
deallocated memory from being used in the most efficient manner possible.
3. Using your own words, explain the role of the bounds register. ANS: This hardware
element, the bounds register, tracks the limits of addressable memory for this job and
prevents it from trying to access memory that’s allocated to another job.
4. Describe in your own words, the role of the relocation register. ANS: This hardware
element, the relocation register, tracks the number of bytes that a job has been moved in
main memory as a result of memory compaction. It is used to track each instruction so it
can be found successfully after the job’s relocation.
5. Give an example of computing circumstances that would favor first-fit allocation over
best-fit. Explain your answer. ANS: If speed is of primary concern, first-fit would be
preferable. Look for original examples for each student – examples of system that would
need to be speedy.
6. Given the following information:
a. Use the first-fit algorithm to indicate which memory blocks are allocated to each of
the three arriving jobs. ANS: Job A is allocated to Block 1, Job B is allocated to
Block 2, Job C is waiting
b. Use the best-fit algorithm to indicate which memory blocks are allocated to each of
the three arriving jobs. ANS: Job A is allocated to Block 1, Job B is allocated to
Block 3, Job C is allocated to Block 2
7. Given the following information:
a. Use the best-fit algorithm to indicate which memory blocks are allocated to each of
the three arriving jobs. ANS: (Job A is allocated to Block 3, Job B is allocated to
waiting, Job C is allocated to Block 4, Job D is allocated to Block 1)
b. Use the first-fit algorithm to indicate which memory blocks are allocated to each of
the three arriving jobs. ANS: (Job A is allocated to Block 1, Job B is allocated to
waiting, Job C is allocated to Block 2, Job D is allocated to waiting. Notice that
neither algorithm can allow Job B to move into memory because no partition is large
enough for it.)
8. Next-fit is an allocation algorithm that starts by using the first-fit algorithm but keeps track of
the partition that was last allocated, instead of restarting the search with Block 1, it starts
searching from the most recently allocated block when a new job arrives. Using the
following information:
Indicate which memory blocks are allocated to each of the three arriving jobs, and
explain in your own words what advantages the next-fit algorithm could offer. ANS:
(Job A is allocated to Block 2, Job B is allocated to Block 3, Job C is allocated to
Block 4, Job D is waiting because it doesn’t fit into Block 1)
9. Worst-fit is an allocation algorithm that allocates the largest free block to a new job. It is
the opposite of the best-fit algorithm. Compare it to next-fit conditions given in Exercise
8 and explain in your own words what advantages the worst-fit algorithm could offer.
ANS: Job A is allocated to Block 2, Job B is allocated to Block 4, Job C is allocated to
Block 3, Job D is waiting because it doesn’t fit into Block 1, As an alternative, ask
students to try the best-fit with this data and all four jobs will fit into the four available
memory blocks.
With respect to the fair sex, they are generally lively and
fascinating, and possessed of susceptible feelings, capable of being
converted into strong attachments. These are some of the essential
requisites for forming an amiable, and virtuous character; but, alas!
the good is perverted by the influence of an injudicious and trifling
system of education, extended at most to superficial literary
acquisitions, which barely serve for the dictation of an ungrammatical
billetdoux, or the copying of a song. The most devoted attention is
given to the art of pleasing, and the study of dress, which, with the
auxiliaries of music and embroidery, form the leading occupations of
young French females.
When the grapes are of a bad, meagre kind, the wine-dealers mix
the juice with quicklime, in order to give it a spirit which nature has
denied, or, possibly, to take off acidity.
About this time, Dr. Skirving, an English physician, whom I had the
pleasure of knowing in Edinburgh, and an intimate acquaintance of
Madame M⸺, arrived with a view of establishing himself in
practice at Nice. He had originally become known at this place, in
consequence of having been detained in it by the illness of a friend,
who in an intended voyage from Civita Vecchia to Marseilles,
ruptured a blood-vessel on his lungs, by the exertions of sea-
sickness, and was compelled to make this port, where, after lingering
some months, he died. Pleased with the situation, and at the
solicitations of his friends, he determined to make Nice his
permanent residence, and having arranged his affairs in England,
was now arrived to carry the plan into execution.
The 15th of October now arrived, which, being St. Therese’s day,
was the fête of Madame M⸺, as well as the anniversary of my
birth. The former circumstance it may be necessary to explain. It is
customary in this country to name children after some favourite saint,
to whose especial protection they may thus be supposed to be
committed; and hence, when the annual fête of their patron arrives, it
is made a day of congratulation to themselves.
The dregs which remain after these operations, when dried, are
used as a fuel; particularly for warming, by means of brasieres,
apartments without chimneys.
The summer fruits, as grapes, figs, peaches, &c. were now over,
but we had great stores preserved for the winter’s use. There were,
however, neither oranges nor lemons this season, the unusually
severe frost of the preceding winter having killed all the trees:
throughout France, and about Genoa, most of the olive-trees also
perished; but at Nice they were more fortunate.
The land around the city is divided into small parcels or farms,
seldom consisting of more than twelve or fourteen acres each, and
which are principally covered with vines, olives, and fruit-trees, the
intermediate spaces being filled up with abundance of vegetables,
and small quantities of grain, the chief supply of this important article
being derived from different parts of the Mediterranean.
The proprietor retains the actual possession of the farm, but the
fermier cultivates it, collects its produce, and carries it to market; he
is bound also to plant, every year, a stipulated number of vines, from
three to six hundred, according to the size of the farm; and at his
sole expense to repair the walls and fences. The proprietor provides
him a house, pays the contribution foncier, and incurs half the
expense of manure, and of the animals necessary for carrying on the
various operations of the concern. The proprietor and fermier then
share the produce in equal proportions, except as relates to the
olives, of which the former takes three-fifths.
We now took leave of St. Rosalie; nor could I, without the highest
regret, tear myself away from its rural charms, not least amongst
which was the vine covered alley, “impervious to the noontide ray,”
which had so often offered us delightful shade, and refreshment,
during the most intense atmospheric heats; and where so many
happy moments had glided away in interesting conversation, and the
rational amusement of reading, frequently enlivened by the vocal
powers of Madame M⸺ and her youngest daughter.
Nice is far from being a large city, as I was able to make the tour of
its ramparts in twenty minutes; nor is it an interesting one; the streets
are narrow, and mostly on a level, with the exception of one or two
which lead to a part of the town situated in a hollow, and which have
a step every two or three yards to break the declivity.
Nice produces very fair wines, both red and white; but the most
valuable kind is that named Billit.
The accommodations for bathing are indifferent; the beach is
rough and stony, and there are no machines. On summer evenings,
after it is dark, the females take possession of the beach, on one
side of the entrance of the harbour, and there bathe, while the men
go to a distant point.
There are, however, two sets of warm baths in the town, the one
constructed of marble, the other with copper; the former, situated
near the Place St. Dominico, are long, narrow, and shallow; when in
them, you only want a cover to make a good coffin—the latter, on the
contrary, situated on the ramparts between the bridge and the Place
Victoire, are so short and deep, that although you cannot lie down in
them, you may sit, and have the water up to your chin; in fact they
form excellent boilers, which would serve to stew you down, if
required.
Among the many beautiful walks about Nice, the Terrace ranks
foremost; it is crowded on a summer’s evening, but during the winter
is delightful throughout the whole day, particularly on a Sunday
afternoon, when a military band occasionally attends for an hour or
two. The walks to the Port, and around the ramparts, are also very
agreeable.
Only three good carriage roads will be found at Nice, one leading
to the Var, another to Turin, and the third to Genoa; there is also one
to Villa Franca, but so steep, that many do not like to venture up it;
the preferable way of visiting this latter place, is to row there in a
boat or felucca, and return on foot.
Villa Franca is a small, but strongly fortified town, distant about two
miles from Nice, built at the extremity of a fine harbour, in a situation
admirably adapted for the site of a more important place. It consists
of very indifferent buildings, and its streets are narrow, and
wretchedly paved.
Nice and its environs do not offer a very extensive field to the
naturalist. The surrounding mountains are, however, covered with a
great variety of plants during the whole year; and, of course, the
botanist will find ample amusement. The mineralogy of the
neighbourhood is but limited, the whole of the hills around the city
consisting chiefly of limestone, with some few beds of gypsum. In the
beds of the mountain torrents, portions are occasionally found of
granite, gneiss, clay-slate, flinty-slate, serpentine and feltspar; but
these specimens so small and so much weathered, that it is often
difficult to distinguish them.
A very pretty, but small theatre, has been erected at Nice, which
was not opened for dramatic representations during my residence
there. It was, however, made use of for two grand balls, given by a
select party of the nobles and gentlemen of Nice, to the stranger
residents; we were also entertained with a public concert in it; we
had, besides this, several private amateur concerts, in a large room
appropriated for such occasions, and supported by subscription,
each subscriber being allowed to introduce a certain number of
persons.
On the 3rd of January, the waters of the Paglion came down with
so much force, as to carry away the embankment, raised for the
protection of the workmen employed at the foundation of a new
bridge, just commenced over the river, and which was expected to
require two years to complete.
The coldest day experienced during the season, was on the 20th
of February, but even then, the lowest point at which Reaumur’s
thermometer was noticed, was 1° above freezing point, or equal to
34¼° of Fahrenheit.
After leaving the harbour, the wind was light and variable, and the
water smooth, so that by dint of rowing and sailing, we proceeded at
the rate of three miles an hour. On arriving off the town, and
principality of Monaco, we stood towards the shore, and took on
board three sailors, belonging to a Sardinian frigate, lying at Genoa,
who had been visiting their friends at Monaco, and agreed to work
their passage back to the former place.
After breakfast, the whole of our party, except the Italian lady and
myself, set off on mules for Genoa, we having determined to remain
in hopes of the wind shortly becoming favourable, in which case, we
doubted not, by pursuing our original plan, still to reach Genoa
before them, and avoid a difficult and expensive journey by land.
The wind, which throughout the night had continued fresh, in the
morning became more moderate and favourable; soon after day-light
we weighed anchor, stood out of the harbour, and beat up along
shore during the day, making what sailors call a long leg and a short
one, or perhaps what will be more intelligible, a long tack and a short
one, the wind being three points on the right side of our noses; about
evening it freshened, and was fed by small rain. A Swedish brig
passed us at two p.m. which was running out of the gulf of Genoa,
with a fine fair wind. About eight in the evening, the wind had
increased in such a degree, that the captain thought it necessary to
seek shelter for the night, but it was become so dark, that in running
for a place he had been accustomed to, the vessel took ground,
under the lee of some small uninhabited island. The whole crew,
including himself, now made such a hue-and-cry, that one would
have thought, nothing less than immediate destruction was to be the
result of this mistake; however, we made shift to secure the vessel to
the rocks, with an anchor, and it was fortunate that we succeeded in
effecting this, for the wind soon increased to a tremendous gale, with
heavy rain, which continued through the present night, and the
following day and night also.
It was true that this was Friday, but my fair companion was not in a
situation to think of maigre day, even had it been Vendrédi saint
itself. I believe the influence of the French Revolution, has
contributed materially to lessen the superstitions of the Catholic
countries, which have been exposed to its action. I have heard a
French officer remark, that for his part he had met with a sufficient
number of maigre days during the war, and could now afford no
more, but must live gras to make up for what he had lost. The priests
still contrive to make many women, children, and servants, observe
their ordinances, but the men have ventured, pretty generally, to
throw off their restraint.
We rose with day-break, and finding the wind still adverse, after
settling with the captain, went on shore, and taking places in the
voiture to Genoa, determined no longer to be the sport of the winds.
There were but two vacancies in the coach, and finding our anxiety
to proceed with it, the conducteur would fain have taken advantage
of it, but the lady managed the affair well, for offering what she knew
to be the usual sum, viz. five francs for each of us; on their refusal to
accept it, under the plea that there was no other coach that day, we
walked off, and pretended to be indifferent about it: this manœuvre
brought them to, and before we had proceeded the length of a street,
the conducteur came running after us, to say that he was willing to
take us; after this, however, we had some trouble to get our luggage
to the carriage, and were obliged to walk part of the way out of town,
in doing which we were followed by the most importunate host of
beggars I had ever witnessed in my life; my companion was so
confused that she could with difficulty count out her money to pay
the porters, &c. At length our supplicants dropped off, one by one,
until we literally out-walked them all.
The succeeding day was the last of the Carnival, and a great
number of people were parading the streets masked, and in all the
fantastic garb of the season; the business, however, appeared to be
kept up with more spirit than at Toulouse on the preceding winter. In
the course of the evening a person with whom I was walking
addressed a female mask, who said she was cook in a gentleman’s
family, and that she must hasten home to wash the dishes; on
parting, we induced her to shake hands with us; and if I am a judge
of the affair, I pronounce that her hand had never been in dish-water,
for a prettier formed, or more delicate one, I never touched in my life.
In the evening, the festival concluded with masked-balls at the
theatres, and other amusements.