Computer Architecture and Organization

Download as pdf or txt
Download as pdf or txt
You are on page 1of 50

COMPUTER ARCHITECTURE

AND ORGANIZATION
CPE0037
Module 8

Multi-Core and
Distributed System
 A multi-core microprocessor is one that combines two or
more independent processors into a single package, often
a single integrated circuit (IC).
 A dual-core device contains two independent
microprocessors.
 In general, multi-core microprocessors allow a computing
device to exhibit some form of thread-level parallelism
(TLP) without including multiple microprocessors in
separate physical packages.
 Replicate multiple processor cores on a single die.
 The cores fit on a single processor socket
 Also called CMP (Chip Multi-Processor)

c c c c
o o o o
r r r r
e e e e

1 2 3 4
thread 1 thread 2 thread 3 thread 4

c c c c
o o o o
r r r r
e e e e

1 2 3 4
several several several several
threads threads threads threads

c c c c
o o o o
r r r r
e e e e

1 2 3 4
 OS perceives each core as a separate processor.

 OS scheduler maps threads/processes


to different cores.

 Most major OS support multi-core today.


 Difficult to make single-core clock frequencies even higher.

 Many new applications are multithreaded.

 General trend in computer architecture (shift towards


more parallelism).
 Parallelism at the machine-instruction level
 The processor can re-order, pipeline instructions, split
them into microinstructions, do aggressive branch
prediction, etc.
 Instruction-level parallelism enabled rapid increases in
processor speeds over the last 15 years
 This is parallelism on a more coarser scale.
 Server can serve each client in a separate thread (Web
server, database server).
 A computer game can do AI, graphics, and physics in
three separate threads.
 Single-core superscalar processors cannot fully exploit
TLP.
 Multi-core architectures are the next step in processor
evolution: explicitly exploiting TLP.
Multiprocessor is any computer with several processors

SIMD
• Single instruction, multiple data.
• Modern graphics cards.
MIMD
• Multiple instructions, multiple data.
Shared Memory:
In this model, there is one (large) common shared memory
for all processors.

Distributed memory:
In this model, each processor has its own (small) local
memory, and its content is not replicated anywhere else.
 Multi-core processor is a special kind of a multiprocessor.
All processors are on the same chip.

 Multi-core processors are MIMD.


 Different cores execute different threads (Multiple Instructions),
operating on different parts of memory (Multiple Data).

 Multi-core is a shared memory multiprocessor.


 All cores share the same memory
 Database servers
 Web servers (Web commerce)
 Telecommunication markets: 6WINDGate (datapath
and control plane)
 Multimedia applications
 Scientific applications, CAD/CAM
 Editing a photo while recording a TV show through a
digital video recorder
 Downloading software while running an anti-virus
program
 Permits multiple independent threads to execute
SIMULTANEOUSLY on the SAME core.

 Weaving together multiple “threads” on the same core.

Example: If one thread is waiting for a floating point


operation to complete, another thread can use the integer
units.
 SMT processor: both threads can run concurrently.
 Can’t simultaneously use the same functional unit.
SMT not a “true” parallel processor.

 Enables better threading (e.g. up to 30%).


 OS and applications perceive each simultaneous thread
as a separate “virtual processor”.
 The chip has only a single copy of each resource.
 Compare to multi-core: each core has its own copy of
resources.
 Threads can run on separate cores.
 Threads can run on separate cores.
 Cores can be SMT-enabled (or not)

 The different combinations:


• Single-core, non-SMT: standard uniprocessor
• Single-core, with SMT
• Multi-core, non-SMT
• Multi-core, with SMT:

 The number of SMT threads:


 2, 4, or sometimes 8 simultaneous threads.
 Intel calls them “hyper-threads”.
 SMT Dual-core: all four threads can run concurrently.
 In distributed architecture, components are presented on
different platforms and several components can cooperate
with one another over a communication network in order to
achieve a specific objective or goal.
 Information processing is not confined to a single machine
rather it is distributed over several independent computers.
 A distributed system can be demonstrated by the client-
server architecture which forms the base for multi-tier
architectures; alternatives are the broker architecture such
as Common Object Request Broker Architecture
(CORBA), and the Service-Oriented Architecture (SOA).
 There are several technology frameworks to support
distributed architectures, including .NET, J2EE, CORBA,
.NET Web services, AXIS Java Web services, and Globus
Grid services.
 Middleware is an infrastructure that appropriately supports
the development and execution of distributed applications.
It provides a buffer between the applications and the
network.
 The basis of a distributed architecture is its transparency,
reliability, and availability.
 The basis of a distributed architecture is its transparency,
reliability, and availability.

Access - Hides the way in which resources are accessed


