Prev | Current Page 514 | Next

Carl Reynolds and Paul Tymann

"Schaum's Outline of Principles of Computer Science"

)
A process page-faults
A process causes a memory protection error
6.9 How can a semaphore be used to insure that Process First will complete before Process Second executes?
The semaphore must be shared between processes First and Second. The semaphore must be set
to 0 initially. At the beginning of Second, Second must execute a P() operation (also called test,
202 ANSWERS TO REVIEW QUESTIONS
wait, acquire, etc.) on the semaphore. The P() operation will block Second. When First completes,
the last thing First must do is execute a V() operation (also called increment, release, signal, etc.)
on the semaphore. The V() operation will release the waiting process Second, thus guaranteeing
that First will complete before Second.
6.10 Describe how transaction logging might apply to a file system, and give an example of a file system that
employs transaction logging.
Microsoft??™s NTFS is one file system that uses transaction logging to protect the file system from
corruption due to system failure. When a change must be made to the file system, such as adding
a new file, the file system first writes the changes to a write-ahead log. When the system has
recorded all the changes in the write-ahead log, the system marks the transaction as committed.


Pages:
502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526
życzenia urodzinowe zarządzanie nieruchomościami katalog firm dakolen dieta light