The answers to many of these questions can be found in the article above, with the online link.



Samankaltaiset tiedostot
Hajautetut tietokannat Talvi 2016 Vastaukset Laskuharj. 5. CS-E4630 Distributed Databases Winter 2016 Answers Tutorial 5 1/9

Capacity Utilization

FinFamily PostgreSQL installation ( ) FinFamily PostgreSQL

On instrument costs in decentralized macroeconomic decision making (Helsingin Kauppakorkeakoulun julkaisuja ; D-31)

Network to Get Work. Tehtäviä opiskelijoille Assignments for students.

[c] What is the difference between a modified page and a dirty page? Mitä eroa on päivitetyllä sivulla ja likaisella sivulla?

The CCR Model and Production Correspondence

C++11 seminaari, kevät Johannes Koskinen

Other approaches to restrict multipliers

On instrument costs in decentralized macroeconomic decision making (Helsingin Kauppakorkeakoulun julkaisuja ; D-31)

Security server v6 installation requirements

Uusi Ajatus Löytyy Luonnosta 4 (käsikirja) (Finnish Edition)

Efficiency change over time

1.3Lohkorakenne muodostetaan käyttämällä a) puolipistettä b) aaltosulkeita c) BEGIN ja END lausekkeita d) sisennystä

1.3 Lohkorakenne muodostetaan käyttämällä a) puolipistettä b) aaltosulkeita c) BEGIN ja END lausekkeita d) sisennystä

Security server v6 installation requirements

On instrument costs in decentralized macroeconomic decision making (Helsingin Kauppakorkeakoulun julkaisuja ; D-31)

make and make and make ThinkMath 2017

16. Allocation Models

812336A C++ -kielen perusteet,

Miehittämätön meriliikenne

Microsoft Lync 2010 Attendee

Results on the new polydrug use questions in the Finnish TDI data

Information on preparing Presentation

7.4 Variability management

You can check above like this: Start->Control Panel->Programs->find if Microsoft Lync or Microsoft Lync Attendeed is listed

Choose Finland-Helsinki Valitse Finland-Helsinki

Tietorakenteet ja algoritmit

Sisällysluettelo Table of contents

The Viking Battle - Part Version: Finnish

Automaatiojärjestelmän hankinnassa huomioitavat tietoturva-asiat

BLOCKCHAINS AND ODR: SMART CONTRACTS AS AN ALTERNATIVE TO ENFORCEMENT

National Building Code of Finland, Part D1, Building Water Supply and Sewerage Systems, Regulations and guidelines 2007

1. SIT. The handler and dog stop with the dog sitting at heel. When the dog is sitting, the handler cues the dog to heel forward.

Lab SBS3.FARM_Hyper-V - Navigating a SharePoint site

Hankkeen toiminnot työsuunnitelman laatiminen

FIS IMATRAN KYLPYLÄHIIHDOT Team captains meeting

anna minun kertoa let me tell you

Alternative DEA Models

Skene. Games Refueled. Muokkaa perustyyl. for Health, Kuopio

EUROOPAN PARLAMENTTI

Group 2 - Dentego PTH Korvake. Peer Testing Report

Curriculum. Gym card

AYYE 9/ HOUSING POLICY

TIEKE Verkottaja Service Tools for electronic data interchange utilizers. Heikki Laaksamo

KONEISTUSKOKOONPANON TEKEMINEN NX10-YMPÄRISTÖSSÄ

Use of spatial data in the new production environment and in a data warehouse

Olet vastuussa osaamisestasi

BDD (behavior-driven development) suunnittelumenetelmän käyttö open source projektissa, case: SpecFlow/.NET.

