10. DS contrasted with Centralised ones Flashcards
How we arrived at DS from sequential, centralised ones
Machine =
Computing (processor) + Storage Resources (memory)
Resource usage is controlled by?
OS
This aims to make the most efficient use possible of the resources
OS assigns each process …? then controls how a process is granted access to…?
A unique identity. Address Space
OS controls a processes access to computing and storage resources.
What is the role of the OS in a sequential, isolated process?
ensure no other process tampers with its data and only that process has access
How is sequential, isolated processing bounded and limiting?
If a function is more computationally demanding that an single machine can cope with
If we wish to run functions concurrently (different processes) or in parallel (different processors)
If the functions are proprietary services helped in remote machines we cant hold local copies of
Whats the main advantage of non-sequential, non-isolated processing?
Can switch between processes for example if one is idle and waiting for something.
What is multiprocessing?
OS multitasks- allowing more than one process to be underway by controlling how it makes use of its resources.
It does this by implementing a scheduling policy which grants each active process a time source to its resources.
A group of processes is active concurrently.
What is multiprocessing by forking?
A process asks the OS to make a copy of itself. This copy gets an independent copy of the parent address space. Parent can continue or wait for child to execute.
Where is multiprocessing by forking common?
Client-server type Distributed Computing
Pros and cons of multiprocessing by forking?
Can be expensive because of forking.
Modern OSs have strategies that make it affordable.
Safe as address spaces are distinct
Best practice is required to avoid zombie processes and unintended sharing of references to files
What is multiprocessing by threading?
A process asks the OS to make a copy of itself. It assigns the same address space as the parent to the child. Parent and child may been to interact and share variables. Makes threading less expensive and less safe.
What allows concurrent computation?
Multithreading
What enables parallel computation?
Multiple processors
What is a centralised system?
The OS ensures each process has a single address space, exclusive to it.
What is a (seemingly) concurrent system?
The OS schedules the execution of n copies of a process to run in the same processor in an interleaved fashion (time slicing), typically sharing an address space