Crate task_fs

source ·
Expand description

This crate contains the direcotires and files that comprise the taskfs, which is similar to the /proc directory in linux. There are four main sections in this code:

  1. TaskFs: the top level directory that holds the individual TaskDirs
  2. TaskDir: the lazily computed directory that contains files and directories relevant to that task
  3. TaskFile: lazily computed file that holds information about the task
  4. MmiDir: lazily computed directory that holds subdirectories and files about the task’s memory management information
  5. MmiFile: lazily computed file that contains information about the task’s memory management information
  • Note that all the structs here are NOT persistent in the filesystem EXCEPT for the TaskFs struct, which contains all the individual TaskDirs. This means that when a terminal cd’s into a TaskDir or one of the subdirectories, it is the only entity that has a reference to that directory. When the terminal drops that reference (i.e. backs out of the directory), that directory is dropped from scope

The hierarchy (tree) is as follows:

        TaskDir
    TaskFile    MmiDir
                    MmiFile

Structs

  • Lazily computed directory that contains subfiles and directories relevant to the task’s memory management information.
  • Lazily computed file that contains information about a task’s memory management information.
  • A lazily computed directory that holds files and subdirectories related to information about this Task
  • Lazily computed file that holds information about this task. This taskfile does not exist witin the actual filesystem.
  • The top level directory that includes a dynamically-generated list of all Tasks, each comprising a TaskDir. This directory exists in the root directory.

Constants

Functions

  • Initializes the tasks virtual filesystem directory within the root directory.