multi-processor systems Flashcards
in which ways is it difficult to implement multiprocessor systems
when using different types of cpus they may have different layouts / limited io interfaces and may need special libraries
memory to process access costs may be different leading to slower access times
how does symmetric multiprocessing work
the processor are considered equal and can run their own schedulers
in symmetric multiprocessing in which tow ways can we implement the run queues
shared between different processors
a queue per processor
what is a negative of having a run queue per processor in symmetric multiprocessing
adds complexity: need load balancing across different processors
how do we load balance between different processors in symmetric multiprocessing
pull: a processor thats free can pull processes from another queue on the system
push: redistribute periodic tasks to different processors via a management processor
how does asymmetric multiprocessing work
one processor coordinates all the others in the system
what is a positive of asymmetric multiprocessing work
simpler system: there’s only one processor looking at the data structures for example
what are two negatives of asymmetric multiprocessing work
high cost of moving one process between processors
- may need to invalidate caches
- io and interrupt handling may be bound to
a specific cpu/ have to be directed
- need the state and context
some processors may not be suited to a specific task
how does processor affinity work to distribute processes
each process has a cpu affinity bit mask and a preferred and next cpu
when a cpu becomes free the scheduler looks for a ready process for it based on:
- if the process last ran on that cpu
- if it lists it as its preferred cpu
- if its high priority
cpu affinity bit mask
defines the cpus that the process can run on
how do interrupts and multiprocessor systems work
interrupts from io operations need to be directed to the correct cpu and if not then the cpu must forward the request or even move code or data
negative of interrupts and multiprocessor systems
extra overhead and latency
high cost in non uniform memory allocation (numa) systems as you have to go through different processes (not too bad for symmetric)