We show that there are precisely two, up to conjugation, anti-involutions
σ±of the algebra of differential operators on the circle preserving the principal gradation. We classify the irreducible quasifinite highest weight representations of the central extension D
±of the Lie subalgebra of this algebra fixed by −
σ±, and find the unitary ones. We realize them in terms of highest weight representations of the central extension of the Lie algebra of infinite matrices with finitely many non-zero diagonals over the algebra C[
u]/(
um+1) and its classical Lie subalgebras of
B,
Cand
Dtypes. Character formulas for
positive primitiverepresentations of D
±(including all the unitary ones) are obtained. We also realize a class of primitive representations of D
±in terms of free fields and establish a number of duality results between these primitive representations and finite-dimensional irreducible representations of finite-dimensional Lie groups and supergroups. We show that the vacuum module
Vcof D
±carries a vertex algebra structure and establish a relationship between
Vcfor
cZ and W-algebras.