تالار گفتمان مانشت

نسخه‌ی کامل: فرق بین دیسک بلاک و بافر بلاک
شما در حال مشاهده‌ی نسخه‌ی متنی این صفحه می‌باشید. مشاهده‌ی نسخه‌ی کامل با قالب بندی مناسب.
سلام
دوستان میتونن بگن فرق این دو چیه؟

Disk buffer: The area of memory where blocks reside temporarily is called the disk buffer
Buffer Blocks: The blocks residing temporarily in main memory are referred to as buffer blocks

ما نفهمیدیم این چی میگه
Huh
(27 خرداد 1394 08:14 ب.ظ)irpersian20 نوشته شده توسط: [ -> ]سلام
دوستان میتونن بگن فرق این دو چیه؟

Disk buffer: The area of memory where blocks reside temporarily is called the disk buffer
Buffer Blocks: The blocks residing temporarily in main memory are referred to as buffer blocks

ما نفهمیدیم این چی میگه
Huh

داده‌ها قبل از نوشته شدن توو دیسک، در main memory یا همون RAM موقتاً ذخیره میشن (چون سرعت نوشتن در دیسک کم هست و برای اینکه برنامه منتظر اتمام عملیات نوشتن در دیسک نشه، موقتاً در مموری مینویسه و بعد در خفا در دیسک نوشته میشه). به این قسمت از حافظه که مختص این داده‌ها میشه میگن Disk Buffer
حالا خود این Buffer از بلوک‌های کوچکتر با اندازه‌ی خاصی تشکیل شده (مثلاً 512 بایت). به هر کدوم از این بلوک‌ها میگن بلوکِ بافر یا Buffer Block
(27 خرداد 1394 09:13 ب.ظ)behnam5670 نوشته شده توسط: [ -> ]
(27 خرداد 1394 08:14 ب.ظ)irpersian20 نوشته شده توسط: [ -> ]سلام
دوستان میتونن بگن فرق این دو چیه؟

Disk buffer: The area of memory where blocks reside temporarily is called the disk buffer
Buffer Blocks: The blocks residing temporarily in main memory are referred to as buffer blocks

ما نفهمیدیم این چی میگه
Huh

داده‌ها قبل از نوشته شدن توو دیسک، در main memory یا همون RAM موقتاً ذخیره میشن (چون سرعت نوشتن در دیسک کم هست و برای اینکه برنامه منتظر اتمام عملیات نوشتن در دیسک نشه، موقتاً در مموری مینویسه و بعد در خفا در دیسک نوشته میشه). به این قسمت از حافظه که مختص این داده‌ها میشه میگن Disk Buffer
حالا خود این Buffer از بلوک‌های کوچکتر با اندازه‌ی خاصی تشکیل شده (مثلاً ۵۱۲ بایت). به هر کدوم از این بلوک‌ها میگن بلوکِ بافر یا Buffer Block
تعریف ویکی پدیا: Huh


In computer storage, disk buffer (often ambiguously called disk cache or cache buffer) is the embedded memory in a hard disk drive (HDD) acting as a buffer between the rest of the computer and the physical hard disk platter that is used for storage

آقا بهنام ممنون از پاسخت اما یک سوال
من متن رو برای رفع ابهام میزارم

با این حساب این میگه ما ، تغیر در دیتابیس رو وقتی میگیم که یا در دیسک نوشته شده باشه یا در disk block که در رم هست
خوب چطور میشه گفت؟ اگر به هر دلیل رم رو از دست دادیم. چیزی در دیسک نداریم.نه لاگ و نه تغیر در خود دیتابیس
پس چطور می تونیم بگیم تغیر در دیتابس؟!

یا میگه به روز رسانی در قسمت private رم رو حساب نمی کنیم جز وتغیر در دیتابس!!

نقل قول: If a transaction does not modify the database until it has committed, it is said to use the deferred-modification technique

چطور تا تراکنش هنوز commit نشده حرف از deferred modification میزنه؟!
HuhHuh
قسمت تغییر در دیتابیس و اینا رو از خودتون گفتید؟ چون در متنی که گذاشتید نبود. اگه در متن اصلی هست، کل متن رو بذارید
We say a transaction modifies the database if it performs an update on a disk buffer, or on the disk itself; updates to the private part of main memory do not count as database modifications. If a transaction does not modify the database until it has committed, it is said to use the deferred-modification technique. If database modifications occur while the transaction is still active,the transaction is said to use the immediate-modification technique.Deferred modification has the overhead that transactions need to make local copies of all updated data items; further, if a transaction reads a data item that it has updated, it must read the value from its local copy.
نقل قول: In computer storage, disk buffer (often ambiguously called disk cache or cache buffer) is the embedded memory in a hard disk drive (HDD) acting as a buffer between the rest of the computer and the physical hard disk platter that is used for storage
(28 خرداد 1394 01:29 ق.ظ)irpersian20 نوشته شده توسط: [ -> ]We say a transaction modifies the database if it performs an update on a disk buffer, or on the disk itself; updates to the private part of main memory do not count as database modifications. If a transaction does not modify the database until it has committed, it is said to use the deferred-modification technique. If database modifications occur while the transaction is still active,the transaction is said to use the immediate-modification technique.Deferred modification has the overhead that transactions need to make local copies of all updated data items; further, if a transaction reads a data item that it has updated, it must read the value from its local copy.

آها حالا شد.
میگه که وقتی تغییر توو دیتابیس داریم که یا توو بافر دیسک بنویسیم یا توو خود دیسک. قبلاً یه تعریفی گذاشته بودی که گفته بود بافر دیسک داخل main memory هسا ولی تعریف ویکی‌پدیا گفته که توو خود دیسک هست و به نظر من تعریف ویکی درست‌تره. این بافری که توو دیسک هست از خود دیسک سریع‌تر هست و الا خب یه دفعه‌ای توو خود دیسک مینوشت دیگه. پس احتمالاً تکنولوژی‌ش یا فلش و SSD هست که مشکل قطعی برق نداره، و یا اگه DRAM باشه (که حافظه ی فرار هست) یه خازن بزرگ داره که هنگام مثلاً قطعی برق زود داده رو توو دیسک مینویسه و داده از بین نمیره. پس داده در RAM نیست که مشکل inconsistency پیش بیاد و وقتی میگیم commit شده، واقعاً شده.

deffered modification هم خوب اسمش روش هست دیگه. داده commit نشده و بعداً میشه، پس بهش میگیم deffered (یعنی به بعد مؤکول شده). عیبی که داره و متن بالا هم بهش اشاره کرده اینه که ما توو deffered modification بعداً داده رو کامیت میکنیم اما ممکنه مثلاً یه transaction جدید بخواد از داده‌ی ما استفاده کنه در حالی که داده هنوز توو دیسک یا بافر آن دیسک نوشته نشده. اینطوری باید حواسمون باشه که داده‌ی ما آپدیت نیست و به حای دیسک بیاد از کپی داده که فعلاً توو RAM هست و آپدیت هست استفاده کنه چون داده‌ی دیسک آپدیت نشده.
لینک مرجع