This document describes CFSSRV, a distributed lock manager for a TOPS-20 operating system in a multi-processor environment. It's designed to operate without a central master, relying on a "democracy" of nodes to manage shared resources.
Key aspects of CFSSRV and its resource management include:
Resources Managed: CFSSRV manages various resources, including "open type," "write access," and ENQ/DEQ locks for files, as well as "access tokens" for individual file sections (OFNs - Open File Numbers). It also manages directory locks and directory allocation entries.
Access Tokens: These are the most fundamental CFS locks for OFNs, controlling rights to access file sections. They can be held in "place-holder," "read-only," or "exclusive" (read/write) modes. Place-holder tokens are particularly important for maintaining end-of-file pointers and structure free counts, aiding in crash recovery.
Voting Mechanism: To acquire or upgrade access to a resource in this decentralized system, a node initiates a "vote" by broadcasting a request to all other CFS nodes. Nodes respond with "unconditional yes," "no," or "conditional yes." A "conditional yes" indicates that local housekeeping (like writing modified pages to disk) is required before the request can be fully granted, eventually followed by a "condition satisfied" message.
DDMP Routine: This routine plays a critical role in managing page states and disk synchronization. When an access token is revoked or a "conditional yes" requires local work, DDMP is responsible for writing modified pages to disk, flushing local copies, and setting appropriate read-only flags.
Transaction Numbers: To maintain consistency and determine the most up-to-date information for a resource (especially after a system crash), CFSSRV uses "transaction numbers" as a form of timestamp. The highest transaction number indicates the most current state.
Broadcasting for Consistency: While voting is a broadcast mechanism, CFSSRV also explicitly broadcasts specific updates, such as changes to OFN index blocks or end-of-file values when they are written to disk. This ensures all systems are aware of permanent changes and prevents data corruption due to stale information.
Fairness Timer: This mechanism allows a node to hold a resource for a guaranteed interval, helping to reduce "thrashing" where tokens are frequently preempted.
In essence, CFSSRV provides robust, distributed concurrency control for shared file system resources by combining a decentralized voting system, detailed access token management, transaction-based state synchronization, and selective broadcasting of critical updates.
Site structure and layout ©2025 Majenko Technologies