summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2021-02-08 10:54:39 -0700
committermo khan <mo@mokhan.ca>2021-02-08 10:54:39 -0700
commit6c613e1baea8a7c06231980c565b6c8bbf53211a (patch)
treea728c6459d24450b6af79cd92baec59df7ba279b
parent116d9d96dd6cffb4b4cae53e23e8a3d29ece604b (diff)
describe caching and cache coherency
-rw-r--r--doc/assignment1.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/assignment1.md b/doc/assignment1.md
index 75324df..1fc8d5f 100644
--- a/doc/assignment1.md
+++ b/doc/assignment1.md
@@ -142,6 +142,23 @@ Instructions: Please answer the following questions in complete sentences. Your
kernel mode.
1. Define cache, and explain cache coherency.
+
+ The cache acts as a faster storage system that can store items on a temporary basis.
+ When a piece of data is needed, the cache can be used to fetch the data once
+ and stored in the cache. Subsequent attempts to access the same data can be
+ fetched from the cache at a faster rate of access. Cache is meant to be temporary
+ for fetching frequently used data quickly. However, the cache can become stale
+ and out of sync with the backing storage from where the cache initially retrieved
+ the data. Cache expiration is one of the hard problems in computer science.
+
+ In a multitasking environment if several processes wish to access a piece of data
+ then each process must access the current value of that piece of data. If that
+ piece of data is stored in different caches it is possible for the same piece
+ of data to have a different value if there isn't a mechanism to synchronize each
+ of the caches with any mutations made to the piece of data. Cache coherency
+ ensures that the data stored in different layers of cache are synchronized and
+ this is typically handled in the hardware layer.
+
1. Describe why direct memory access (DMA) is considered an efficient mechanism for performing I/O.
1. Describe why multicore processing is more efficient than placing each processor on its own chip.
1. Describe the relationship between an API, the system-call interface, and the operating system.