What is called Journalling in Linux operating system ?
2022
What is called Journalling in Linux operating system ?
- A.
Process scheduling
- B.
File saving as transaction,
- C.
A type of thread
- D.
An editor
Attempted by 182 students.
Show answer & explanation
Correct answer: B
Correct answer: File saving as transaction
Definition: Journalling is a file system technique where changes are first written to a journal (a log) as transactions and then applied to the main file system. Recording changes in the journal ensures that the file system can be brought back to a consistent state after a crash by replaying or discarding incomplete transactions.
Why it is used: Ensures file system consistency and reduces the need for long file system checks after an unexpected shutdown.
How it works: Changes are logged to the journal first; once the journal entry is safely written, the changes are applied to the file system. On recovery, the system replays the journal to complete or roll back transactions.
Trade-offs: There is a small write overhead due to journalling, but this is often acceptable given the improved reliability and faster recovery.
Common journalling file systems: ext3, ext4, XFS, JFS.
Why the other choices are incorrect:
"Process scheduling" refers to allocating CPU time to processes and is unrelated to logging file system changes.
"A type of thread" is incorrect because threads are execution units; journalling describes a logging mechanism for file systems, not a thread type.
"An editor" is a program for editing text and is unrelated to file system journalling.
A video solution is available for this question — log in and enroll to watch it.