Multi-user Operating System

202309061106
Status: #idea
Tags: OS

Multi-user Operating System

Computer Architectures

Single cycle design

Multi-cycle design

Pipelined design

Info

Modern day Intel processors use a superscalar architecture Multiple pipelines running in parallel
Internally, CISC gets split into RISC-like instructions and those are pipelined

Warning

Pipelining is not possible in Von Neumann (Princeton) model, due to simultaneous need for instruction cache and data cache

Info

Modified Harvard model allows us to modify instructions on the fly.
Figure below shows the path taken

graph TB

subgraph L1

direction LR

0[L1 Data]

1[L1 Instruction]

end

L2

  

L2 -->|1| 0 -->|2| L2 -->|3| 1

Locality of Reference

A program works w.r.t. locality of reference

  1. Temporal locality: If I access a at t=t, then it is likely to be accessed at t=t+1
  2. Spatial locality: If I access a[0], it is likely that I access a[1] also

Example

for (i: 0 -> 1024) {
	for (j: 0 -> 1024) {
			A[i][j] = 0; // Locality of reference is maintained
			A[j][i] = 0; // Inefficient. Locality lost
		}
}
Warning

goto kills locality of reference

Info

Intel Core i3 - Hyperthreading (2 hardware threads can run in parallel on a single processor)
Intel Core i5 - Turbo boost
Intel Core i7 - Hyperthreading + Turbo boost
Intel Core i9 - Hyperthreading + 2 Turbo boost frequencies

Info

Intel usually processes 20 instructions in parallel, with 4 simultaneous pipelines and 2 simultaneous hardware threads.

20 instructions/pipeline×4 pipelines×2 threads=160 IPC
Info

Intel has
In-order entry Out-of-order execution In-order commit

Info

Loop unrolling vectorises the operation

Info

Power(Voltage)2×Frequency×Load capacitance

Warning

ARM processors often have dynamic voltage-frequency scaling, i.e. the CPU moves on its own voltage-frequency curve


References