100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
COS3721 ASSIGNMENT 1 SOLUTIONS 2021 R303,00   Add to cart

Exam (elaborations)

COS3721 ASSIGNMENT 1 SOLUTIONS 2021

 78 views  2 purchases

COS3721 ASSIGNMENT 1 SOLUTIONS 2021

Preview 1 out of 17  pages

  • May 7, 2021
  • 17
  • 2021/2022
  • Exam (elaborations)
  • Questions & answers
All documents for this subject (31)
avatar-seller
hiltontutorials
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.

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through EFT, credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying this summary from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller hiltontutorials. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy this summary for R303,00. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

62890 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy summaries for 14 years now

Start selling
R303,00  2x  sold
  • (0)
  Buy now