and the differences in data platform.
Location - Hides where resources are located.
Technology - Hides different technologies such as
programming language and OS from user.
Migration / Relocation - Hide resources that may be moved
to another location which are in use.
Replication - Hide resources that may be copied at several
location.
Concurrency - Hide resources that may be shared with other
users.
Failure - Hides failure and recovery of resources from user.
Persistence - Hides whether a resource ( software ) is in
memory or disk
Advantages:
Resource sharing − Sharing of hardware and software
resources.
Openness − Flexibility of using hardware and software of
different vendors.
Concurrency − Concurrent processing to enhance
performance.
Scalability − Increased throughput by adding new resources.
Fault tolerance − The ability to continue in operation after a
fault has occurred.
Disadvantages

Complexity − They are more complex than centralized


systems.
Security − More susceptible to external attack.
Manageability − More effort required for system
management.
Unpredictability − Unpredictable responses depending on
the system organization and network load.
a) Pages of address space
distributed among four
machines

b) Situation after CPU 1


references page 10

c) Situation if page 10 is
read only and replication
is used
False sharing of a page between 2 independent processes.
 Basic idea is simple:
organize components in
layers.
 Component at layer N can
call those at underlying
layer N − 1 (but not vice
versa).
 This so-called application
layering is shown in the
diagram.
 A key observation is that
control generally flows
from layer to layer.
 e.g. requests go down the
hierarchy whereas the
results flow upward.
 This model has been
widely adopted by the
networking community.
 A far looser organization is
followed in object-based
architectures.
 Each object corresponds
to what we have defined
as a component.
 These components are
connected through a
(remote) procedure call
mechanism.
 This software architecture
matches the client-server
system architecture.

 Layered & object-based


architectures still form the
most important styles for
large systems.
 Processes communicate
thro event propagation,
optionally with data.
 For DS, event propagation
usually associated with so-
called publish/subscribe.
 Idea: processes publish
events and ensures only
subscribed processes
receive them.
 The main advantage of
such systems is loose
coupling of processes
 Need not refer to each
other explicitly.
 Also known as decoupled
in space, or referentially
decoupled.
 Event-based architectures
can be combined with data
centered architectures.

 Gives what is also known


as shared data spaces.

 Essence: processes now


also decoupled in time
 Thus need not both be active
when communication takes
place.
 Also, many shared data
spaces use a SQL-like
interface to shared repository.
 Means data can be accessed
using a description rather
than an explicit ref, as per
files.
The client-server architecture is the most common distributed
system architecture which decomposes the system into two
major subsystems or logical processes.

Client − This is the first process that issues a request to the


second process i.e. the server.
Server − This is the second process that receives the request,
carries it out, and sends a reply to the client.
In this architecture, the
application is modelled as a set
of services that are provided by
servers and a set of clients that
use these services. The servers
need not know about clients, but
the clients must know the identity
of servers, and the mapping of
processors to processes is not
necessarily 1 : 1
Thin-Client Model
 In thin-client model, all the application processing and data
management is carried by the server. The client is simply
responsible for running the presentation software.
 Used when legacy systems are migrated to client server
architectures in which legacy system acts as a server in its
own right with a graphical interface implemented on a client
 A major disadvantage is that it places a heavy processing
load on both the server and the network.
Thick/Fat-Client Model
 In thick-client model, the server is only in charge for data
management. The software on the client implements the
application logic and the interactions with the system user.
 Most appropriate for new C/S systems where the capabilities
of the client system are known in advance
 More complex than a thin client model especially for
management. New versions of the application have to be
installed on all clients.
.
 Multi-tier architecture is a client–server architecture in
which the functions such as presentation, application
processing, and data management are physically
separated.
 It provides a model by which developers can create
flexible and reusable applications.
 The most general use of multi-tier architecture is the three-
tier architecture.
 A three-tier architecture is typically composed of a
presentation tier, an application tier, and a data storage tier
and may execute on a separate processor.
Presentation Tier
 Presentation layer is the topmost level of the application
by which users can access directly such as webpage or
Operating System GUI (Graphical User interface).
 The primary function of this layer is to translate the tasks
and results to something that user can understand.
 It communicates with other tiers so that it places the
results to the browser/client tier and all other tiers in the
network.
Application Tier (Business Logic, Logic Tier, or Middle
Tier)
 Application tier coordinates the application, processes the
commands, makes logical decisions, evaluation, and
performs calculations.
 It controls an application’s functionality by performing
detailed processing.
 It also moves and processes data between the two
surrounding layers.
Data Tier
 In this layer, information is stored and retrieved from the
database or file system.
 The information is then passed back for processing and
then back to the user.
 It includes the data persistence mechanisms (database
servers, file shares, etc.) and provides API (Application
Programming Interface) to the application tier which
provides methods of managing the stored data.

You might also like