Module 07 - Multiprocessing
Module 07 - Multiprocessing
Module 07 - Multiprocessing
COMPUTER ARCHITECTURE
MODULE SEVEN
Process
•A process or a running
process is a collection of
instructions carried out by
the computer processor.
Process
• A process’s execution must proceed in a
sequential manner. For example, a
computer program is written in a text
file, but once executed, it turns into a
process and performs all the tasks
mentioned in the program sequentially
Differences between Process and thread
• A process is a section of a running program, while
a thread is a portion of a process
• Threads are lightweight compare to processes
• Multiprocessing is expensive. It is
cheaper to relatively maintain one
processor than more than one
processor
Multiprocessing challenges
•
Locality of reference
(1)Temporal locality: this refers to the fact
that recently accessed items from
memory are likely to be accessed again
in the near future; loops in a program are
good illustration for temporal locality.
Locality of reference
(2) Spatial locality: items that are
near to each other in memory tend
to be referenced near one another in
time; data structures and arrays are
good illustrations for spatial locality.
Locality of reference
•It is the locality of
reference that allows us to
build memory hierarchies.
N
I O
ST
E
U
Q ?
S
Image Source: http://iamforkids.org/wp-content/uploads/2013/11/j04278101.jpg - Retrieved Online on January 11, 2016
L E
DU
M O
O F
ND
E