We apply the method of collision dynamics to simulation of behavior of layers of polymeric molecules. These molecules are attached at one end to a hard impenetrable surface and subjected to shear loading. We analyze the cases of low density of the planting of molecules, when a mushroom-shape structure of the layer is formed. We also study the cases of high density of planting, when the layer has a structure of `brush’. We obtain the relationship between a number of conformal characteristics of the layer (stretching ratio of polymeric chains, their average inclination to the direction of shear load, the layer thickness) and an effective shear viscosity, on the one hand, and the shear velocity on the other hand. In the case of low density of planting, the shear viscosity is constant under low shear velocities, and it decreases under high shear velocities. In the case when the layer has a structure of brush, the effective viscosity depends weakly on the shear velocity.