100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.6 TrustPilot
logo-home
Exam (elaborations)

COS3721 ASSIGNMENT 1 SOLUTIONS 2021

Rating
-
Sold
2
Pages
17
Grade
A+
Uploaded on
07-05-2021
Written in
2021/2022

COS3721 ASSIGNMENT 1 SOLUTIONS 2021

Institution
Course

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.

Written for

Institution
Course

Document information

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

Subjects

Get to know the seller

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 University of South Africa (Unisa)
Follow You need to be logged in order to follow users or courses
Sold
1905
Member since
7 year
Number of followers
1219
Documents
858
Last sold
5 months ago

3.7

359 reviews

5
145
4
83
3
56
2
28
1
47

Trending documents

Recently viewed by you

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

Frequently asked questions