summaryrefslogtreecommitdiff
path: root/doc/1.md
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2021-01-11 20:44:49 -0700
committermo khan <mo.khan@gmail.com>2021-01-11 20:44:49 -0700
commite823dca5c9d22c5b1f867082eaafcc648f5eec39 (patch)
tree46bc1e11243978c7ad6eda861ce065997b9a77ac /doc/1.md
parent6247b0aaff252f1db87cfd1d740916455d9e3b1b (diff)
docs: more notes
Diffstat (limited to 'doc/1.md')
-rw-r--r--doc/1.md71
1 files changed, 71 insertions, 0 deletions
diff --git a/doc/1.md b/doc/1.md
index 2ae2516..b912a6b 100644
--- a/doc/1.md
+++ b/doc/1.md
@@ -77,3 +77,74 @@ Secondary storage must be able to hold large quantities of data permanently.
The magnetic disk is a common secondary storage device.
Most programs are stored on disk until they are loaded into memory.
+
+## Computer System Architecture
+
+Single-Processor Systems: one main CPU
+Multiprocessor System: have two or more processors in close communication sharing the computer bus, clock, memory and peripheral devices.
+
+Multiprocessor systems have three main advantages:
+
+1. Increased throughput: more work done in less time.
+2. Economy of scale: can cost less because they share peripherals, storage, and power.
+3. Increased reliability: failure of one processor will not halt the system. only slow it down
+
+Symetric Multi Processor (SMP): Solaris is a commercial version of UNIX designed by Sun Microsystems. Many processors can run simultaneously.
+Uniform Memory Access (UMA): access to any RAM from any CPU takes the same amount of time.
+Non-uniform Memory Access (NUMA): some parts of memory may take longer to access than other parts.
+
+Another trend is to include multiple cores on a single chip. These are like multiprocessor chips.
+On chip communication is faster than a single core per chip.
+One chip with multiple cores also uses less power than multiple single-core chips.
+
+
+Dual core design:
+
+```plaintext
+ ------------------------------------
+ | --------------- --------------- |
+ | | CPU core0 | | CPU core1 | |
+ | | ----------- | | ----------- | |
+ | | |registers| | | |registers| | |
+ | | ----------- | | ----------- | |
+ | | | | | | | |
+ | | ----------- | | ----------- | |
+ | | | cache | | | | cache | | |
+ | | -----|----- | | -----|----- | |
+ | -------|------- -------|------- |
+ ---------|----------------|---------
+ ------------------
+ |
+ ----------
+ | memory |
+ ----------
+```
+
+Job pool
+
+```plaintext
+ 0 |------------------|
+ | operating system |
+ |------------------|
+ | job 1 |
+ |------------------|
+ | job 2 |
+ |------------------|
+ | job 3 |
+ |------------------|
+ | job 4 |
+512M |------------------|
+```
+
+Operating schedules a job to put into memory to execute.
+When the job needs to wait for an I/O operation to complete
+the operating system switches to another job and so on.
+As long as at least one job needs to execute then the CPU is never idle.
+
+In time-sharing systems, the CPU executes multiple jobs
+by switching among them, but the switches occur so frequently that
+the users can interact with each program while it is running.
+
+A program laoded into memory and executing is called a process.
+When a process executes, it typically executes for only a short time
+before it either finishes or needs to perform I/O.