BCOS Home » The BCOS Project » BCOS Specifications » BCOS Application Notes

BCOS Native File System Layout Application Note

Preliminary Draft, Temporary

Project Map

Contents:

Figures:

Chapter 1: Overview

This Application Note is intended to describe the layout of files and directories in the operating system's (distributed) native file system.

Chapter 2: High Level Layout

At the highest level; the file system is split into 4 areas:

Figure 2-1. High Level Layout
 /
 |__mount
 |__programs
 |__system
 |__services
 |__user
 

Each of these areas will be described separately.

2.1. Mount Area

The mount area is treated specially by the operating system for mounting non-native file systems. Each computer in the cluster has a sub-directory named according to that computer's 16-bit nodeID; and each file system has a directory reflecting its location on that computer.

For example, if there are 3 computers in a cluster with node IDs 0x0003, 0x0004 and 0x000A; where one computer has a non-native file system on its first floppy drive (fd0), another has a non-native file system on its second CD-ROM drive, and another has a non-native file system on the third partition of its second hard disk, then the mount area might look like this:

Figure 2-2. Mount Area Layout Example
 /
 |__mount
 |   |_node0003
 |   |  |_fd0
 |   |_node0004
 |   |  |_cd2
 |   |_node000A
 |      |_hd1_2
 |__programs
 |__system
 |__services
 |__user
 

Note that the intent is to make it easy for people to find the physical location of various non-native file systems. For example, each floppy drive, CD-ROM/DVD drive and USB port on each computer may be labelled by maintenance staff; and each computer may be labelled (with its node ID) by maintenance staff.

2.2. Programs Area

The programs area is used by applications and utilities. Each developer has their own sub-directory (which is associated with the developer's public key used for digital signatures); and a developer's directory contains a sub-directory for each program created by that developer.

In general, each program can use its directory in any way it likes. However; each program's directory contains a settings sub-directory (that contains default settings for that program). This ensures that it is easy to uninstall a program without losing the program's settings (e.g. by deleting all files except those in the settings sub-directory).

For example, if there is a developer called Foo who has created an application called bar and a utility called baz, then the programs area would look like this:

Figure 2-3. Programs Area Layout Example
 /
 |__mount
 |__programs
 |   |__Foo
 |       |__bar
 |       |   |__settings
 |       |__baz
 |           |__settings
 |__system
 |__services
 |__user

2.3. System Area

The system area is used by the operating system itself. It is split into multiple subdirectories:

Figure 2-4. System Area Layout
 /
 |__mount
 |__programs
 |__system
 |   |__drivers
 |   |   |__display
 |   |   |__PCI
 |   |   |__USB
 |   |   |__80x86_32
 |   |   |__80x86_64
 |   |__install
 |   |__nodes
 |__services
 |__user
 

2.3.1. /system/drivers/display

This sub-directory contains monitor descriptions using the Display Identification Data File Format.

2.3.2. /system/drivers/PCI

This sub-directory contains device driver for PCI devices.

2.3.3. /system/drivers/USB

This sub-directory contains device driver for USB devices.

2.3.4. /system/drivers/80x86_32

This sub-directory contains device driver for 32-bit device drivers for 32-bit and 64-bit 80x86 systems.

2.3.5. /system/drivers/80x86_64

This sub-directory contains device driver for 64-bit 80x86 systems.

2.3.6. /system/install

This sub-directory contains files that may be needed to install the OS on a new computer (various boot loaders, kernels, utilities, etc).

2.3.7. /system/nodes

This area contains a sub-directory for each node (computer) in the cluster; where a node's sub-directory contains things specific to that node (boot logs, etc).

For example, if there are 3 computers in a cluster with node IDs 0x0003, 0x0004 and 0x000A; the system nodes area might look like this:

Figure 2-5. System Nodes Area Layout
 /
 |__mount
 |__programs
 |__system
 |   |__drivers
 |   |__install
 |   |__nodes
 |       |_node0003
 |       |_node0004
 |       |_node000A
 |__services
 |__user
 

2.4. Services Area

The services area is used by public services. Each developer has their own sub-directory (which is associated with the developer's public key used for digital signatures); and a developer's directory contains a sub-directory for each public service created by that developer. The sub-directory name for an implementation of a public service must use the same name as the specification that defines the public service (developers are not free to name their public service themselves). Each implementation of a public service can use its directory in any way it likes.

In addition, a special sub-directory called specs is used to contain the specifications for public services. The specs sub-directory is only intended to be used for software developers, and may be empty.

For example, if there's a developer called Foo who has implemented a spell checker service, and a developer called Bar who has implemented an abritrary precision maths service, then the services area would look like this:

Figure 2-6. Services Area Layout Example
 /
 |__mount
 |__programs
 |__system
 |__services
 |   |__Foo
 |   |   |__spell_check
 |   |__Bar
 |   |   |__maths
 |   |__specs
 |__user
 

2.5. User Area

The user area is used by end users. It is split into a directory for each user.

Each user is the owner of their directory, and can mostly (but not completely) use their directory in any way they like. However, each user's directory has a settings sub directory used by the operating system and programs to store that user's settings.

For example, if there are 2 users named Fred and Jane, the user area would look like this:

Figure 2-7. User Area Layout Example
 /
 |__mount
 |__programs
 |__system
 |__services
 |__user
     |__Fred
     |   |__settings
     |__Jane
         |__settings
 
Generated at 05:03:31 on the 22nd of April, 2017 (UTC)