Previous Table of Contents Next


Enhancements to the /proc File System and Watchpoints

The previous flat /proc file system has been restructured into a directory hierarchy that contains additional subdirectories for state information and control functions. It also provides a watchpoint facility that is used to remap read/write permissions on the individual pages of the address space of a process. This facility has no restrictions and is multithread (MT) safe.

The new /proc file structure provides complete binary compatibility with the old /proc interface except that the new watchpoint facility cannot be used with the old interface. Debugging tools have been modified to use the new /proc watchpoint facility, which means the entire watchpoint process is faster.

The following restrictions have been removed when setting watchpoints using the dbx debugging tool:

  Setting watchpoints on local variables on the stack because of SPARC register windows
  Setting watchpoints on multithreaded processes

For more information, refer to the proc(4), core(4), and adb(4) manual pages.

Additional Virtual File Systems

These additional types of virtual file systems are listed for your information. They do not require administration.

  FIFOS (first-in first-out) Named pipe files that give processes common access to data
  FDFS (file descriptors) Provides explicit names for opening files using file descriptors
  NAMEFS Used mostly by STREAMS for dynamic mounts of file descriptors on top of files
  SPECFS (special) Provides access to special character and block devices
  SWAPFS File system used by the kernel when you create additional swap space with the mkfile and swap commands

The Default SunOS 5.x File System

The SunOS 5.x file system is hierarchical, starting with the root directory (/) and continuing downward through a number of directories. The SunOS 5.x system software installs a default set of directories and uses a set of conventions to group similar types of files together. Table 4-1 describes the default SunOS 5.x file system, and shows the type of each file system.

Table 4-1 The Default SunOS 5.x File System

File System File System Type Description
/ UFS The top of the hierarchical file tree. The root directory contains the directories and files critical for system operation, such as the kernel (/kernel/unix), the device drivers, and the programs used to start (boot) the system. It also contains the mount point directories where local and remote file systems can be attached to the file tree.
/etc UFS Contains system-specific files used in system administration.
/usr UFS Contains system files and directories that can be shared with other users. Files that run on only certain types of systems are in the /usr directory (for example, SPARC executables). Files (such as manual pages) that can be used on all types of systems are in /usr/share.
/home NFS, UFS The mount point for the users' home directories, which store users' work files. By default, /home is an automounted file system. On stand-alone systems, /home may be a ufs file system on a local disk slice.
/var UFS Contains system files and directories that are likely to change or grow over the life of the local system. These include system logs, vi and ex backup files, uucp files, and mail and calendar files.
/opt NFS, UFS, S5FS Mount point for optional, third-party software. On some systems, /opt may be a ufs file system on a local disk slice.
/tmp TMPFS Temporary files, cleared each time the system is booted or unmounted.
/proc PROCFS Contains a list of active system processes, by number.

The root (/ ) and /usr file systems are both needed to run a system. Some of the most basic commands from the /usr file system (such as mount) are included in the root file system so that they are available when the system boots up or is in single-user mode.


Previous Table of Contents Next