Nuku hyvin, pieni susi -????????????,?????????????????. Kaksikielinen satukirja (suomi - venäjä) ( (Finnish Edition)

MEETING PEOPLE COMMUNICATIVE QUESTIONS

Tarua vai totta: sähkön vähittäismarkkina ei toimi? Satu Viljainen Professori, sähkömarkkinat

Information on Finnish Language Courses Spring Semester 2018 Päivi Paukku & Jenni Laine Centre for Language and Communication Studies

Salasanan vaihto uuteen / How to change password

The role of 3dr sector in rural -community based- tourism - potentials, challenges

Voice Over LTE (VoLTE) By Miikka Poikselkä;Harri Holma;Jukka Hongisto

Infrastruktuurin asemoituminen kansalliseen ja kansainväliseen kenttään Outi Ala-Honkola Tiedeasiantuntija

Oma sininen meresi (Finnish Edition)

4x4cup Rastikuvien tulkinta

Kysymys 5 Compared to the workload, the number of credits awarded was (1 credits equals 27 working hours): (4)

Tutkimusdata ja julkaiseminen Suomen Akatemian ja EU:n H2020 projekteissa

Information on Finnish Language Courses Spring Semester 2017 Jenni Laine

E U R O O P P A L A I N E N

Returns to Scale II. S ysteemianalyysin. Laboratorio. Esitelmä 8 Timo Salminen. Teknillinen korkeakoulu

VUOSI 2015 / YEAR 2015

Sivupalvelin- ja yhteislevyjärjestelmät

LYTH-CONS CONSISTENCY TRANSMITTER

HITSAUKSEN TUOTTAVUUSRATKAISUT

FinFamily Installation and importing data ( ) FinFamily Asennus / Installation

1. Liikkuvat määreet

21~--~--~r--1~~--~--~~r--1~

TIETEEN PÄIVÄT OULUSSA

MUSEOT KULTTUURIPALVELUINA

Ajettavat luokat: SM: S1 (25 aika-ajon nopeinta)

TÄYTTÖAUTOMAATIT TÄYTTÖAUTOMAATIT COMPUTER INFLATORS

VAASAN YLIOPISTO Humanististen tieteiden kandidaatin tutkinto / Filosofian maisterin tutkinto

Telecommunication Software

Biojätteen keruu QuattroSelect - monilokerojärjestelmällä Tiila Korhonen SUEZ

Capacity utilization

Exercise 1. (session: )

Guidebook for Multicultural TUT Users

GPRS-lisäpalvelu INTERNET-ASETUKSET

TW-LTE 4G/3G. USB-modeemi (USB 2.0)

Information on Finnish Courses Autumn Semester 2017 Jenni Laine & Päivi Paukku Centre for Language and Communication Studies

RINNAKKAINEN OHJELMOINTI A,

Väite Argument "Yhteiskunnan velvollisuus on tarjota virkistysalueita ja -palveluita." "Recreation sites and service

S Sähkön jakelu ja markkinat S Electricity Distribution and Markets

Työsuojelurahaston Tutkimus tutuksi - PalveluPulssi Peter Michelsson Wallstreet Asset Management Oy

LX 70. Ominaisuuksien mittaustulokset 1-kerroksinen 2-kerroksinen. Fyysiset ominaisuudet, nimellisarvot. Kalvon ominaisuudet

Tietokannan eheysrajoitteet ja niiden määrittäminen SQL-kielellä

2_1----~--~r--1.~--~--~--,.~~

TM ETRS-TM35FIN-ETRS89 WTG

Miksi Suomi on Suomi (Finnish Edition)

Ohjelmointikielet ja -paradigmat 5op. Markus Norrena

PAINEILMALETKUKELA-AUTOMAATTI AUTOMATIC AIR HOSE REEL

Käytön avoimuus ja datanhallintasuunnitelma. Open access and data policy. Teppo Häyrynen Tiedeasiantuntija / Science Adviser

ELEMET- MOCASTRO. Effect of grain size on A 3 temperatures in C-Mn and low alloyed steels - Gleeble tests and predictions. Period

Vuosi Jukka Rinnevaara Toimitusjohtaja

Data protection template

S SÄHKÖTEKNIIKKA JA ELEKTRONIIKKA

Transkriptio:

Hajautetut tietokannat Talvi 2015 Laskuharjoitus 5. T-106.5241 Distributed Databases Winter 2015 Tutorial 5 1/5 Sivupalvelimet ja yhteislevyjärjestelmät; kertausta Page Servers, Shared-Disk Systems; Review Perustuu seuraviin artikkeleihin: Based on the following articles C. Mohan & I. Narang 1994: ARIES/CSA: a method for database recovery in client-server architectures. Proc. of the 1994 ACM SIGMOD Internat. Conf. on Management of Data, 55 66. C. Mohan & I. Narang: Recovery and coherency-control protocols for fast intersystem page transfer and fine-granularity locking in a shared disks transaction environment. VLDB 1991, Proc. of the 17th Internat. Conf. on Very Large Data Bases, 1991, 193 207. Vastaukset useisiin kysymyksiin löytyvät myös artikkelista: Crash recovery in client-server EXODUS, Carey et al, Proceedings of the 1992 ACM SIGMOD international conference on Management of data, Pages 165-174. linkistä http://dl.acm.org/citation.cfm?id=130283.130312 The answers to many of these questions can be found in the article above, with the online link. [0] [a] Selvitä työnjako asiakas-palvelin systeemissä. Explain the division of labor in a C/S system. [b] Määrittele kyselypalvelimen toiminta. Määrittele datapalvelimen toiminta. What is query shipping? What is data shipping? [c] Mikä voi romahtaa asiakas-palvelin järjestelmässä? What can crash in a C/S system? [d] Mitä hyötyä saadaan kun aineistoa voidaan pitää asiakkaan Cache-muistissa? What are the benefits of caching data at the client? [e] Mainitse tietopalvelimen etu kyselypalvelimeen verrattuna. Give an advantage of a data server with respect to a query shipping server. [f] Anna lyhyt mutta tarkka määritelmä: (i) tietopalvelin, (ii) asiakkaan WAL-käytäntö.(iii) transaktion rajat ylittävä puskurointi. Give a brief but concise definition for: (i) dataserver, (ii) Client s WAL-policy (iii) intertransaction caching. [1] [a] Vaikkakin älä-varasta käytäntö on yksinkertaisempaa tietokannan elpymisessä (vain sitoutuneet sivut voidaan kirjoittaa tietokannan levylle) tehokkuussyistä käytetään varasta käytäntöä. Mitä se käytännössä mahdollistaa? Even though the No-Steal policy is simpler for recovery (only committed pages get written to the physical DB), the Steal-policy is used for performance reasons. What does it allow in practice?

Hajautetut tietokannat Talvi 2015 Laskuharjoitus 5. T-106.5241 Distributed Databases Winter 2015 Tutorial 5 2/5 [b] Mitä ARIESin käyttämä WAL-protokolla vaatikaan? (kaksi asiaa). What two rules were required by WAL protocol used in ARIES? [c] Missä loki sijaitsee asiakas-palvelinjärjestelmässä, joka perustuu sivupalvelimeen? Tuottavatko asiakkaat mitään lokia? Milloin asiakkaan sivua pidetään päivitettynä( likaisena )? Where is the log located in a C/S system using page-server? Do the clients do any logging? When is the page at the client referred to as dirty/modified? [d] Asiakas-palvelinjärjestelmässä, joka perustuu sivupalvelimeen, mikä on asiakkaalla toimivan tietokantaprosessin päätehtävä? Entä palvelimella toimivan tietokantaprosessin päätehtävä? In a C/S system using page-server, what is the main task of the DB process operating at the client? And the main task for the DB process operating at the server? [e] KERTAUSTA/REVIEW: Täydennä taulukko laittamalla rastit sopiviin kohtiin sekä kommentoi skaalattavuutta (matala, keskitaso, korkea). Fill in the table using check-marks and rate the scalability (low, medium, high). Parallel architecture: Shared? Own Memory Own Disks Scalability Own Database Management Software Shared memory/shared everything Shared Disk Shared Nothing [f] Mitkä ovat puskurieheysprotokollan kaksi päätehtävää yhteislevyjärjestelmässä? What are the two main tasks for the buffer coherency control in shared disk systems? [g] Seuraava teksti on muotoiltu paperista: The following is adapted from : Recovery and Coherency-Control Protocols for Fast Intersystem Page Transfer and Fine-Granularity Locking in a Shared Disks Transaction Environment by C. Mohan and I.Narang at IBM Almaden RC. Täydennä puuttuvat kohdat. Fill-in the blanks. In an Shared-Disk environment, if a modified page is cached in one node (referred to as the owner), then a different node requiring access to that page must get the version of the page from the owner. Special locks (so-called physical P- locks) are used to help in detecting that a cached page in a particular buffer pool is not the latest version of the page. When a transaction T 1 updates a record on page P i in node N 1, the transaction updates the of that page P i. When Ti then commits, the current Page_LSN of P i is sent to the. The Lock Manager registers the page_lsn in the P-lock entry for P i, before unlocking the page s usual logical locks. When T 2 in N 2 locks a record in Pi, it requests the page_lsn for page P i. When LM returns this page_lsn as part of, Node N 2 can then detect if its version, if any, of P i is not current. If P i at node N 2 is not current, then the Lock Manager will assist node N2 in getting the current version of page Pi from the, Node N 1. [h] Mitä tietoa globaali lukkotaulu, joka sijaitsee palvelimella pitää sisällään? A global lock table stored at the Server contains what information?

Hajautetut tietokannat Talvi 2015 Laskuharjoitus 5. T-106.5241 Distributed Databases Winter 2015 Tutorial 5 3/5 [2] Sivupalvelinjärjestelmän asiakkaan c transaktio T pyytää S-lukkoa avainarvoon x. Missä tilanteessa lukko voidaan myöntää paikallisesti, so. ilman, että c:n täytyy kommunikoida palvelimen kanssa? Keksi jokin keino vähentää S-lukkojen varauksessa tarvittavaa kommunikointia asiakkaan ja palvelimen välillä. In a page-server system, transaction T for client c requests an S lock for key value x. In which situations can the lock be granted locally without for c having to communicate with the server? Suggest a way for reducing the communication between Client and Server due to the requesting of S-locks. [3] Oletetaan, että kolmikerrosmallissa a) asiakaskoneessa toimiva esityspalvelu (esim. selain), b) tietokantapalvelin romahtaa kesken jonkin transaktion suorituksen. Mitä jäljelle jääneissä palvelimissa tapahtuu? Entä jos romahtamisen sijaan kyseinen kone menettääkin vain tilapäisesti verkkoyhteytensä muihin palvelimiin? Assume that in a three-tiered model, a) the presentation services at the client machine (e.g. the browser) b) the database server crashes during a transaction. What happens in the remaining servers? What if instead of a crash, the machine in question just temporarily loses its network connection to other servers? [4] [a] Tosi vai epätosi? True or False? Ina shared disk environment using the Fast scheme, the page being shipped might contain updates from more than one node. [b] Mikä on ns. sumea tarkistuspiste? What is a fuzzy checkpoint is assumed? [c] Mikä on TOISTO-vaiheen tarkoitus ARIES elvytyksessä? Entä PERUUTUS vaiheen? What is the purpose of REDO phase in ARIES? What about the UNDO-phase? [d] Luettele kaksi tapaa, jolla ARIES voi tunnistaa sivun olevan päivitetty ( likainen ) kun se suorittaa elvytystä. List two ways in which ARIES can identify a page as having been modified ( dirty ) when doing recovery- [e] Mitä tapahtuisi jos ARIES ei osaisi tunnistaa oikein sivun olevan päivitetty? What would happen if ARIES could not correctly identify a page as being modified? [f] Selosta miten kyseinen tilanne voisi syntyä Asiakas-Palvelin ympäristössä ja esitä siihen yksinkertainen ratkaisu. Explain how such a situation might arise in a C/S environment and give a simple solution.

Hajautetut tietokannat Talvi 2015 Laskuharjoitus 5. T-106.5241 Distributed Databases Winter 2015 Tutorial 5 4/5 [5] Kertausta Review [a] Jos n=6 and p=4 montako pistettä voi enintään romahtaa? Vihje: Määritä ensin q, kirjoitusvallan koko. If n=6 and p=4 what is the maximum nr of sites that can fail? Hint: Define first q, the size of the write quorum. [b] Kuvitellaan kaksi transaktiota Ti and Tj, jotka molemmat siirtävät varoja tililtä x pisteessä S1 tiliin y pisteessä S2. Koska meitä kiinnostaa vain luku ja kirjoitusoperaatiot, molemmat transaktiot voidaan esittää seuraavilla operaatioilla: Assume two transactions Ti and Tj which both transfer funds from an account x located at site S1 to an account y located at site S2. As we are interested only in the read and write operations, the two transactions could be described by the following sequence of operations: T 1 : Ri[x] Wi[x] Ri(y) Wi[y] T 2 : Rj[x] Wj[x] Rj[y] Wj[y] Eli kukin transaktio lukee x:n, pienentää sen arvoa, kirjoittaa uuden arvon, lukee y;n, kasvattaa sen arvoa, ja kirjoittaa uuden arvon. Oletetaan, että nämä kaksi transaktiota aktivoituvat lähes samanaikaisesti, ja oletetaan seuraava suoritus jokaisessa pisteessä: This indicates that each transaction reads x, decrements its value, writes the new value, reads y, increments its value, and writes the new value. Assume that these two transactions are activated almost simultaneously and consider the following execution at each site: Site 1 Site 2 Ri(x) Wi(x) Rj(x) Wj(x) Ri(y) Wi(y) Rj(y) Wj(y) Tässä suorituksessa, se, että Ri(y) on operaation Rj(x) vieressä tarkoittaa siis, että molemmat operaatiot alkavat samanaikaisesti. Joten Tj aloittaa x:n lukemisen heti kun Ti on kirjoittanut x:n, vaikka Ti ei olisikaan vielä valmis. In this representation of execution, the fact that operation Ri(y) appears next to Rj(x) means that these two operations start at the same time. Therefore, Tj begins reading x immediately after Ti has written x, although Ti has not yet terminated. Hajautettu suoritus on sarjallistuva jos kaikki suoritukset osallistujapisteissä ovat sarjallistuvia ja kaikki pisteet sarjallistuttavat transaktionsa samassa järjestyksessä. Onko yllä oleva hajautettu suoritus sarjallistuva? Jos on, mikä on globaalin sarjallistuvuuden suoritusjärjestys? Jos se ei ole sarjallistuva, miksei se ole? A distributed execution is serializable if executions at the participant sites are all serializable and all sites serialize the transactions in the same order. Is the above distributed execution schedule serializable? If so, what

Hajautetut tietokannat Talvi 2015 Laskuharjoitus 5. T-106.5241 Distributed Databases Winter 2015 Tutorial 5 5/5 is the global serialization order? If not, why not? ii) Voiko tämän hajautetun suorituksen järjestystä toteuttaa ankaralla 2-vaihe lukituskäytännöllä (ei ole väliä onko kyseessä keskitetty vaiko hajautettu 2PL)? Jos mahdollista, esitä lukitus/lukkojen vapautussekvenssi. Jos ei, selitä miksi. Can this distributed execution schedule be generated by a strict 2-phase locking protocol (it does not matter whether a centralized or a distributed 2PL mechanism is used)? If it can, indicate the locking/unlocking sequence. If it cannot, explain why not. [c] Mikä transaktion ominaisuus on se, jota vahvistetaan hajautetulla sitoutumisprotokollalla? Selitä lyhyesti. Which transactional property is enforced by distributed commit protocols? Explain briefly. [d] Kaksivaiheisessa sitoutumisessa, osallistuja voi olla estynyt. Miksi tätä ongelmaa ei voida kokonaan poistaa, esim. antamalla osallistujien valita uusi koordinaattori? In the Two-Phase Commit Protocol (2PC), why can blocking never be completely eliminated, even when the participants elect a new coordinator? [6] [a] Ylikansallisen suuryrityksen henkilöstötietokannan relaatio on ositettu vaakasuorasti osastoittain (department), joita yrityksellä on useita kymmeniä eri maissa. Yrityksen päätoimipisteessä (osastolla 1) on pääkonttorin työntekijöiden monikot sisältävän palasen lisäksi toisinne kaikista muista palasista, ts. päätoimipisteessä on relaatio kokonaisena. Anna suoritus suunnitelmat seuraaville, osastolla 10 käynnistetyille kyselyille: The employee relation employee (for a multinational company has been horizontally fragmented by department, of which are there several tens in different countries. At the headquarters (department nr 1) are stored not just the fragments for the employees but also replicas of all other fragments, meaning the whole relation is fully available at the headquarters. employee (ssn, name, address, salary, job, department_number) Give query execution plans for the following queries generated at department nr 10 : i) select * from employee where department_number = 25. ii) select avg(salary) from employee. iii) select department_number, avg(salary) from employee where department_number = 10 or department_number = 25 group by department_number. iv) select avg(salary) from employee where department_number = 10 or department_number = 25. v) select avg(salary) from employee where department_number = 10 or department_number = 1.