<s>
Hamilton	B-Device
C	I-Device
shell	I-Device
is	O
a	O
clone	B-General_Concept
of	O
the	O
Unix	B-Operating_System
C	I-Operating_System
shell	I-Operating_System
and	O
utilities	B-Application
for	O
Microsoft	B-Application
Windows	I-Application
created	O
by	O
Nicole	B-Device
Hamilton	I-Device
at	O
Hamilton	O
Laboratories	O
as	O
a	O
completely	O
original	O
work	O
,	O
not	O
based	O
on	O
any	O
prior	O
code	O
.	O
</s>
<s>
It	O
was	O
first	O
released	O
on	O
OS/2	B-Application
on	O
December	O
12	O
,	O
1988	O
and	O
on	O
Windows	B-Device
NT	I-Device
in	O
July	O
1992	O
.	O
</s>
<s>
The	O
OS/2	B-Application
version	O
was	O
discontinued	O
in	O
2003	O
but	O
the	O
Windows	B-Application
version	O
continues	O
to	O
be	O
actively	O
supported	O
.	O
</s>
<s>
Hamilton	B-Device
C	I-Device
shell	I-Device
differs	O
from	O
the	O
Unix	B-Operating_System
C	I-Operating_System
shell	I-Operating_System
in	O
several	O
respects	O
.	O
</s>
<s>
These	O
include	O
its	O
compiler	B-Language
architecture	O
,	O
its	O
use	O
of	O
threads	B-Operating_System
,	O
and	O
the	O
decision	O
to	O
follow	O
Windows	B-Application
rather	O
than	O
Unix	O
conventions	O
.	O
</s>
<s>
The	O
original	O
C	B-Operating_System
shell	I-Operating_System
uses	O
an	O
ad	O
hoc	O
parser	O
.	O
</s>
<s>
It	O
is	O
not	O
possible	O
,	O
for	O
example	O
,	O
to	O
pipe	O
the	O
output	O
of	O
a	O
foreach	O
statement	O
into	O
grep	B-Application
.	O
</s>
<s>
By	O
contrast	O
,	O
Hamilton	O
uses	O
a	O
top-down	O
recursive	B-Application
descent	I-Application
parser	I-Application
that	O
allows	O
it	O
to	O
compile	B-Language
statements	O
to	O
an	O
internal	O
form	O
before	O
running	O
them	O
.	O
</s>
<s>
Lacking	O
fork	B-Language
or	O
a	O
high	O
performance	O
way	O
to	O
recreate	O
that	O
functionality	O
,	O
Hamilton	O
uses	O
the	O
Windows	B-Application
threads	B-Operating_System
facilities	O
instead	O
.	O
</s>
<s>
When	O
a	O
new	O
thread	B-Operating_System
is	O
created	O
,	O
it	O
runs	O
within	O
the	O
same	O
process	O
space	O
and	O
it	O
shares	O
all	O
of	O
the	O
process	O
state	O
.	O
</s>
<s>
If	O
one	O
thread	B-Operating_System
changes	O
the	O
current	O
directory	O
or	O
the	O
contents	O
of	O
memory	O
,	O
it	O
's	O
changed	O
for	O
all	O
the	O
threads	B-Operating_System
.	O
</s>
<s>
It	O
's	O
much	O
cheaper	O
to	O
create	O
a	O
thread	B-Operating_System
than	O
a	O
process	O
but	O
there	O
's	O
no	O
isolation	O
between	O
them	O
.	O
</s>
<s>
To	O
recreate	O
the	O
missing	O
isolation	O
of	O
separate	O
processes	O
,	O
the	O
threads	B-Operating_System
cooperate	O
to	O
share	O
resources	O
using	O
locks	B-Operating_System
.	O
</s>
<s>
Hamilton	O
differs	O
from	O
other	O
Unix	B-Application
shells	I-Application
in	O
that	O
it	O
also	O
directly	O
supports	O
Windows	B-Application
conventions	O
for	O
drive	O
letters	O
,	O
filename	B-Application
slashes	I-Application
,	O
escape	B-Algorithm
characters	I-Algorithm
,	O
etc	O
.	O
</s>
