⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 libtp_usenix.ps

📁 介绍:MySQL是比较出名的数据库软件
💻 PS
📖 第 1 页 / 共 5 页
字号:
2752(passing)X3012(are)X3131(too)X3253(slow.)X10 f1672 5223(g)N1 f1720(A)X1798(process)X2059(may)X2217(be)X2313(descheduled)X2730(while)X2928(holding)X3192(a)X3248(semaphore.)X10 f863 5233(i)N870(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X863(c)X5193(c)Y5113(c)Y5033(c)Y4953(c)Y4873(c)Y4793(c)Y4713(c)Y4633(c)Y4553(c)Y4473(c)Y3990 5233(c)N5193(c)Y5113(c)Y5033(c)Y4953(c)Y4873(c)Y4793(c)Y4713(c)Y4633(c)Y4553(c)Y4473(c)Y3 f1156 5446(Table)N1371(One:)X1560(Shortcomings)X2051(of)X2138(UNIX)X2363(transaction)X2770(support)X3056(cited)X3241(in)X3327([STON81].)X3 p%%Page: 3 310 s 10 xH 0 xS 3 f1 f755 630(The)N901(transaction)X1274(architecture)X1675(presented)X2004(in)X2087([YOUN91])X2474(is)X2548(very)X2712(similar)X2955(to)X3038(that)X3179(implemented)X3618(in)X3701(the)X3820(LIBTP.)X4103(While)X555 720([YOUN91])N947(presents)X1236(a)X1298(model)X1524(for)X1644(providing)X1981(transaction)X2359(services,)X2663(this)X2803(paper)X3007(focuses)X3273(on)X3378(the)X3501(implementation)X4028(and)X4169(per-)X555 810(formance)N881(of)X970(a)X1028(particular)X1358(system.)X1642(In)X1731(addition,)X2034(we)X2149(provide)X2415(detailed)X2690(comparisons)X3116(with)X3279(alternative)X3639(solutions:)X3970(traditional)X555 900(UNIX)N776(services)X1055(and)X1191(commercial)X1590(database)X1887(management)X2317(systems.)X3 f555 1086(3.)N655(Architecture)X1 f755 1209(The)N906(library)X1146(is)X1224(designed)X1534(to)X1621(provide)X1891(well)X2054(de\256ned)X2315(interfaces)X2653(to)X2740(the)X2863(services)X3147(required)X3440(for)X3559(transaction)X3936(processing.)X555 1299(These)N777(services)X1066(are)X1195(recovery,)X1527(concurrency)X1955(control,)X2232(and)X2378(the)X2506(management)X2946(of)X3043(shared)X3283(data.)X3487(First)X3663(we)X3787(will)X3941(discuss)X4201(the)X555 1389(design)N795(tradeoffs)X1112(in)X1205(the)X1334(selection)X1650(of)X1748(recovery,)X2081(concurrency)X2510(control,)X2787(and)X2933(buffer)X3160(management)X3600(implementations,)X4183(and)X555 1479(then)N713(we)X827(will)X971(present)X1223(the)X1341(overall)X1584(library)X1818(architecture)X2218(and)X2354(module)X2614(descriptions.)X3 f555 1665(3.1.)N715(Design)X966(Tradeoffs)X1 f3 f555 1851(3.1.1.)N775(Crash)X1004(Recovery)X1 f755 1974(The)N909(recovery)X1220(protocol)X1516(is)X1598(responsible)X1992(for)X2115(providing)X2455(the)X2582(transaction)X2963(semantics)X3308(discussed)X3644(earlier.)X3919(There)X4136(are)X4263(a)X555 2064(wide)N739(range)X946(of)X1041(recovery)X1351(protocols)X1677(available)X1995([HAER83],)X2395(but)X2525(we)X2647(can)X2786(crudely)X3054(divide)X3281(them)X3468(into)X3619(two)X3766(main)X3953(categories.)X555 2154(The)N706(\256rst)X856(category)X1159(records)X1422(all)X1528(modi\256cations)X1989(to)X2077(the)X2201(database)X2504(in)X2592(a)X2653(separate)X2942(\256le,)X3089(and)X3230(uses)X3393(this)X3533(\256le)X3660(\(log\))X3841(to)X3928(back)X4105(out)X4232(or)X555 2244(reapply)N825(these)X1019(modi\256cations)X1483(if)X1561(a)X1626(transaction)X2007(aborts)X2232(or)X2328(the)X2455(system)X2706(crashes.)X3012(We)X3153(call)X3298(this)X3442(set)X3560(the)X3 f3687(logging)X3963(protocols)X1 f4279(.)X555 2334(The)N703(second)X949(category)X1249(avoids)X1481(the)X1602(use)X1732(of)X1822(a)X1881(log)X2006(by)X2109(carefully)X2418(controlling)X2792(when)X2989(data)X3146(are)X3268(written)X3518(to)X3603(disk.)X3799(We)X3934(call)X4073(this)X4210(set)X555 2424(the)N3 f673(non-logging)X1096(protocols)X1 f1412(.)X755 2547(Non-logging)N1185(protocols)X1504(hold)X1666(dirty)X1837(buffers)X2085(in)X2167(main)X2347(memory)X2634(or)X2721(temporary)X3071(\256les)X3224(until)X3390(commit)X3654(and)X3790(then)X3948(force)X4134(these)X555 2637(pages)N769(to)X862(disk)X1026(at)X1115(transaction)X1498(commit.)X1813(While)X2040(we)X2165(can)X2308(use)X2446(temporary)X2807(\256les)X2971(to)X3064(hold)X3237(dirty)X3418(pages)X3631(that)X3781(may)X3949(need)X4131(to)X4223(be)X555 2727(evicted)N810(from)X988(memory)X1277(during)X1508(a)X1566(long-running)X2006(transaction,)X2400(the)X2520(only)X2684(user-level)X3023(mechanism)X3410(to)X3494(force)X3682(pages)X3887(to)X3971(disk)X4126(is)X4201(the)X3 f555 2817(fsync)N1 f733(\(2\))X850(system)X1095(call.)X1274(Unfortunately,)X3 f1767(fsync)X1 f1945(\(2\))X2062(is)X2138(an)X2237(expensive)X2581(system)X2826(call)X2965(in)X3050(that)X3193(it)X3260(forces)X3480(all)X3583(pages)X3789(of)X3879(a)X3938(\256le)X4062(to)X4146(disk,)X555 2907(and)N691(transactions)X1094(that)X1234(manage)X1504(more)X1689(than)X1847(one)X1983(\256le)X2105(must)X2280(issue)X2460(one)X2596(call)X2732(per)X2855(\256le.)X755 3030(In)N853(addition,)X3 f1166(fsync)X1 f1344(\(2\))X1469(provides)X1776(no)X1887(way)X2051(to)X2143(control)X2400(the)X2528(order)X2728(in)X2820(which)X3046(dirty)X3227(pages)X3440(are)X3569(written)X3826(to)X3918(disk.)X4121(Since)X555 3120(non-logging)N976(protocols)X1304(must)X1489(sometimes)X1861(order)X2061(writes)X2287(carefully)X2603([SULL92],)X2987(they)X3155(are)X3284(dif\256cult)X3567(to)X3659(implement)X4030(on)X4139(Unix)X555 3210(systems.)N868(As)X977(a)X1033(result,)X1251(we)X1365(have)X1537(chosen)X1780(to)X1862(implement)X2224(a)X2280(logging)X2544(protocol.)X755 3333(Logging)N1050(protocols)X1372(may)X1534(be)X1634(categorized)X2029(based)X2236(on)X2340(how)X2502(information)X2904(is)X2981(logged)X3223(\(physically)X3602(or)X3692(logically\))X4022(and)X4161(how)X555 3423(much)N767(is)X854(logged)X1106(\(before)X1373(images,)X1654(after)X1836(images)X2097(or)X2198(both\).)X2441(In)X3 f2542(physical)X2855(logging)X1 f3103(,)X3157(images)X3417(of)X3517(complete)X3844(physical)X4144(units)X555 3513(\(pages)N786(or)X874(buffers\))X1150(are)X1270(recorded,)X1593(while)X1792(in)X3 f1875(logical)X2118(logging)X1 f2387(a)X2444(description)X2820(of)X2907(the)X3025(operation)X3348(is)X3421(recorded.)X3763(Therefore,)X4121(while)X555 3603(we)N675(may)X839(record)X1071(entire)X1280(pages)X1489(in)X1577(a)X1639(physical)X1932(log,)X2080(we)X2200(need)X2378(only)X2546(record)X2777(the)X2900(records)X3162(being)X3365(modi\256ed)X3674(in)X3761(a)X3822(logical)X4065(log.)X4232(In)X555 3693(fact,)N718(physical)X1006(logging)X1271(can)X1404(be)X1501(thought)X1766(of)X1854(as)X1942(a)X1999(special)X2243(case)X2403(of)X2491(logical)X2730(logging,)X3015(since)X3201(the)X3320 0.3125(``records'')AX3686(that)X3827(we)X3942(log)X4065(in)X4148(logi-)X555 3783(cal)N673(logging)X941(might)X1151(be)X1251(physical)X1542(pages.)X1789(Since)X1991(logical)X2233(logging)X2501(is)X2578(both)X2743(more)X2931(space-ef\256cient)X3423(and)X3562(more)X3750(general,)X4030(we)X4147(have)X555 3873(chosen)N798(it)X862(for)X976(our)X1103(logging)X1367(protocol.)X755 3996(In)N3 f843(before-image)X1315(logging)X1 f1563(,)X1604(we)X1719(log)X1842(a)X1899(copy)X2076(of)X2164(the)X2283(data)X2438(before)X2665(the)X2784(update,)X3039(while)X3238(in)X3 f3321(after-image)X3739(logging)X1 f3987(,)X4027(we)X4141(log)X4263(a)X555 4086(copy)N740(of)X836(the)X963(data)X1126(after)X1303(the)X1429(update.)X1711(If)X1793(we)X1915(log)X2045(only)X2215(before-images,)X2723(then)X2889(there)X3078(is)X3159(suf\256cient)X3485(information)X3891(in)X3981(the)X4107(log)X4237(to)X555 4176(allow)N761(us)X860(to)X3 f950(undo)X1 f1150(the)X1276(transaction)X1656(\(go)X1791(back)X1971(to)X2061(the)X2187(state)X2361(represented)X2759(by)X2866(the)X2991(before-image\).)X3514(However,)X3876(if)X3952(the)X4077(system)X555 4266(crashes)N814(and)X952(a)X1010(committed)X1374(transaction's)X1806(changes)X2087(have)X2261(not)X2385(reached)X2658(the)X2778(disk,)X2953(we)X3068(have)X3241(no)X3342(means)X3568(to)X3 f3651(redo)X1 f3828(the)X3947(transaction)X555 4356(\(reapply)N849(the)X973(updates\).)X1311(Therefore,)X1675(logging)X1945(only)X2113(before-images)X2599(necessitates)X3004(forcing)X3262(dirty)X3439(pages)X3648(at)X3732(commit)X4002(time.)X4210(As)X555 4446(mentioned)N913(above,)X1145(forcing)X1397(pages)X1600(at)X1678(commit)X1942(is)X2015(considered)X2383(too)X2505(costly.)X755 4569(If)N834(we)X953(log)X1080(only)X1247(after-images,)X1694(then)X1857(there)X2043(is)X2121(suf\256cient)X2444(information)X2847(in)X2934(the)X3057(log)X3184(to)X3271(allow)X3474(us)X3570(to)X3657(redo)X3825(the)X3947(transaction)X555 4659(\(go)N687(forward)X967(to)X1054(the)X1177(state)X1348(represented)X1743(by)X1847(the)X1969(after-image\),)X2411(but)X2537(we)X2655(do)X2759(not)X2885(have)X3061(the)X3183(information)X3585(required)X3877(to)X3963(undo)X4147(tran-)X555 4749(sactions)N845(which)X1073(aborted)X1346(after)X1526(dirty)X1709(pages)X1924(were)X2113(written)X2372(to)X2466(disk.)X2670(Therefore,)X3039(logging)X3314(only)X3487(after-images)X3920(necessitates)X555 4839(holding)N819(all)X919(dirty)X1090(buffers)X1338(in)X1420(main)X1600(memory)X1887(until)X2053(commit)X2317(or)X2404(writing)X2655(them)X2835(to)X2917(a)X2973(temporary)X3323(\256le.)X755 4962(Since)N956(neither)X1202(constraint)X1541(\(forcing)X1823(pages)X2029(on)X2132(commit)X2399(or)X2489(buffering)X2811(pages)X3016(until)X3184(commit\))X3477(was)X3624(feasible,)X3916(we)X4032(chose)X4237(to)X555 5052(log)N683(both)X851(before)X1083(and)X1225(after)X1399(images.)X1672(The)X1823(only)X1991(remaining)X2342(consideration)X2800(is)X2879(when)X3079(changes)X3363(get)X3486(written)X3738(to)X3825(disk.)X4023(Changes)X555 5142(affect)N764(both)X931(data)X1090(pages)X1298(and)X1438(the)X1560(log.)X1726(If)X1804(the)X1926(changed)X2218(data)X2376(page)X2552(is)X2629(written)X2880(before)X3110(the)X3232(log)X3358(page,)X3554(and)X3694(the)X3816(system)X4062(crashes)X555 5232(before)N787(the)X911(log)X1039(page)X1217(is)X1296(written,)X1569(the)X1693(log)X1820(will)X1969(contain)X2230(insuf\256cient)X2615(information)X3018(to)X3105(undo)X3290(the)X3413(change.)X3706(This)X3873(violates)X4147(tran-)X555 5322(saction)N803(semantics,)X1160(since)X1346(some)X1536(changed)X1825(data)X1980(pages)X2184(may)X2343(not)X2466(have)X2638(been)X2810(written,)X3077(and)X3213(the)X3331(database)X3628(cannot)X3862(be)X3958(restored)X4237(to)X555 5412(its)N650(pre-transaction)X1152(state.)X755 5535(The)N914(log)X1050(record)X1290(describing)X1658(an)X1768(update)X2016(must)X2205(be)X2315(written)X2576(to)X2672(stable)X2893(storage)X3159(before)X3398(the)X3529(modi\256ed)X3846(page.)X4071(This)X4246(is)X3 f555 5625(write-ahead)N992(logging)X1 f1240(.)X1307(If)X1388(log)X1517(records)X1781(are)X1907(safely)X2126(written)X2380(to)X2469(disk,)X2649(data)X2810(pages)X3020(may)X3185(be)X3288(written)X3542(at)X3627(any)X3770(time)X3939(afterwards.)X555 5715(This)N721(means)X950(that)X1094(the)X1216(only)X1382(\256le)X1508(that)X1652(ever)X1815(needs)X2022(to)X2108(be)X2208(forced)X

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -