Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 1 out of 17 pages
Exam (elaborations)

COS3721 ASSIGNMENT 1 SOLUTIONS 2021

Document preview thumbnail
Preview 1 out of 17 pages

COS3721 ASSIGNMENT 1 SOLUTIONS 2021

Content preview

COS3721 ASSIGNMENT 1 SOLUTIONS 2021

QUESTION 1

1.1What is the purpose of interrupts? How does an interrupt differ from a trap? Can traps
be generated intentionally by a user program? If so, for what purpose?

Answer:

An interrupt is a hardware‐generated change‐of
flow within the system. An interrupt handler is summoned to deal with the cause of the interrupt
control is then returned to the interrupted context and instruction. A trap is a software‐
generated interrupt. An interrupt can be used to signal the completion of an I/O to obviate the nee
d for device polling. A trap can best
use to call operating system routines or to catch arithmetic errors.

1.2 Discuss, with examples, how the problem of maintaining coherence of cached data
manifests itself in the following processing environments:

Let us look at the following example:
Suppose an integer A which is to be incremented by 1 is located in file B, and file B resides in m
agnetic disk. The increment operation proceeds by first issuing an I/O operation to copy the dis
k block on which A resides to main memory. This operation is followed by copying A to the ca
che and to an internal register. Thus, the copy of A
appears in several places; on the magnetic disk, in main memory, in the cache and in an internal
register (Fig below).




Once the increment takes place in the internal register, the value of A differs in the various stora
ge systems. The
value of A becomes the same only after the new value of A is written from the internal register b
ack to the magnetic disk.

Document information

Uploaded on
May 7, 2021
Number of pages
17
Written in
2021/2022
Type
Exam (elaborations)
Contains
Questions & answers
$19.38

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
hiltontutorials
3.7
(359)
Sold
1905
Followers
1219
Items
858
Last sold
11 months ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions