Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Centralized Systems
■ Run on a single computer system and do not interact with other
computer systems.
■ Generalpurpose computer system: one to a few CPUs and a number
of device controllers that are connected through a common bus that
provides access to shared memory.
■ Singleuser system (e.g., personal computer or workstation): desktop
unit, single user, usually has only one CPU and one or two hard disks;
the OS may support only one user.
■ Multiuser system: more disks, more memory, multiple CPUs, and a
multiuser OS. Serve a large number of users who are connected to
the system via terminals.
A Centralized Computer System
Centralized Systems
■ Coarse – granularity parallelism
● Computer with only few processors, all sharing the main memory.
● Database running on such machines do not partition a single query
among the processors.
● Run each query on a single processor.
■ Fine – granularity parallelism
● Computer with large number of processors.
● Database running on such machines attempt to parallelize single tasks.
● Partition a single query among the processors.
ClientServer Systems
■ Server systems satisfy requests generated at m client systems, whose general
structure is shown below:
ClientServer Systems (Cont.)
■ Database functionality can be divided into:
● Backend: manages access structures, query evaluation and
optimization, concurrency control and recovery.
● Frontend: consists of tools such as forms, reportwriters, and
graphical user interface facilities.
■ The interface between the frontend and the backend is through SQL or
through an application program interface.
Server System Architecture
■ Server systems can be broadly categorized into two kinds:
● Transaction servers, which are widely used in relational
database systems.
● Data servers, used in objectoriented database systems.
Transaction Servers
■ Also called query server systems or SQL server systems
● Clients send requests to the server
● Transactions are executed at the server
● Results are shipped back to the client.
■ Open Database Connectivity (ODBC) is a C language application
program interface standard from Microsoft for connecting to a server,
sending SQL requests, and receiving results.
■ JDBC standard is similar to ODBC, for Java
Transaction Server Process Structure
Send user queries
(transactions) to server.
Monitors other processes,
and takes recovery actions
if any of the other
Receive user queries processes fail.
(transactions), execute
them and send results
back.
Lock manager functionality
like lock grant, lock
release, and deadlock
Output log records from detection.
the log record buffer to
stable storage.
Output modified buffer
Blocks back to disk on a
Performs periodic continuous basis.
Checkpoints.
Data Servers
■ Used in highspeed LANs, in cases where
● High speed connection between the clients and the server.
● Client machines are comparable in processing power to the server
machine.
■ Data are shipped to clients where processing is performed, and then
shipped data back to the server.
■ This architecture requires full backend functionality at the clients.
■ Used in many objectoriented database systems
■ Issues:
● PageShipping versus ItemShipping
● Locking
● Data Caching
● Lock Caching
Data Servers (Cont.)
■ Pageshipping versus itemshipping
● Unit of communication for data may be coarse granularity (page)
or fine granularity (tuple or item)
● Item shipping ⇒ overhead of message passing is high.
● Page shipping ⇒ prefetching
Fetching items even before they are requested is called
prefetching.
All the items in the page are shipped when a process desires
to access a single item in the page.
Data Servers (Cont.)
■ Locking
● Locks granted by the server for the data items that it ships to the
client machines.
● Disadvantage of page shipping :
Lock on a page implicitly locks all items contained in the page
even client is not accessing some items in the page.
● Other client machines that require locks on those items may be
blocked unnecessarily.
● Techniques for lock deescalated have been proposed where the
server can request its clients to transfer back locks on prefetched
items.
Data Servers (Cont.)
■ Data Caching
● Data can be cached at client even in between transactions
● Even if a transaction finds cached data, it must make sure that those
data are up to date (cache coherency)
■ Lock Caching
● Locks can be retained by client system even in between transactions
● Server calls back locks from clients when it receives conflicting lock
request. Client returns lock once no local transaction is using it.
Parallel Systems
■ Parallel systems improve processing and I/O speeds by using multiple
CPUs and disks in parallel.
■ Useful for applications that have to query extremely large databases or
that have to process an extremely large number of transactions per
second.
■ A coarsegrain parallel machine consists of a small number of
powerful processors
■ A massively parallel or fine grain parallel machine utilizes
thousands of smaller processors.
■ Two main measures of performance of database system:
● throughput the number of tasks that can be completed in a
given time interval
● response time the amount of time it takes to complete a single
task from the time it is submitted
Speedup
■ Running a given task in less time by increasing the degree of
parallelism is called speedup.
■ Suppose,
● execution time of task on the larger machine is TL
● execution time of same task on the smaller machine is TS
■ A fixedsized problem executing on a small system is given to a
system which is Ntimes larger.
● Measured by:
speedup = small system elapsed time = TS
large system elapsed time TL
● Speedup is linear if equation equals N.
● Speedup is sublinear if equation less than N.
Speedup