The paper presents a comprehensive study of the process of diffusion of impurities, the formation of gases and their mass transfer in the gas-air space of the treatment zone. In addition, the author discusses changes in the state of the cutting process, including the state of the cutting tool and the surfaces of the processed products. Accordingly, the main scientific result is the development of methods and means of controlling the processes of mechanical processing based on mathematical models. The use of such systems in automated production allows you to increase productivity and reduce processing costs by increasing the reliability of processing at higher cutting conditions, timely change of substandard tools, reducing product scrap and tool consumption. In addition, to increase the reliability of the processing systems by timely replacement of extremely worn or broken tools on a backup tool.