<s>
A	O
virtual	B-Application
file	I-Application
system	I-Application
(	O
VFS	O
)	O
or	O
virtual	B-Application
filesystem	I-Application
switch	O
is	O
an	O
abstract	O
layer	O
on	O
top	O
of	O
a	O
more	O
concrete	O
file	B-Application
system	I-Application
.	O
</s>
<s>
The	O
purpose	O
of	O
a	O
VFS	O
is	O
to	O
allow	O
client	O
applications	O
to	O
access	O
different	O
types	O
of	O
concrete	O
file	B-Application
systems	I-Application
in	O
a	O
uniform	O
way	O
.	O
</s>
<s>
A	O
VFS	O
can	O
,	O
for	O
example	O
,	O
be	O
used	O
to	O
access	O
local	B-General_Concept
and	O
network	O
storage	O
devices	O
transparently	O
without	O
the	O
client	O
application	O
noticing	O
the	O
difference	O
.	O
</s>
<s>
It	O
can	O
be	O
used	O
to	O
bridge	O
the	O
differences	O
in	O
Windows	B-Application
,	O
classic	O
Mac	O
OS/macOS	O
and	O
Unix	B-Application
filesystems	B-Application
,	O
so	O
that	O
applications	O
can	O
access	O
files	O
on	O
local	B-General_Concept
file	B-Application
systems	I-Application
of	O
those	O
types	O
without	O
having	O
to	O
know	O
what	O
type	O
of	O
file	B-Application
system	I-Application
they	O
are	O
accessing	O
.	O
</s>
<s>
A	O
VFS	O
specifies	O
an	O
interface	B-Application
(	O
or	O
a	O
"	O
contract	O
"	O
)	O
between	O
the	O
kernel	B-Operating_System
and	O
a	O
concrete	O
file	B-Application
system	I-Application
.	O
</s>
<s>
Therefore	O
,	O
it	O
is	O
easy	O
to	O
add	O
support	O
for	O
new	O
file	B-Application
system	I-Application
types	I-Application
to	O
the	O
kernel	B-Operating_System
simply	O
by	O
fulfilling	O
the	O
contract	O
.	O
</s>
<s>
The	O
terms	O
of	O
the	O
contract	O
might	O
change	O
incompatibly	O
from	O
release	O
to	O
release	O
,	O
which	O
would	O
require	O
that	O
concrete	O
file	B-Application
system	I-Application
support	O
be	O
recompiled	O
,	O
and	O
possibly	O
modified	O
before	O
recompilation	O
,	O
to	O
allow	O
it	O
to	O
work	O
with	O
a	O
new	O
release	O
of	O
the	O
operating	O
system	O
;	O
or	O
the	O
supplier	O
of	O
the	O
operating	O
system	O
might	O
make	O
only	O
backward-compatible	O
changes	O
to	O
the	O
contract	O
,	O
so	O
that	O
concrete	O
file	B-Application
system	I-Application
support	O
built	O
for	O
a	O
given	O
release	O
of	O
the	O
operating	O
system	O
would	O
work	O
with	O
future	O
versions	O
of	O
the	O
operating	O
system	O
.	O
</s>
<s>
One	O
of	O
the	O
first	O
virtual	B-Application
file	I-Application
system	I-Application
mechanisms	O
on	O
Unix-like	B-Operating_System
systems	I-Operating_System
was	O
introduced	O
by	O
Sun	O
Microsystems	O
in	O
SunOS	B-Operating_System
2.0	O
in	O
1985	O
.	O
</s>
<s>
It	O
allowed	O
Unix	B-Application
system	I-Application
calls	O
to	O
access	O
local	B-General_Concept
UFS	B-Operating_System
file	B-Application
systems	I-Application
and	O
remote	O
NFS	B-Protocol
file	I-Protocol
systems	I-Protocol
transparently	O
.	O
</s>
<s>
For	O
this	O
reason	O
,	O
Unix	B-Application
vendors	O
who	O
licensed	O
the	O
NFS	B-Protocol
code	O
from	O
Sun	O
often	O
copied	O
the	O
design	O
of	O
Sun	O
's	O
VFS	O
.	O
</s>
<s>
Other	O
file	B-Application
systems	I-Application
could	O
be	O
plugged	O
into	O
it	O
also	O
:	O
there	O
was	O
an	O
implementation	O
of	O
the	O
MS-DOS	B-Application
FAT	B-Application
file	I-Application
system	I-Application
developed	O
at	O
Sun	O
that	O
plugged	O
into	O
the	O
SunOS	B-Operating_System
VFS	O
,	O
although	O
it	O
was	O
n't	O
shipped	O
as	O
a	O
product	O
until	O
SunOS	B-Operating_System
4.1	I-Operating_System
.	O
</s>
<s>
The	O
SunOS	B-Operating_System
implementation	O
was	O
the	O
basis	O
of	O
the	O
VFS	O
mechanism	O
in	O
System	B-Operating_System
V	I-Operating_System
Release	O
4	O
.	O
</s>
<s>
John	O
Heidemann	O
developed	O
a	O
stacking	O
VFS	O
under	O
SunOS	B-Operating_System
4.0	O
for	O
the	O
experimental	O
Ficus	O
file	B-Application
system	I-Application
.	O
</s>
<s>
This	O
design	O
provided	O
for	O
code	O
reuse	O
among	O
file	B-Application
system	I-Application
types	I-Application
with	O
differing	O
but	O
similar	O
semantics	O
(	O
e.g.	O
,	O
an	O
encrypting	O
file	B-Application
system	I-Application
could	O
reuse	O
all	O
of	O
the	O
naming	O
and	O
storage-management	O
code	O
of	O
a	O
non-encrypting	O
file	B-Application
system	I-Application
)	O
.	O
</s>
<s>
Heidemann	O
adapted	O
this	O
work	O
for	O
use	O
in	O
4.4BSD	O
as	O
a	O
part	O
of	O
his	O
thesis	O
research	O
;	O
descendants	O
of	O
this	O
code	O
underpin	O
the	O
file	B-Application
system	I-Application
implementations	O
in	O
modern	O
BSD	O
derivatives	O
including	O
macOS	B-Application
.	O
</s>
<s>
Other	O
Unix	B-Application
virtual	B-Application
file	I-Application
systems	I-Application
include	O
the	O
File	B-Application
System	I-Application
Switch	O
in	O
System	B-Operating_System
V	I-Operating_System
Release	I-Operating_System
3	I-Operating_System
,	O
the	O
Generic	O
File	B-Application
System	I-Application
in	O
Ultrix	B-Operating_System
,	O
and	O
the	O
VFS	O
in	O
Linux	B-Application
.	O
</s>
<s>
In	O
OS/2	B-Application
and	O
Microsoft	B-Application
Windows	I-Application
,	O
the	O
virtual	B-Application
file	I-Application
system	I-Application
mechanism	O
is	O
called	O
the	O
Installable	B-Application
File	I-Application
System	I-Application
.	O
</s>
<s>
The	O
Filesystem	B-Application
in	I-Application
Userspace	I-Application
(	O
FUSE	B-Application
)	O
mechanism	O
allows	O
userland	O
code	O
to	O
plug	O
into	O
the	O
virtual	B-Application
file	I-Application
system	I-Application
mechanism	O
in	O
Linux	B-Application
,	O
NetBSD	B-Device
,	O
FreeBSD	B-Operating_System
,	O
OpenSolaris	B-Operating_System
,	O
and	O
macOS	B-Application
.	O
</s>
<s>
In	O
Microsoft	B-Application
Windows	I-Application
,	O
virtual	B-Application
filesystems	I-Application
can	O
also	O
be	O
implemented	O
through	O
userland	O
Shell	O
namespace	O
extensions	O
;	O
however	O
,	O
they	O
do	O
not	O
support	O
the	O
lowest-level	O
file	B-Application
system	I-Application
access	O
application	B-Application
programming	I-Application
interfaces	I-Application
in	O
Windows	B-Application
,	O
so	O
not	O
all	O
applications	O
will	O
be	O
able	O
to	O
access	O
file	B-Application
systems	I-Application
that	O
are	O
implemented	O
as	O
namespace	O
extensions	O
.	O
</s>
<s>
KIO	B-Language
and	O
GVfs/GIO	O
provide	O
similar	O
mechanisms	O
in	O
the	O
KDE	B-Application
and	O
GNOME	B-Application
desktop	I-Application
environments	I-Application
(	O
respectively	O
)	O
,	O
with	O
similar	O
limitations	O
,	O
although	O
they	O
can	O
be	O
made	O
to	O
use	O
FUSE	B-Application
techniques	O
and	O
therefore	O
integrate	O
smoothly	O
into	O
the	O
system	O
.	O
</s>
<s>
Sometimes	O
Virtual	B-Application
File	I-Application
System	I-Application
refers	O
to	O
a	O
file	O
or	O
a	O
group	O
of	O
files	O
(	O
not	O
necessarily	O
inside	O
a	O
concrete	O
file	B-Application
system	I-Application
)	O
that	O
acts	O
as	O
a	O
manageable	O
container	O
which	O
should	O
provide	O
the	O
functionality	O
of	O
a	O
concrete	O
file	B-Application
system	I-Application
through	O
the	O
usage	O
of	O
software	O
.	O
</s>
<s>
Examples	O
of	O
such	O
containers	O
are	O
CBFS	O
Storage	O
or	O
a	O
single-file	O
virtual	B-Application
file	I-Application
system	I-Application
in	O
an	O
emulator	O
like	O
PCTask	O
or	O
so-called	O
WinUAE	B-Device
,	O
Oracle	O
's	O
VirtualBox	B-Operating_System
,	O
Microsoft	O
's	O
Virtual	B-Application
PC	I-Application
,	O
VMware	O
.	O
</s>
<s>
The	O
primary	O
benefit	O
for	O
this	O
type	O
of	O
file	B-Application
system	I-Application
is	O
that	O
it	O
is	O
centralized	O
and	O
easy	O
to	O
remove	O
.	O
</s>
<s>
A	O
single-file	O
virtual	B-Application
file	I-Application
system	I-Application
may	O
include	O
all	O
the	O
basic	O
features	O
expected	O
of	O
any	O
file	B-Application
system	I-Application
(	O
virtual	O
or	O
otherwise	O
)	O
,	O
but	O
access	O
to	O
the	O
internal	O
structure	O
of	O
these	O
file	B-Application
systems	I-Application
is	O
often	O
limited	O
to	O
programs	O
specifically	O
written	O
to	O
make	O
use	O
of	O
the	O
single-file	O
virtual	B-Application
file	I-Application
system	I-Application
(	O
instead	O
of	O
implementation	O
through	O
a	O
driver	O
allowing	O
universal	O
access	O
)	O
.	O
</s>
<s>
Another	O
major	O
drawback	O
is	O
that	O
performance	O
is	O
relatively	O
low	O
when	O
compared	O
to	O
other	O
virtual	B-Application
file	I-Application
systems	I-Application
.	O
</s>
<s>
Low	O
performance	O
is	O
mostly	O
due	O
to	O
the	O
cost	O
of	O
shuffling	O
virtual	O
files	O
when	O
data	O
is	O
written	O
or	O
deleted	O
from	O
the	O
virtual	B-Application
file	I-Application
system	I-Application
.	O
</s>
<s>
Direct	O
examples	O
of	O
single-file	O
virtual	B-Application
file	I-Application
systems	I-Application
include	O
emulators	O
,	O
such	O
as	O
PCTask	O
and	O
WinUAE	B-Device
,	O
which	O
encapsulate	O
not	O
only	O
the	O
filesystem	B-Application
data	O
but	O
also	O
emulated	O
disk	O
layout	O
.	O
</s>
<s>
The	O
Amiga	B-Device
emulator	O
PCTask	O
emulated	O
an	O
Intel	O
PC	O
8088	B-Device
based	O
machine	O
clocked	O
at	O
4.77MHz	O
(	O
and	O
later	O
an	O
80486SX	B-General_Concept
clocked	O
at	O
25MHz	O
)	O
.	O
</s>
<s>
Users	O
of	O
PCTask	O
could	O
create	O
a	O
file	O
of	O
large	O
size	O
on	O
the	O
Amiga	B-Device
filesystem	B-Application
,	O
and	O
this	O
file	O
would	O
be	O
virtually	O
accessed	O
from	O
the	O
emulator	O
as	O
if	O
it	O
were	O
a	O
real	O
PC	O
Hard	O
Disk	O
.	O
</s>
<s>
The	O
file	O
could	O
be	O
formatted	O
with	O
the	O
FAT16	O
filesystem	B-Application
to	O
store	O
normal	O
MS-DOS	B-Application
or	O
Windows	B-Application
files	O
.	O
</s>
<s>
The	O
UAE	B-Device
for	O
Windows	B-Application
,	O
WinUAE	B-Device
,	O
allows	O
for	O
large	O
single	O
files	O
on	O
Windows	B-Application
to	O
be	O
treated	O
as	O
Amiga	B-Device
file	B-Application
systems	I-Application
.	O
</s>
<s>
In	O
WinUAE	B-Device
this	O
file	O
is	O
called	O
a	O
hardfile	O
.	O
</s>
<s>
UAE	B-Device
could	O
also	O
treat	O
a	O
directory	O
on	O
the	O
host	O
filesystem	B-Application
(	O
Windows	B-Application
,	O
Linux	B-Application
,	O
macOS	B-Application
,	O
AmigaOS	B-Application
)	O
as	O
an	O
Amiga	B-Device
filesystem	B-Application
.	O
</s>
