Welcome to dylanserver.xyz

Computer Operating Systems and Intermediate Networking

Mutual Exclusion

Race Condition:
Two threads competing to modify shared data, causing bad results, corrupted data structures, or a crash
Critical Section (or region):
A code segment that acesses/updates shared data.
Mutual exclusion:
Methods to stop more than one thread entering a critical section at one time.

Concurrency

Sequential, one computation one after the other.

Multiple Computations can be happening at the "same" time

Paralell systems truly do execture 2 or more things at once (depending on the cpu count)

Process can contain multiple threadds

Threads are sequences of instructions (code) Threads are assigned to each core, but can only run for a limited time before it is paused to see if any other process require cpu time. This process is called Round Robin Scheduling (Time sharing)

CPU Instructions

Cpus have many registers which act as very very fast, volitile memory, typicaly for individual words of data (32 or 64 bits in length)

Every CPU has a "program status word" register which sets the mode of the computer between two values

Special instructions are required for certian operations, such as acessing a data store outside of memmory. These special instrictions are blocked in one mode, and allowed in the other mode.

User Mode: Applications/Programs are run in this mode.

Kernel Mode: The OS and services that the OS provides run in this mode. If an application requires disk acess for example, it must get the operating system to perfrom its request for it.

When the I/O Controler has the data avalible, then it must get attention of the CPU, by sending an interupt. The CPU then stops its current process to handle the new information.

Interupts also handle process scheduling, and other tasks.