{"id":337280,"date":"2022-08-19T15:00:35","date_gmt":"2022-08-19T15:00:35","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=337280"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=337280","title":{"rendered":"<span>\u041f\u043e\u0441\u043e\u0431\u0438\u0435 \u043f\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u044f\u0434\u0440\u0430 Linux. \u0427.2<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/683106\/\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/-7\/yl\/hp\/-7ylhpzc6raohz-vopxottyejfu.png\" data-src=\"https:\/\/habrastorage.org\/webt\/-7\/yl\/hp\/-7ylhpzc6raohz-vopxottyejfu.png\"\/><\/div>\n<p><\/a><br \/>  \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u043f\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u044f\u0434\u0440\u0430 \u043e\u0442 2 \u0438\u044e\u043b\u044f 2022. \u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u0443\u0437\u043d\u0430\u0435\u043c, \u0447\u0435\u043c \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u044f\u0434\u0440\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u0430\u043c\u044f\u0442\u0438. \u0412\u0442\u043e\u0440\u0430\u044f \u0436\u0435 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 \u043e\u0434\u043d\u043e\u043c\u0443 \u0438\u0437 \u0442\u0438\u043f\u043e\u0432 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u2014 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u043e\u0441\u043d\u043e\u0432\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2><font color=\"#3AC1EF\">\u0421\u0441\u044b\u043b\u043a\u0438<\/font><\/h2>\n<p>  \u0421\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0447\u0430\u0441\u0442\u0438 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430:<\/p>\n<ul>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/681880\/\">\u0427\u0430\u0441\u0442\u044c 1<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<h2><font color=\"#3AC1EF\">5. \u041e\u0431\u0449\u0438\u0435 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f<\/font><\/h2>\n<p>  <\/p>\n<h3><font color=\"#3AC1EF\">\u258d 5.1 \u041d\u0430\u0447\u0430\u043b\u043e \u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0435\u0439<\/font><\/h3>\n<p>  \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>main()<\/code>, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0440\u044f\u0434 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f. \u0410 \u0432\u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u0438 \u044f\u0434\u0440\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0430\u0447\u0435. \u041c\u043e\u0434\u0443\u043b\u044c \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043b\u0438\u0431\u043e \u0441 <code>init_module<\/code>, \u043b\u0438\u0431\u043e \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u043c <code>module_init<\/code>. \u0423 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u044d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u0445\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u044f\u0434\u0440\u0443, \u043a\u0430\u043a\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c \u043d\u0435\u0441\u0451\u0442, \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u044f\u0434\u0440\u043e \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438. \u041f\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u0445\u043e\u0434\u0430, \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0431\u0435\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u043f\u043e\u043a\u0430 \u044f\u0434\u0440\u0443 \u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043e\u0442 \u043d\u0435\u0433\u043e \u043d\u0435\u043a\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u043e\u0434\u043e\u043c.<\/p>\n<p>  \u0417\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u043b\u0438\u0431\u043e <code>cleanup_module<\/code>, \u043b\u0438\u0431\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u0432\u044b\u0437\u043e\u0432\u043e\u043c <code>module_exit<\/code>. \u0423 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u044d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0445\u043e\u0434\u0430. \u041e\u043d\u0430 \u043e\u0442\u043c\u0435\u043d\u044f\u0435\u0442 \u0432\u0441\u0451, \u0447\u0442\u043e \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u0441\u0434\u0435\u043b\u0430\u043b\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u0445\u043e\u0434\u0430, \u0438 \u043e\u0442\u043c\u0435\u043d\u044f\u0435\u0442 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044e \u0432\u0441\u0435\u0439 \u0440\u0430\u043d\u0435\u0435 \u0432\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u0439 \u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  \u041e\u0431\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u0445\u043e\u0434\u0430 \u0438 \u0432\u044b\u0445\u043e\u0434\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043c\u043e\u0434\u0443\u043b\u0435. \u0410 \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0434\u043b\u044f \u0438\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435 \u043e\u0434\u0438\u043d \u0441\u043f\u043e\u0441\u043e\u0431, \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0449\u0438\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u044b \u00ab\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u0445\u043e\u0434\u0430\u00bb \u0438 \u00ab\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0445\u043e\u0434\u0430\u00bb, \u043d\u043e \u0435\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u043f\u043e \u043d\u0435\u0434\u043e\u0441\u043c\u043e\u0442\u0440\u0443 \u043d\u0430\u0437\u043e\u0432\u0443 \u0438\u0445 <code>init_module<\/code> \u0438 <code>cleanup_module<\/code>, \u0442\u043e, \u0434\u0443\u043c\u0430\u044e, \u0432\u044b \u043f\u043e\u0439\u043c\u0451\u0442\u0435, \u0447\u0442\u043e \u044f \u0438\u043c\u0435\u044e \u0432 \u0432\u0438\u0434\u0443.<\/p>\n<h3><font color=\"#3AC1EF\">\u258d 5.2 \u0424\u0443\u043d\u043a\u0446\u0438\u0438, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u044f\u043c<\/font><\/h3>\n<p>  \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0438\u0435 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f. \u0425\u043e\u0440\u043e\u0448\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u044d\u0442\u043e\u0433\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <code>printf()<\/code>. \u042d\u0442\u043e \u043b\u0438\u0448\u044c \u043e\u0434\u043d\u0430 \u0438\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0445 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 libc. \u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0434\u043e \u044d\u0442\u0430\u043f\u0430 \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u0434\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f <code>printf()<\/code>) \u0438 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0432\u044b\u0437\u043e\u0432\u0430.<\/p>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043c\u043e\u0434\u0443\u043b\u0438 \u044f\u0434\u0440\u0430 \u0442\u043e\u0436\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f. \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u201cHello world\u201d \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>pr_info<\/code>, \u043d\u043e \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u043b\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430. \u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u043e\u0434\u0443\u043b\u0438 \u2013 \u044d\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, \u0447\u044c\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 <code>insmod<\/code> \u0438\u043b\u0438 <code>modprobe<\/code>. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0438\u0437 \u0441\u0430\u043c\u043e\u0433\u043e \u044f\u0434\u0440\u0430. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438 \u0432\u043d\u0435\u0448\u043d\u0438\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u0435, \u0447\u0442\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u044f\u0434\u0440\u043e. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0432\u0430\u0448\u0435 \u044f\u0434\u0440\u043e \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u043e, \u0437\u0430\u0433\u043b\u044f\u043d\u0438\u0442\u0435 \u0432 <code>\/proc\/kallsyms<\/code>.<\/p>\n<p>  \u041f\u0440\u0438 \u0432\u0441\u0451\u043c \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043e \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0438 \u043c\u0435\u0436\u0434\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043d\u044b\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u043c\u0438 \u0432\u044b\u0437\u043e\u0432\u0430\u043c\u0438. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044f\u0441\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0443 \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438 \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u044e\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u2013 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u043c \u0432\u044b\u0437\u043e\u0432\u0430\u043c. \u042d\u0442\u0438 \u0432\u044b\u0437\u043e\u0432\u044b, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u044f\u0434\u0440\u0430 \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0430\u043c\u0438\u043c \u044f\u0434\u0440\u043e\u043c. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>printf()<\/code> \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043a\u0430\u043a \u043e\u0431\u043e\u0431\u0449\u0451\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0432\u043e\u0434\u0430, \u043d\u043e \u043d\u0430 \u0434\u0435\u043b\u0435 \u043e\u043d\u0430 \u043b\u0438\u0448\u044c \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0443\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u044d\u0442\u0438 \u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u0433\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 <code>write<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0442\u0435\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0445 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434.<\/p>\n<p>  \u0425\u043e\u0442\u0438\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u0435\u0442 <code>printf()<\/code>? \u041b\u0435\u0433\u043a\u043e! \u0421\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0439\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>gcc -Wall -o hello hello.c<\/code>:<\/p>\n<pre><code class=\"cpp\">#include &lt;stdio.h>   int main(void) {     printf(\"hello\");     return 0; }<\/code><\/pre>\n<p>  \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <code>strace .\/hello<\/code>. \u0412\u043f\u0435\u0447\u0430\u0442\u043b\u0435\u043d\u044b? \u041a\u0430\u0436\u0434\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u0432\u0438\u0434\u0438\u0442\u0435, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u043c\u0443 \u0432\u044b\u0437\u043e\u0432\u0443. <i><a href=\"https:\/\/strace.io\/\">strace<\/a><\/i> \u2013 \u044d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u0430\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430, \u0441\u043e\u043e\u0431\u0449\u0430\u044e\u0449\u0430\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0442\u043e, \u043a\u0430\u043a\u0438\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u044d\u0442\u0438 \u0432\u044b\u0437\u043e\u0432\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0438 \u043a\u0430\u043a\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442.<\/p>\n<p>  \u042d\u0442\u043e \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u0446\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0432\u044b\u044f\u0441\u043d\u044f\u0442\u044c, \u043a \u043a\u0430\u043a\u0438\u043c \u0444\u0430\u0439\u043b\u0430\u043c \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430. \u0411\u043b\u0438\u0436\u0435 \u043a \u043a\u043e\u043d\u0446\u0443 \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0441\u0442\u0440\u043e\u043a\u0443 \u0432\u0440\u043e\u0434\u0435 <code>write(1, \"hello\", 5hello)<\/code>. \u0412\u043e\u0442 \u043e\u043d\u043e \u2013 \u043b\u0438\u0446\u043e, \u0441\u043a\u0440\u044b\u0442\u043e\u0435 \u0437\u0430 \u043c\u0430\u0441\u043a\u043e\u0439 <code>printf()<\/code>. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0431\u044b\u0442\u044c \u043d\u0435\u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 <code>write()<\/code>, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043b\u044e\u0434\u0435\u0439 \u0434\u043b\u044f \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>fopen<\/code>, <code>fputs<\/code>, <code>fclose<\/code>). \u0415\u0441\u043b\u0438 \u0442\u0430\u043a \u0438 \u0435\u0441\u0442\u044c, \u0442\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u0432 \u043c\u0430\u043d\u0443\u0430\u043b, <code>write 2 man<\/code>. \u0412\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0437\u0434\u0435\u043b \u0432 \u043d\u0451\u043c \u043f\u043e\u0441\u0432\u044f\u0449\u0451\u043d \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u043c \u0432\u044b\u0437\u043e\u0432\u0430\u043c (\u0432\u0440\u043e\u0434\u0435 <code>kill()<\/code> \u0438 <code>read()<\/code>). \u0422\u0440\u0435\u0442\u0438\u0439 \u0440\u0430\u0437\u0434\u0435\u043b \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b (\u0432\u0440\u043e\u0434\u0435 <code>cosh()<\/code> \u0438 <code>random()<\/code>), \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0432\u044b \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u0443\u0436\u0435 \u0431\u043e\u043b\u0435\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b.<\/p>\n<p>  \u0412\u044b \u0434\u0430\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u0438 \u043d\u0430 \u0437\u0430\u043c\u0435\u043d\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u044f\u0434\u0440\u0430, \u0447\u0435\u043c \u043c\u044b \u0432\u0441\u043a\u043e\u0440\u0435 \u0438 \u0437\u0430\u0439\u043c\u0451\u043c\u0441\u044f. \u0412\u0437\u043b\u043e\u043c\u0449\u0438\u043a\u0438 \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043f\u0440\u0438\u0451\u043c\u044b \u0434\u043b\u044f \u0431\u044d\u043a\u0434\u043e\u0440\u043e\u0432 \u0438\u043b\u0438 \u0442\u0440\u043e\u044f\u043d\u043e\u0432, \u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0438\u0437 \u0431\u043e\u043b\u0435\u0435 \u0434\u043e\u0431\u0440\u043e\u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u0431\u0443\u0436\u0434\u0435\u043d\u0438\u0439, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u044f\u0434\u0440\u043e \u043f\u0438\u0441\u0430\u043b\u043e <code>\u201cTee hee, that tickles!\u201d<\/code> (\u0425\u0438-\u0445\u0438, \u0449\u0435\u043a\u043e\u0442\u043d\u043e!) \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u043a\u0442\u043e-\u0442\u043e \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0444\u0430\u0439\u043b.<\/p>\n<h3><font color=\"#3AC1EF\">\u258d 5.3 \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u044f\u0434\u0440\u0430<\/font><\/h3>\n<p>  \u042f\u0434\u0440\u043e (\u043f\u043e \u0441\u0432\u043e\u0435\u0439 \u0441\u0443\u0442\u0438), \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u0443\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c, \u0431\u0443\u0434\u044c \u0442\u043e \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0430, \u0436\u0451\u0441\u0442\u043a\u0438\u0439 \u0434\u0438\u0441\u043a \u0438\u043b\u0438 \u043f\u0430\u043c\u044f\u0442\u044c. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u0441\u043e\u043f\u0435\u0440\u043d\u0438\u0447\u0430\u044e\u0442 \u0437\u0430 \u043f\u0440\u0430\u0432\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u0440\u0435\u0441\u0443\u0440\u0441. \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442, <code>updatedb<\/code> \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445. \u041c\u043e\u0439 \u0441\u0435\u0430\u043d\u0441 VIM \u0438 <code>updatedb<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0436\u0451\u0441\u0442\u043a\u0438\u0439 \u0434\u0438\u0441\u043a \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u043e. \u042f\u0434\u0440\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0432\u043e \u0432\u0441\u0451\u043c \u044d\u0442\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043e\u043a, \u0430 \u043d\u0435 \u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c \u0432 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 \u0438\u043c \u0432\u0437\u0434\u0443\u043c\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>  \u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u044d\u0442\u0438\u043c \u0426\u041f\u0423 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0440\u0435\u0436\u0438\u043c\u0430\u0445. \u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0435\u0436\u0438\u043c \u0434\u0430\u0451\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0441\u0432\u043e\u0431\u043e\u0434\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u0412 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 80386 \u0435\u0441\u0442\u044c 4 \u0442\u0430\u043a\u0438\u0445 \u0440\u0435\u0436\u0438\u043c\u0430, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u043a\u043e\u043b\u044c\u0446\u0430\u043c\u0438 \u0437\u0430\u0449\u0438\u0442\u044b. \u0412 Unix \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0432\u0430 \u0442\u0430\u043a\u0438\u0445 \u043a\u043e\u043b\u044c\u0446\u0430: \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0435 (\u043a\u043e\u043b\u044c\u0446\u043e 0, \u0442\u0430\u043a\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0435 \u043a\u0430\u043a \u00ab\u0440\u0435\u0436\u0438\u043c \u0441\u0443\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440\u0430\u00bb, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b \u0432\u0441\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f) \u0438 \u0432\u043d\u0435\u0448\u043d\u0435\u0435, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0435 \u00ab\u0440\u0435\u0436\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u00bb.<\/p>\n<p>  \u0412\u0441\u043f\u043e\u043c\u043d\u0438\u043c \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440 \u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043d\u044b\u0445 \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u0430\u0445. \u041e\u0431\u044b\u0447\u043d\u043e \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u042d\u0442\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u0435\u0442 \u043e\u0434\u0438\u043d \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u043e\u0442 \u0435\u0451 \u0438\u043c\u0435\u043d\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u043d\u043e \u0434\u0435\u043b\u0430\u044e\u0442 \u044d\u0442\u043e \u0443\u0436\u0435 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0441\u0443\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440\u0430, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e \u0441\u0430\u043c\u043e\u0433\u043e \u044f\u0434\u0440\u0430. \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0443, \u043e\u043d \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0442, \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 \u0440\u0435\u0436\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<h3><font color=\"#3AC1EF\">\u258d 5.4 \u041f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0451\u043d<\/font><\/h3>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u043f\u0438\u0448\u0435\u0442\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0421\u0438, \u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u0441\u043c\u044b\u0441\u043b \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0415\u0441\u043b\u0438 \u0436\u0435, \u043d\u0430\u043f\u0440\u043e\u0442\u0438\u0432, \u0432\u044b \u043f\u0438\u0448\u0435\u0442\u0435 \u043f\u043e\u0434\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u0430\u043d\u0443\u0442 \u0447\u0430\u0441\u0442\u044c\u044e \u0431\u043e\u043b\u0435\u0435 \u043a\u0440\u0443\u043f\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438, \u0442\u043e \u043b\u044e\u0431\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u043b\u044e\u0434\u0435\u0439, \u0432 \u0441\u0432\u044f\u0437\u0438 \u0441 \u0447\u0435\u043c \u0438\u043d\u043e\u0433\u0434\u0430 \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0442\u044c \u043a\u043e\u043b\u043b\u0438\u0437\u0438\u0438 \u043c\u0435\u0436\u0434\u0443 \u0438\u0445 \u0438\u043c\u0451\u043d. \u041a\u043e\u0433\u0434\u0430 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0435, \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u0433\u0440\u044f\u0437\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0451\u043d. \u0412 \u043a\u0440\u0443\u043f\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u044c\u0441\u044f \u0437\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0442\u044c \u0437\u0430\u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u0430 \u0438 \u0432\u044b\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u0445\u0435\u043c\u0443 \u0434\u043b\u044f \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432.<\/p>\n<p>  \u041f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043a\u043e\u0434\u0430 \u044f\u0434\u0440\u0430 \u0434\u0430\u0436\u0435 \u043c\u0430\u043b\u0435\u0439\u0448\u0438\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043b\u0438\u043d\u043a\u043e\u0432\u0430\u043d \u0441\u043e \u0432\u0441\u0435\u043c \u044f\u0434\u0440\u043e\u043c, \u0442\u0430\u043a \u0447\u0442\u043e \u044d\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e \u0432\u0430\u0436\u043d\u043e. \u041f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0432 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0442\u044c \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0433\u0440\u0430\u043c\u043e\u0442\u043d\u044b\u0435 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u044b. \u041f\u043e \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044e \u0432\u0441\u0435 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u044b \u0432 \u044f\u0434\u0440\u0435 \u043f\u0438\u0448\u0443\u0442\u0441\u044f \u0432 \u043d\u0438\u0436\u043d\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435. \u0415\u0441\u043b\u0438 \u0436\u0435 \u0432\u044b \u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0442\u044c \u0447\u0442\u043e-\u043b\u0438\u0431\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u043e, \u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2013 \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0438 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0451 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044f\u0434\u0440\u0430. \u0427\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435 \u043c\u044b \u043e\u0431 \u044d\u0442\u043e\u043c \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c.<\/p>\n<p>  \u0412 \u0444\u0430\u0439\u043b\u0435 <i>\/proc\/kallsyms<\/i> \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432\u0441\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044f\u0434\u0440\u043e \u0437\u043d\u0430\u0435\u0442, \u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u043e\u043c\u0443, \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0435\u0434\u0438\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u043a\u043e\u0434\u0430 \u044f\u0434\u0440\u0430.<\/p>\n<h3><font color=\"#3AC1EF\">\u258d 5.5 \u041a\u043e\u0434\u043e\u0432\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e<\/font><\/h3>\n<p>  \u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u0442\u0435\u043c\u043e\u0439, \u0438 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043a\u043d\u0438\u0433\u0438 <a href=\"https:\/\/www.oreilly.com\/library\/view\/understanding-the-linux\/0596005652\/\">Understanding The Linux Kernel<\/a> \u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 O\u2019Reilly \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0435\u0439. \u041c\u044b \u043d\u0435 \u0441\u0442\u0430\u0432\u0438\u043c \u0437\u0430\u0434\u0430\u0447\u0443 \u0441\u0442\u0430\u0442\u044c \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u0430\u043c\u0438 \u0432 \u044d\u0442\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438, \u043d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0434\u0430\u0436\u0435 \u0437\u0430\u0434\u0443\u043c\u0430\u0442\u044c\u0441\u044f \u043d\u0430\u0434 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u043d\u0430\u0442\u044c \u043f\u0430\u0440\u0443 \u0444\u0430\u043a\u0442\u043e\u0432.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0435\u0449\u0451 \u043d\u0435 \u0434\u0443\u043c\u0430\u043b\u0438 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0432 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0437\u043d\u0430\u0447\u0438\u0442 <code>segfault<\/code> (\u043e\u0448\u0438\u0431\u043a\u0430 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438), \u0442\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0434\u0438\u0432\u0438\u0442\u044c\u0441\u044f, \u0443\u0441\u043b\u044b\u0448\u0430\u0432, \u0447\u0442\u043e \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043d\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0430 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043f\u0430\u043c\u044f\u0442\u0438, \u043f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435, \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435. \u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u044f\u0434\u0440\u043e \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442 \u0447\u0430\u0441\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 \u0435\u0451 \u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0443 \u0434\u043b\u044f \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0432 \u043d\u0435\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u0441\u0442\u0435\u043a\u0430, \u043a\u0443\u0447\u0438 \u0438 \u043f\u0440\u043e\u0447\u0438\u0445 \u0432\u0435\u0449\u0435\u0439, \u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u043d\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442 \u043f\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u043a\u0435.<\/p>\n<p>  \u042d\u0442\u0430 \u043f\u0430\u043c\u044f\u0442\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 <code>0\u044500000000<\/code> \u0438 \u043f\u0440\u043e\u0441\u0442\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0434\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u043b\u044e\u0431\u044b\u0445 \u0434\u0432\u0443\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u043d\u0435 \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u0435\u0442\u0441\u044f, \u0432\u0441\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0430\u0434\u0440\u0435\u0441\u0443 \u043f\u0430\u043c\u044f\u0442\u0438, \u0441\u043a\u0430\u0436\u0435\u043c <code>0xbffff978<\/code>, \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0440\u0430\u0437\u043d\u044b\u043c \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u043c \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438. \u041e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0438\u043d\u0434\u0435\u043a\u0441\u0443 <code>0xbffff978<\/code>, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u043c\u0443 \u043d\u0430 \u043d\u0435\u043a\u043e\u0435 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043f\u0430\u043c\u044f\u0442\u0438, \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430. \u0412 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u0440\u043e\u0434\u0435 \u043d\u0430\u0448\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u201cHello World\u201d \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0443 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u0445\u043e\u0442\u044f \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b, \u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043f\u043e\u0437\u0436\u0435.<\/p>\n<p>  \u0423 \u044f\u0434\u0440\u0430 \u0442\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u0438. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u043e\u0434\u0443\u043b\u044c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u0434\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0432\u043d\u0435\u0434\u0440\u044f\u0442\u044c\u0441\u044f \u0432 \u044f\u0434\u0440\u043e \u0438 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c\u0441\u044f \u0438\u0437 \u043d\u0435\u0433\u043e (\u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u0443\u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u043c\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0443), \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043a\u043e\u0434\u043e\u0432\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u044f\u0434\u0440\u0430, \u043d\u0435 \u0438\u043c\u0435\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0435\u0441\u043b\u0438 \u0432\u0430\u0448 \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0443 \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438, \u0442\u043e \u0438 \u0441 \u044f\u0434\u0440\u043e\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435. \u0418 \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0430\u0447\u043d\u0451\u0442\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u043f\u043e\u0432\u0435\u0440\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443, \u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0432\u0435\u0440\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0438\u043b\u0438 \u043a\u043e\u0434\u0430) \u044f\u0434\u0440\u0430. \u041d\u0430 \u0434\u0435\u043b\u0435 \u044d\u0442\u043e \u0434\u0430\u0436\u0435 \u0445\u0443\u0436\u0435, \u0447\u0435\u043c \u0437\u0432\u0443\u0447\u0438\u0442, \u0442\u0430\u043a \u0447\u0442\u043e \u0431\u0443\u0434\u044c\u0442\u0435 \u043e\u0447\u0435\u043d\u044c \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u044b.<\/p>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438, \u0445\u043e\u0447\u0443 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u0432\u044b\u0448\u0435 \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u043b\u044e\u0431\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0435\u0439 \u043c\u043e\u043d\u043e\u043b\u0438\u0442\u043d\u043e\u0435 \u044f\u0434\u0440\u043e. \u042d\u0442\u043e \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0442\u043e \u0436\u0435, \u0447\u0442\u043e \u00ab\u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0432 \u044f\u0434\u0440\u043e\u00bb, \u0445\u043e\u0442\u044f \u0441\u0443\u0442\u044c \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0430. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u0430\u043a\u043e\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u0435, \u043a\u0430\u043a \u043c\u0438\u043a\u0440\u043e\u044f\u0434\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043c\u0435\u044e\u0442 \u043c\u043e\u0434\u0443\u043b\u0438, \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0449\u0438\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043a\u043e\u0434\u043e\u0432\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e. \u041f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0442\u0430\u043a\u0438\u0445 \u043c\u0438\u043a\u0440\u043e\u044f\u0434\u0435\u0440 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f <a href=\"https:\/\/www.gnu.org\/software\/hurd\/\">GNU Hurd<\/a> \u0438 <a href=\"https:\/\/fuchsia.dev\/fuchsia-src\/concepts\/kernel\">Zircon<\/a>.<\/p>\n<h3><font color=\"#3AC1EF\">\u258d 5.6 \u0414\u0440\u0430\u0439\u0432\u0435\u0440\u044b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432<\/font><\/h3>\n<p>  \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u044b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0440\u043e\u0434\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u0440\u0442\u043e\u0432. \u0412 Unix \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0444\u0430\u0439\u043b\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c \u0432 <i>\/dev<\/i> \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u043c \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0438 \u0441 \u044d\u0442\u0438\u043c \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435\u043c. \u0414\u0440\u0430\u0439\u0432\u0435\u0440 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0441\u0432\u044f\u0437\u044c \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0437\u0432\u0443\u043a\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u044b <i>es1370.ko<\/i> \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 <i>\/dev\/sound<\/i> \u043a \u0437\u0432\u0443\u043a\u043e\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u0435 Ensoniq IS1370. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <i>mp3blaster<\/i>, \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <i>\/dev\/sound<\/i>, \u0434\u0430\u0436\u0435 \u043d\u0435 \u0437\u043d\u0430\u044f, \u043a\u0430\u043a\u0430\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u0437\u0432\u0443\u043a\u043e\u0432\u0430\u044f \u043a\u0430\u0440\u0442\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430.<\/p>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432. \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043f\u0435\u0440\u0432\u044b\u0435 \u0442\u0440\u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0430 \u043d\u0430 \u0432\u0435\u0434\u0443\u0449\u0435\u043c HDD:<\/p>\n<pre><code class=\"bash\">$ ls -l \/dev\/hda[1-3] brw-rw----  1 root  disk  3, 1 Jul  5  2000 \/dev\/hda1 brw-rw----  1 root  disk  3, 2 Jul  5  2000 \/dev\/hda2 brw-rw----  1 root  disk  3, 3 Jul  5  2000 \/dev\/hda3<\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0447\u0438\u0441\u043b\u0430, \u043e\u0442\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u044f\u0442\u043e\u0439. \u041f\u0435\u0440\u0432\u043e\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0440\u0448\u0438\u043c (major) \u043d\u043e\u043c\u0435\u0440\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0430 \u0432\u0442\u043e\u0440\u043e\u0435 \u043c\u043b\u0430\u0434\u0448\u0438\u043c (minor). \u0421\u0442\u0430\u0440\u0448\u0438\u0439 \u043d\u043e\u043c\u0435\u0440 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442, \u043a\u0430\u043a\u043e\u0439 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044e. \u041a\u0430\u0436\u0434\u043e\u043c\u0443 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0443 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u043d\u043e\u043c\u0435\u0440. \u0412\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u0441\u0442\u0430\u0440\u0448\u0438\u043c \u043d\u043e\u043c\u0435\u0440\u043e\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u043c. \u0412\u044b\u0448\u0435 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u0430\u043a\u0438\u0445 \u043d\u043e\u043c\u0435\u0440\u043e\u0432 \u0442\u0440\u0438 <code>3<\/code>, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u0441\u0435\u043c\u0438 \u044d\u0442\u0438\u043c\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0434\u0438\u043d \u0434\u0440\u0430\u0439\u0432\u0435\u0440.<\/p>\n<p>  \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u043e \u043c\u043b\u0430\u0434\u0448\u0438\u043c \u043d\u043e\u043c\u0435\u0440\u0430\u043c \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442 \u043e\u0434\u0438\u043d \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0439 \u0438\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0442 \u0434\u0440\u0443\u0433\u043e\u0433\u043e. \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e \u0447\u0442\u043e \u0432\u0441\u0435 \u0442\u0440\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u043c, \u0438\u0445 \u043c\u043b\u0430\u0434\u0448\u0438\u0435 \u043d\u043e\u043c\u0435\u0440\u0430 \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u043e\u0442 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0432\u0438\u0434\u0438\u0442 \u0438\u0445 \u043a\u0430\u043a \u0440\u0430\u0437\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  \u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u0435\u043b\u044f\u0442\u0441\u044f \u043d\u0430 \u0434\u0432\u0430 \u0442\u0438\u043f\u0430: \u0431\u043b\u043e\u0447\u043d\u044b\u0435 \u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0435. \u041e\u0442\u043b\u0438\u0447\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0431\u043b\u043e\u0447\u043d\u044b\u0435 \u0438\u043c\u0435\u044e\u0442 \u0431\u0443\u0444\u0435\u0440 \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0447\u0435\u043c\u0443 \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0438\u0439 \u043f\u043e\u0440\u044f\u0434\u043e\u043a, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043d\u0430 \u044d\u0442\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c. \u042d\u0442\u043e \u0432\u0430\u0436\u043d\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c\/\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0431\u043b\u0438\u0437\u043a\u043e\u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0441\u0435\u043a\u0442\u043e\u0440\u0430, \u043d\u0435\u0436\u0435\u043b\u0438 \u0442\u0435, \u0447\u0442\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u044b \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430. \u0415\u0449\u0451 \u043e\u0434\u043d\u0438\u043c \u043e\u0442\u043b\u0438\u0447\u0438\u0435\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u0431\u043b\u043e\u0447\u043d\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0432\u0445\u043e\u0434 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0432\u044b\u0445\u043e\u0434 \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u043b\u043e\u043a\u0430\u043c\u0438 (\u0447\u0435\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430), \u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u043c \u0434\u043e\u0437\u0432\u043e\u043b\u0435\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u0430\u0439\u0442\u043e\u0432. \u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u043c\u0438, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0438\u043c \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u0430\u044f \u0431\u0443\u0444\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f, \u0438 \u043e\u043d\u0438 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0431\u043b\u043e\u043a\u043e\u0432.<\/p>\n<p>  \u041f\u043e\u043d\u044f\u0442\u044c, \u0434\u043b\u044f \u043a\u0430\u043a\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u0430\u0439\u043b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u2013 \u0431\u043b\u043e\u0447\u043d\u043e\u0433\u043e \u0438\u043b\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u2013 \u043c\u043e\u0436\u043d\u043e \u043f\u043e \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u0441\u0438\u043c\u0432\u043e\u043b\u0443 \u0432\u044b\u0432\u043e\u0434\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>ls -l<\/code>. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e <code>b<\/code>, \u0437\u043d\u0430\u0447\u0438\u0442 \u2014 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0431\u043b\u043e\u0447\u043d\u043e\u0435, \u0430 \u0435\u0441\u043b\u0438 <code>c<\/code>, \u0437\u043d\u0430\u0447\u0438\u0442 \u2014 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0435. \u041f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0435 \u0432\u044b\u0448\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432\u0441\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0431\u043b\u043e\u0447\u043d\u044b\u043c\u0438, \u0430 \u0432\u043e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0445 (\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u0440\u0442\u044b):<\/p>\n<pre><code class=\"bash\">crw-rw----  1 root  dial 4, 64 Feb 18 23:34 \/dev\/ttyS0 crw-r-----  1 root  dial 4, 65 Nov 17 10:26 \/dev\/ttyS1 crw-rw----  1 root  dial 4, 66 Jul  5  2000 \/dev\/ttyS2 crw-rw----  1 root  dial 4, 67 Jul  5  2000 \/dev\/ttyS3<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c \u0431\u044b\u043b\u0438 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u044b \u0441\u0442\u0430\u0440\u0448\u0438\u0435 \u043d\u043e\u043c\u0435\u0440\u0430, \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u0432 <a href=\"https:\/\/git.kernel.org\/pub\/scm\/linux\/kernel\/git\/stable\/linux.git\/tree\/Documentation\/admin-guide\/devices.txt\">Documentation\/admin-guide\/devices.txt<\/a>.<\/p>\n<p>  \u041f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432\u0441\u0435 \u044d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <code>mknod<\/code>. \u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043f\u043e\u0434 \u0438\u043c\u0435\u043d\u0435\u043c <code>coffee<\/code> \u0441\u043e \u0441\u0442\u0430\u0440\u0448\u0438\u043c\/\u043c\u043b\u0430\u0434\u0448\u0438\u043c \u043d\u043e\u043c\u0435\u0440\u0430\u043c <code>12<\/code>\/<code>2<\/code> \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 <code>mknod \/dev\/coffee c 12 2<\/code>. \u0412\u0430\u043c \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043c\u0435\u0449\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0432 <i>\/dev<\/i>, \u043d\u043e \u0442\u043e\u0433\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0435. \u041b\u0438\u043d\u0443\u043a\u0441 \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u0442 \u044d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b \u0432 <i>\/dev<\/i>, \u0438 \u0432\u0430\u043c \u0441\u0442\u043e\u0438\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a \u0436\u0435. \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0444\u0430\u0439\u043b\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043f\u043e\u043b\u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435, \u0433\u0434\u0435 \u0432\u044b \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0435 \u043c\u043e\u0434\u0443\u043b\u044c \u044f\u0434\u0440\u0430. \u0422\u043e\u043b\u044c\u043a\u043e \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0435\u0433\u043e \u0432 \u043d\u0443\u0436\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e, \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430.<\/p>\n<p>  \u041d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a \u0445\u043e\u0447\u0443 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u044f\u0441\u043d\u0438\u0442\u044c \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u0435\u043d \u0438\u0437 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u0432\u044b\u0448\u0435. \u041a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u0444\u0430\u0439\u043b\u0443 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u044f\u0434\u0440\u043e \u043f\u043e \u0435\u0433\u043e \u0441\u0442\u0430\u0440\u0448\u0435\u043c\u0443 \u043d\u043e\u043c\u0435\u0440\u0443 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043a\u0430\u043a\u043e\u0439 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u044d\u0442\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f. \u0422\u043e \u0435\u0441\u0442\u044c \u044f\u0434\u0440\u0443 \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0437\u043d\u0430\u0442\u044c, \u043c\u043b\u0430\u0434\u0448\u0438\u0439 \u043d\u043e\u043c\u0435\u0440. \u042d\u0442\u043e\u0442 \u043d\u043e\u043c\u0435\u0440 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u043b\u0438\u0448\u044c \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0435\u0433\u043e \u0434\u043b\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438, \u043a\u043e\u0433\u0434\u0430 \u044f \u0433\u043e\u0432\u043e\u0440\u044e \u00ab\u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435\u00bb, \u0442\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u044e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u043e\u043b\u0435\u0435 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u0435, \u043d\u0435\u0436\u0435\u043b\u0438 \u043a\u0430\u043a\u0430\u044f-\u043d\u0438\u0431\u0443\u0434\u044c PCI-\u043a\u0430\u0440\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u0434\u0435\u0440\u0436\u0438\u0442\u0435 \u0432 \u0440\u0443\u043a\u0430\u0445. \u0412\u0437\u0433\u043b\u044f\u043d\u0438\u0442\u0435 \u043d\u0430 \u044d\u0442\u0438 \u0434\u0432\u0430 \u0444\u0430\u0439\u043b\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432:<\/p>\n<pre><code class=\"bash\">$ ls -l \/dev\/sda \/dev\/sdb brw-rw---- 1 root disk 8,  0 Jan  3 09:02 \/dev\/sda brw-rw---- 1 root disk 8, 16 Jan  3 09:02 \/dev\/sdb<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u0433\u043b\u044f\u0434\u044f \u043d\u0430 \u043d\u0438\u0445, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0445\u043e\u0434\u0443 \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043e\u043d\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0431\u043b\u043e\u0447\u043d\u044b\u043c\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438 \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u043c. \u0418\u043d\u043e\u0433\u0434\u0430 \u0434\u0432\u0430 \u0444\u0430\u0439\u043b\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0441 \u043e\u0434\u043d\u0438\u043c \u0441\u0442\u0430\u0440\u0448\u0438\u043c, \u043d\u043e \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043c\u043b\u0430\u0434\u0448\u0438\u043c\u0438 \u043d\u043e\u043c\u0435\u0440\u0430\u043c\u0438 \u043d\u0430 \u0434\u0435\u043b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f. \u0422\u0430\u043a \u0447\u0442\u043e \u0438\u043c\u0435\u0439\u0442\u0435 \u0432 \u0432\u0438\u0434\u0443, \u0447\u0442\u043e \u0441\u043b\u043e\u0432\u043e \u00ab\u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435\u00bb \u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u043e\u0431\u0438\u0438 \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0432\u0435\u0441\u044c\u043c\u0430 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<h2><font color=\"#3AC1EF\">6. \u0414\u0440\u0430\u0439\u0432\u0435\u0440\u044b \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432<\/font><\/h2>\n<p>  <\/p>\n<h3><font color=\"#3AC1EF\">\u258d 6.1 \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 file_operations<\/font><\/h3>\n<p>  \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 <code>file_operations<\/code> \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 <i><a href=\"https:\/\/git.kernel.org\/pub\/scm\/linux\/kernel\/git\/stable\/linux.git\/tree\/include\/linux\/fs.h\">include\/linux\/fs.h<\/a><\/i> \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c. \u041a\u0430\u0436\u0434\u043e\u0435 \u043f\u043e\u043b\u0435 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0430\u0434\u0440\u0435\u0441\u0443 \u043d\u0435\u043a\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0439 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u043c \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0449\u0443\u044e \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 <code>file_operations<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0430\u0434\u0440\u0435\u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u043e\u0434\u0443\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u044d\u0442\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e. \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 \u044f\u0434\u0440\u0435 5.4:<\/p>\n<pre><code class=\"cpp\">struct file_operations {     struct module *owner;     loff_t (*llseek) (struct file *, loff_t, int);     ssize_t (*read) (struct file *, char __user *, size_t, loff_t *);     ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);     ssize_t (*read_iter) (struct kiocb *, struct iov_iter *);     ssize_t (*write_iter) (struct kiocb *, struct iov_iter *);     int (*iopoll)(struct kiocb *kiocb, bool spin);     int (*iterate) (struct file *, struct dir_context *);     int (*iterate_shared) (struct file *, struct dir_context *);     __poll_t (*poll) (struct file *, struct poll_table_struct *);     long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);     long (*compat_ioctl) (struct file *, unsigned int, unsigned long);     int (*mmap) (struct file *, struct vm_area_struct *);     unsigned long mmap_supported_flags;     int (*open) (struct inode *, struct file *);     int (*flush) (struct file *, fl_owner_t id);     int (*release) (struct inode *, struct file *);     int (*fsync) (struct file *, loff_t, loff_t, int datasync);     int (*fasync) (int, struct file *, int);     int (*lock) (struct file *, int, struct file_lock *);     ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int);     unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);     int (*check_flags)(int);     int (*flock) (struct file *, int, struct file_lock *);     ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);     ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);     int (*setlease)(struct file *, long, struct file_lock **, void **);     long (*fallocate)(struct file *file, int mode, loff_t offset,         loff_t len);     void (*show_fdinfo)(struct seq_file *m, struct file *f);     ssize_t (*copy_file_range)(struct file *, loff_t, struct file *,         loff_t, size_t, unsigned int);     loff_t (*remap_file_range)(struct file *file_in, loff_t pos_in,              struct file *file_out, loff_t pos_out,              loff_t len, unsigned int remap_flags);     int (*fadvise)(struct file *, loff_t, loff_t, int); } __randomize_layout;<\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u043c \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442\u0441\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0443, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0435\u043c\u0443 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0443, \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0447\u0442\u0435\u043d\u0438\u0435 \u0438\u0437 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 <code>file_operations<\/code> \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u043d\u0430 <code>NULL<\/code>.<\/p>\n<p>  \u0414\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 gcc \u0435\u0441\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435. \u0412 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430\u0445 \u043e\u043d\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0447\u0430\u0441\u0442\u043e, \u0442\u0430\u043a \u0447\u0442\u043e \u043d\u0435 \u0443\u0434\u0438\u0432\u043b\u044f\u0439\u0442\u0435\u0441\u044c, \u0435\u0441\u043b\u0438 \u0435\u0433\u043e \u0443\u0432\u0438\u0434\u0438\u0442\u0435. \u0422\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u043e\u0432\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435:<\/p>\n<pre><code class=\"cpp\">struct file_operations fops = {     read: device_read,     write: device_write,     open: device_open,     release: device_release };<\/code><\/pre>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0438 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c \u042199, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/gcc.gnu.org\/onlinedocs\/gcc\/Designated-Inits.html\">\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0445 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432<\/a>. \u041f\u0440\u0438\u0447\u0451\u043c \u0442\u0430\u043a\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435, \u0447\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f GNU. \u042d\u0442\u043e\u0442 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0430\u0439\u0432\u0435\u0440, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442 \u043b\u0443\u0447\u0448\u0443\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c:<\/p>\n<pre><code class=\"cpp\">struct file_operations fops = {     .read = device_read,     .write = device_write,     .open = device_open,     .release = device_release };<\/code><\/pre>\n<p>  \u0421\u043c\u044b\u0441\u043b \u044f\u0441\u0435\u043d, \u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0432\u0432\u0438\u0434\u0443, \u0447\u0442\u043e \u043b\u044e\u0431\u043e\u0439 \u0447\u043b\u0435\u043d \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0432\u044b \u043d\u0435 \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u044f\u0432\u043d\u043e, gcc \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0441 <code>NULL<\/code>.<\/p>\n<p>  \u042d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 <code>struct file_operations<\/code>, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 <code>read<\/code>, <code>write<\/code>, <code>open<\/code> \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435, \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>fops<\/code>.<\/p>\n<p>  \u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 Linux v3.14, \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0447\u0442\u0435\u043d\u0438\u044f, \u0437\u0430\u043f\u0438\u0441\u0438 \u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b \u0437\u0430 \u0441\u0447\u0451\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 <code>f_pos<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0444\u0430\u0439\u043b\u0430 \u0432\u043e \u0432\u0437\u0430\u0438\u043c\u043d\u043e\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u043e\u043c\u0443, \u043c\u043e\u0436\u043d\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0431\u0435\u0437 \u0438\u0437\u043b\u0438\u0448\u043d\u0438\u0445 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043e\u043a.<\/p>\n<p>  \u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 Linux v5.6, \u0431\u044b\u043b\u0430 \u0432\u0432\u0435\u0434\u0435\u043d\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 <code>proc_ops<\/code>, \u0437\u0430\u043c\u0435\u043d\u0438\u0432\u0448\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b <code>file_operations<\/code> \u043f\u0440\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432.<\/p>\n<h3><font color=\"#3AC1EF\">\u258d 6.2 \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 file<\/font><\/h3>\n<p>  \u041a\u0430\u0436\u0434\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0432 \u044f\u0434\u0440\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 <code>file<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0432 <i><a href=\"https:\/\/git.kernel.org\/pub\/scm\/linux\/kernel\/git\/stable\/linux.git\/tree\/include\/linux\/fs.h\">include\/linux\/fs.h<\/a><\/i>. \u0418\u043c\u0435\u0439\u0442\u0435 \u0432\u0432\u0438\u0434\u0443, \u0447\u0442\u043e <code>file<\/code> \u2013 \u044d\u0442\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0443\u0440\u043e\u0432\u043d\u044f \u044f\u0434\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430. \u042d\u0442\u043e \u043d\u0435 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e <code>FILE<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f glibc \u0438 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u044f\u0434\u0440\u0430. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0441\u0430\u043c\u043e \u0438\u043c\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043c\u043e\u0436\u0435\u0442 \u0441\u0431\u0438\u0432\u0430\u0442\u044c \u0441 \u0442\u043e\u043b\u043a\u0443, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0439 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 <code>file<\/code>, \u0430 \u043d\u0435 \u0444\u0430\u0439\u043b \u043d\u0430 \u0434\u0438\u0441\u043a\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 <code>inode<\/code>.<\/p>\n<p>  \u042d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b <code>file<\/code> \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>filp<\/code>. \u0412\u044b \u0442\u0430\u043a\u0436\u0435 \u0443\u0432\u0438\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u043f\u043e\u0440\u043e\u0439 \u0435\u0451 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 <i>file object<\/i> \u2013 \u043f\u0443\u0441\u0442\u044c \u044d\u0442\u043e \u043d\u0435 \u0432\u0432\u043e\u0434\u0438\u0442 \u0432\u0430\u0441 \u0432 \u0437\u0430\u0431\u043b\u0443\u0436\u0434\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u0417\u0430\u0433\u043b\u044f\u043d\u0438\u0442\u0435 \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 <code>file<\/code>. \u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0437\u0434\u0435\u0441\u044c, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a <code>struct dentry<\/code>, \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430\u043c\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u0438 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u044b \u043d\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u044e\u0442 <code>file<\/code> \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0430 \u043b\u0438\u0448\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435\u0441\u044f \u0432 \u043d\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0433\u0434\u0435-\u0442\u043e \u0435\u0449\u0451.<\/p>\n<h3><font color=\"#3AC1EF\">\u258d 6.3 \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430<\/font><\/h3>\n<p>  \u041a\u0430\u043a \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c, \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 \u0444\u0430\u0439\u043b\u044b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u043e\u0431\u044b\u0447\u043d\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0432 <i>\/dev<\/i>. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u2014 \u043f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u0432\u043f\u043e\u043b\u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0444\u0430\u0439\u043b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441 \u0442\u0435\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u0435\u043c, \u0447\u0442\u043e \u043f\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0451\u043d \u0432 <i>\/dev<\/i>. \u0421\u0442\u0430\u0440\u0448\u0438\u0439 \u043d\u043e\u043c\u0435\u0440 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442, \u043a\u0430\u043a\u043e\u0439 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u043a\u0430\u043a\u043e\u0439 \u0444\u0430\u0439\u043b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442. \u041c\u043b\u0430\u0434\u0448\u0438\u0439 \u0436\u0435 \u043d\u043e\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0430\u043c\u0438\u043c \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u043c \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>  \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044e \u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044f\u0434\u0440\u0430. \u042d\u0442\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044e \u0435\u043c\u0443 \u0441\u0442\u0430\u0440\u0448\u0435\u0433\u043e \u043d\u043e\u043c\u0435\u0440\u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0443\u043b\u044f \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>register_chrdev<\/code>, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0439 \u0432 <i><a href=\"https:\/\/git.kernel.org\/pub\/scm\/linux\/kernel\/git\/stable\/linux.git\/tree\/include\/linux\/fs.h\">include\/linux\/fs.h<\/a><\/i>.<\/p>\n<pre><code class=\"cpp\">int register_chrdev(unsigned int major, const char *name, struct file_operations *fops);<\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c <code>unsigned major int<\/code> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0440\u0448\u0438\u043c \u043d\u043e\u043c\u0435\u0440\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c, <code>const char *name<\/code> \u2013 \u044d\u0442\u043e \u0438\u043c\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432 \u0442\u043e\u043c \u0432\u0438\u0434\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043d\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u0441\u044f \u0432 <i>\/proc\/devices<\/i>, \u0430 <code>struct file_operations *fops<\/code> \u2013 \u044d\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 <code>file_operations<\/code> \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430. \u041e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0432\u0430\u043b\u0438\u043b\u0430\u0441\u044c. \u0417\u0430\u043c\u0435\u0442\u044c\u0442\u0435, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u043b\u0438 \u0432 <code>register_chrdev<\/code> \u043c\u043b\u0430\u0434\u0448\u0438\u0439 \u043d\u043e\u043c\u0435\u0440. \u0415\u0449\u0451 \u0440\u0430\u0437 \u043d\u0430\u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e \u044f\u0434\u0440\u0443 \u043e\u043d \u043d\u0435 \u0432\u0430\u0436\u0435\u043d, \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0440\u0430\u0439\u0432\u0435\u0440.<\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0432 \u0442\u043e\u043c, \u043a\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u043d\u043e\u043c\u0435\u0440, \u043d\u0435 \u0432\u0437\u044f\u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0442\u043e\u0442, \u0447\u0442\u043e \u0443\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f? \u041f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u0432 <a href=\"https:\/\/git.kernel.org\/pub\/scm\/linux\/kernel\/git\/stable\/linux.git\/tree\/Documentation\/admin-guide\/devices.txt\">Documentation\/admin-guide\/devices.txt<\/a> \u0438 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u0439. \u041d\u043e \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u0443\u0434\u0430\u0447\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u044b \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0432\u0430\u043c\u0438 \u043d\u043e\u043c\u0435\u0440 \u043d\u0435 \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d \u0433\u0434\u0435-\u0442\u043e \u043f\u043e\u0437\u0434\u043d\u0435\u0435. \u0420\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u044f\u0434\u0440\u043e \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u043d\u043e\u043c\u0435\u0440.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0432 <code>register_chrdev<\/code> \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u043d\u043e\u043c\u0435\u0440 <code>0<\/code>, \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u0435\u0433\u043e \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0430\u043f\u0435\u0440\u0451\u0434, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u0442\u0435 \u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u0435\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u043d\u043e\u043c\u0435\u0440.<\/p>\n<p>  \u0412\u044b\u0439\u0442\u0438 \u0438\u0437 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043f\u0443\u0442\u044f\u043c\u0438:<\/p>\n<ul>\n<li>\u043d\u043e\u043c\u0435\u0440 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0441\u0430\u043c \u0434\u0440\u0430\u0439\u0432\u0435\u0440, \u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432\u0440\u0443\u0447\u043d\u0443\u044e. <\/li>\n<li>\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u0432 <i>\/proc\/devices<\/i>, \u0438 \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043b\u0438\u0431\u043e \u0441\u0430\u043c\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u043b\u0438\u0431\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438. <\/li>\n<li>\u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0448 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0441\u0430\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b \u0444\u0430\u0439\u043b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>device_create<\/code> \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438, \u0438 <code>device_destroy<\/code> \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u0437\u043e\u0432\u0430 <code>cleanup_module<\/code>.<\/li>\n<\/ul>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e <code>register_chrdev()<\/code> \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c \u0440\u044f\u0434 \u043c\u043b\u0430\u0434\u0448\u0438\u0445 \u043d\u043e\u043c\u0435\u0440\u043e\u0432, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c \u0441\u0442\u0430\u0440\u0448\u0438\u043c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441 \u0446\u0435\u043b\u044c\u044e \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u043b\u0438\u0448\u043d\u0438\u0445 \u0437\u0430\u0442\u0440\u0430\u0442 \u043f\u0440\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <code>cdev<\/code>.<\/p>\n<p>  \u042d\u0442\u043e\u0442 \u0431\u043e\u043b\u0435\u0435 \u0441\u0432\u0435\u0436\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044e \u0432 \u0434\u0432\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u044d\u0442\u0430\u043f\u0430. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0440\u0438\u044e \u043d\u043e\u043c\u0435\u0440\u043e\u0432 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>register_chrdev_region<\/code> \u0438\u043b\u0438 <code>alloc_chrdev_region<\/code>.<\/p>\n<pre><code class=\"cpp\">int register_chrdev_region(dev_t from, unsigned count, const char *name); int alloc_chrdev_region(dev_t *dev, unsigned baseminor, unsigned count, const char *name);<\/code><\/pre>\n<p>  \u0412\u044b\u0431\u043e\u0440 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u044d\u0442\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 \u0442\u043e\u0433\u043e, \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b \u043b\u0438 \u0432\u0430\u043c \u0441\u0442\u0430\u0440\u0448\u0438\u0435 \u043d\u043e\u043c\u0435\u0440\u0430 \u0432\u0430\u0448\u0435\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <code>register_chrdev_region<\/code>, \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0435\u0442\u0435 \u0438\u0445, \u0438 <code>alloc_chrdev_region<\/code>, \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0445 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u043c.<\/p>\n<p>  \u0412\u0442\u043e\u0440\u044b\u043c \u044d\u0442\u0430\u043f\u043e\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 <code>struct cdev<\/code> \u0438 \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0435\u0451 \u0441 \u043d\u043e\u043c\u0435\u0440\u0430\u043c\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u042d\u0442\u0443 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434:<\/p>\n<pre><code class=\"cpp\">struct cdev *my_dev = cdev_alloc(); my_cdev->ops = &amp;my_fops;<\/code><\/pre>\n<p>  \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u043c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 <code>struct cdev<\/code> \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0432 \u0432\u0430\u0448\u0443 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u0443\u044e \u0441 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430\u043c \u0434\u043b\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 <code>cdev_init<\/code>.<\/p>\n<pre><code class=\"cpp\">void cdev_init(struct cdev *cdev, const struct file_operations *fops);<\/code><\/pre>\n<p>  \u041f\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>cdev_add<\/code>.<\/p>\n<pre><code class=\"cpp\">int cdev_add(struct cdev *p, dev_t dev, unsigned count);<\/code><\/pre>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 <i>ioctl.c<\/i>, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u043c \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 9.<\/p>\n<h3><font color=\"#3AC1EF\">\u258d 6.4 \u041e\u0442\u043c\u0435\u043d\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430<\/font><\/h3>\n<p>  \u041c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u044c \u0440\u0443\u0442-\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c (<code>rmmod<\/code>) \u043c\u043e\u0434\u0443\u043b\u044c \u044f\u0434\u0440\u0430 \u0432 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 \u0435\u043c\u0443 \u044d\u0442\u043e \u0432\u0437\u0434\u0443\u043c\u0430\u0435\u0442\u0441\u044f. \u0415\u0441\u043b\u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u043c\u043e\u0434\u0443\u043b\u044c \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f, \u043a\u043e\u0433\u0434\u0430 \u0444\u0430\u0439\u043b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043a\u0440\u044b\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c, \u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u0432\u044b\u0437\u043e\u0432\u0443 \u0438\u0437 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043f\u0430\u043c\u044f\u0442\u0438, \u0433\u0434\u0435 \u0440\u0430\u043d\u0435\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u043d\u0443\u0436\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f (\u0447\u0442\u0435\u043d\u0438\u044f\/\u0437\u0430\u043f\u0438\u0441\u0438). \u0412 \u043b\u0443\u0447\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u043a\u043e\u0434 \u0432 \u044d\u0442\u0443 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0435\u0449\u0451 \u0437\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0435 \u0431\u044b\u043b, \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443. \u0412 \u0445\u0443\u0434\u0448\u0435\u043c \u0436\u0435 \u0432 \u044d\u0442\u0443 \u043f\u0430\u043c\u044f\u0442\u044c \u0443\u0436\u0435 \u043c\u043e\u0433 \u0431\u044b\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d \u0434\u0440\u0443\u0433\u043e\u0439 \u043c\u043e\u0434\u0443\u043b\u044c, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u043f\u0435\u0440\u0435\u0441\u043a\u0430\u043a\u0438\u0432\u0430\u043d\u0438\u044e \u0432 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0443 \u0443\u0436\u0435 \u0438\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u044f\u0434\u0440\u0430, \u0432\u044b\u0437\u0432\u0430\u0432 \u043d\u0435\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u044b\u0439 \u0438 \u044f\u0432\u043d\u043e \u043d\u0435 \u0440\u0430\u0434\u0443\u0436\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<\/p>\n<p>  \u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u044c \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435, \u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0435 \u043a\u043e\u0434 \u043e\u0448\u0438\u0431\u043a\u0438 (\u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e) \u0438\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u044d\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 <code>cleanup_module<\/code> \u0442\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u043e \u043f\u0443\u0441\u0442\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f.<\/p>\n<p>  \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u0447\u0451\u0442\u0447\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u0442, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0432\u0430\u0448 \u043c\u043e\u0434\u0443\u043b\u044c. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432 3 \u043f\u043e\u043b\u0435 \u0432\u044b\u0432\u043e\u0434\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>cat \/proc\/modules<\/code> \u0438\u043b\u0438 <code>sudo lsmod<\/code>. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u043d\u0435 \u043d\u0443\u043b\u044c, \u0437\u043d\u0430\u0447\u0438\u0442, <code>rmmod<\/code> \u043f\u0440\u043e\u0432\u0430\u043b\u0438\u0442\u0441\u044f. \u0418\u043c\u0435\u0439\u0442\u0435 \u0432 \u0432\u0438\u0434\u0443, \u0447\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0441\u0447\u0451\u0442\u0447\u0438\u043a \u0432 <code>cleanup_module<\/code> \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u0437\u0430 \u0432\u0430\u0441 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u043c <code>sys_delete_module<\/code>, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c \u0432 <i><a href=\"https:\/\/git.kernel.org\/pub\/scm\/linux\/kernel\/git\/stable\/linux.git\/tree\/include\/linux\/syscalls.h\">include\/linux\/syscalls.h<\/a><\/i>. \u042d\u0442\u043e\u0442 \u0441\u0447\u0451\u0442\u0447\u0438\u043a \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u043e <i><a href=\"https:\/\/git.kernel.org\/pub\/scm\/linux\/kernel\/git\/stable\/linux.git\/tree\/include\/linux\/module.h\">include\/linux\/module.h<\/a><\/i> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0432\u0430\u043c \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0442\u044c, \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0442\u044c \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0435\u0433\u043e:<\/p>\n<ul>\n<li><code>try_module_get(THIS_MODULE)<\/code>: \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u0447\u0438\u0441\u043b\u043e \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0439 \u043a \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u043c\u043e\u0434\u0443\u043b\u044e;<\/li>\n<li><code>module_put(THIS_MODULE)<\/code>: \u0434\u0435\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u0447\u0438\u0441\u043b\u043e \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0439 \u043a \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u043c\u043e\u0434\u0443\u043b\u044e;<\/li>\n<li><code>module_refcount(THIS_MODULE)<\/code>: \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0447\u0438\u0441\u043b\u043e \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0439 \u043a \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u043c\u043e\u0434\u0443\u043b\u044e.<\/li>\n<\/ul>\n<p>  \u0412\u0430\u0436\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0442\u043e\u0447\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0430. \u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u0434\u0440\u0443\u0433 \u0443\u0442\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u0435\u0440\u043d\u044b\u0439 \u0441\u0447\u0451\u0442, \u0442\u043e \u0443\u0436\u0435 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c, \u0438 \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0445\u043e\u0434 \u2013 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043c\u043e\u0434\u0443\u043b\u044f \u0442\u0430\u043a\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0441 \u0432\u0430\u043c\u0438 \u0440\u0430\u043d\u043e \u0438\u043b\u0438 \u043f\u043e\u0437\u0434\u043d\u043e \u043d\u0435\u0438\u0437\u0431\u0435\u0436\u043d\u043e \u0441\u043b\u0443\u0447\u0438\u0442\u0441\u044f.<\/p>\n<h3><font color=\"#3AC1EF\">\u258d 6.5 chardev.c<\/font><\/h3>\n<p>  \u041a\u043e\u0434 \u043d\u0438\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 <code>chardev<\/code>. \u041c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0430\u043c\u043f \u0435\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430.<\/p>\n<pre><code class=\"cpp\">cat \/proc\/devices<\/code><\/pre>\n<p>  (\u041b\u0438\u0431\u043e \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439), \u0438 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0434\u043e\u0431\u0430\u0432\u0438\u0442 \u0432 \u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u043d \u0431\u044b\u043b \u0441\u0447\u0438\u0442\u0430\u043d. \u0417\u0430\u043f\u0438\u0441\u044c \u0432 \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b (\u0432\u0440\u043e\u0434\u0435 <code>echo \"hi\" > \/dev\/hello<\/code>) \u043c\u044b \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c, \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044f \u0442\u0430\u043a\u0438\u0435 \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u0438 \u0441\u043e\u043e\u0431\u0449\u0430\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u0430. \u041d\u0435 \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0439\u0442\u0435\u0441\u044c, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0432\u0438\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0432 \u0431\u0443\u0444\u0435\u0440 \u2013 \u043e\u043d\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f, \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u044e\u0449\u0435\u0435 \u0438\u0445 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u0412 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u0435 \u0431\u0435\u0437 \u0437\u0430\u0449\u0438\u0442\u044b \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0435 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u0443\u0447\u0430\u0441\u0442\u043a\u0443 \u043f\u0430\u043c\u044f\u0442\u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044e \u0433\u043e\u043d\u043a\u0438 \u0438 \u0441\u043d\u0438\u0437\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u0412 \u043c\u043e\u0434\u0443\u043b\u0435 \u044f\u0434\u0440\u0430 \u044d\u0442\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u043a \u043e\u0431\u0449\u0438\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c.<\/p>\n<p>  \u0420\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u043e\u043d\u0430 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0435\u043c \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430. \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0430\u0442\u043e\u043c\u0430\u0440\u043d\u0443\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0441 \u043e\u0431\u043c\u0435\u043d\u043e\u043c (CAS) \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 <code>CDEV_NOT_USED<\/code> \u0438 <code>CDEV_EXCLUSIVE_OPEN<\/code>, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c, \u043e\u0442\u043a\u0440\u044b\u0442 \u043b\u0438 \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0444\u0430\u0439\u043b \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439. CAS \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043f\u0430\u043c\u044f\u0442\u0438 \u0441 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0445 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u044d\u0442\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0430 \u043d\u0443\u0436\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 12.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041a\u043e\u0434 chardev.c<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">\/*  * chardev.c: \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442, \u0441\u043a\u043e\u043b\u044c\u043a\u043e  * \u0440\u0430\u0437 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b\u043e \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430.  *\/   #include &lt;linux\/cdev.h> #include &lt;linux\/delay.h> #include &lt;linux\/device.h> #include &lt;linux\/fs.h> #include &lt;linux\/init.h> #include &lt;linux\/irq.h> #include &lt;linux\/kernel.h> #include &lt;linux\/module.h> #include &lt;linux\/poll.h>   \/*  Prototypes \u2013 \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b .h *\/ static int device_open(struct inode *, struct file *); static int device_release(struct inode *, struct file *); static ssize_t device_read(struct file *, char __user *, size_t, loff_t *); static ssize_t device_write(struct file *, const char __user *, size_t,                             loff_t *);   #define SUCCESS 0 #define DEVICE_NAME \"chardev\" \/* \u0418\u043c\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u043a\u0430\u043a \u043e\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \/proc\/devices   *\/ #define BUF_LEN 80 \/* \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043b\u0438\u043d\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. *\/   \/* \u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043a\u0430\u043a static, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u0444\u0430\u0439\u043b\u0430. *\/   static int major; \/* \u0421\u0442\u0430\u0440\u0448\u0438\u0439 \u043d\u043e\u043c\u0435\u0440, \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u043d\u044b\u0439 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0443 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 *\/   enum {     CDEV_NOT_USED = 0,     CDEV_EXCLUSIVE_OPEN = 1, };   \/* \u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u043e? \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0439 \u043a \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0443. *\/ static atomic_t already_open = ATOMIC_INIT(CDEV_NOT_USED);   static char msg[BUF_LEN]; \/* msg, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0435. *\/   static struct class *cls;   static struct file_operations chardev_fops = {     .read = device_read,     .write = device_write,     .open = device_open,     .release = device_release, };   static int __init chardev_init(void) {     major = register_chrdev(0, DEVICE_NAME, &amp;chardev_fops);       if (major &lt; 0) {         pr_alert(\"Registering char device failed with %d\\n\", major);         return major;     }       pr_info(\"I was assigned major number %d.\\n\", major);       cls = class_create(THIS_MODULE, DEVICE_NAME);     device_create(cls, NULL, MKDEV(major, 0), NULL, DEVICE_NAME);       pr_info(\"Device created on \/dev\/%s\\n\", DEVICE_NAME);       return SUCCESS; }   static void __exit chardev_exit(void) {     device_destroy(cls, MKDEV(major, 0));     class_destroy(cls);       \/* \u041e\u0442\u043c\u0435\u043d\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. *\/     unregister_chrdev(major, DEVICE_NAME); }   \/* \u041c\u0435\u0442\u043e\u0434\u044b. *\/   \/* \u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0444\u0430\u0439\u043b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440  * \"sudo cat \/dev\/chardev\"  *\/ static int device_open(struct inode *inode, struct file *file) {     static int counter = 0;       if (atomic_cmpxchg(&amp;already_open, CDEV_NOT_USED, CDEV_EXCLUSIVE_OPEN))         return -EBUSY;       sprintf(msg, \"I already told you %d times Hello world!\\n\", counter++);     try_module_get(THIS_MODULE);       return SUCCESS; }   \/* \u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0444\u0430\u0439\u043b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. *\/ static int device_release(struct inode *inode, struct file *file) {     \/* \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u044b\u0437\u043e\u0432. *\/     atomic_set(&amp;already_open, CDEV_NOT_USED);       \/* \u0414\u0435\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0447\u0438\u0441\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0439, \u0438\u043d\u0430\u0447\u0435, \u043e\u0442\u043a\u0440\u044b\u0432 \u0444\u0430\u0439\u043b, \u0432\u044b \u0443\u0436\u0435      * \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u043c\u043e\u0434\u0443\u043b\u044c.      *\/     module_put(THIS_MODULE);       return SUCCESS; }   \/* \u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0436\u0435 \u043e\u0442\u043a\u0440\u044b\u043b \u0444\u0430\u0439\u043b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430,  * \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0438\u0437 \u043d\u0435\u0433\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c.  *\/ static ssize_t device_read(struct file *filp, \/* \u0441\u043c. include\/linux\/fs.h   *\/                            char __user *buffer, \/* \u0431\u0443\u0444\u0435\u0440 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u0445. *\/                            size_t length, \/* \u0434\u043b\u0438\u043d\u0430 \u0431\u0443\u0444\u0435\u0440\u0430.   *\/                            loff_t *offset) {     \/* \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u0430\u0439\u0442, \u043e\u0431\u044b\u0447\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u0432 \u0431\u0443\u0444\u0435\u0440. *\/     int bytes_read = 0;     const char *msg_ptr = msg;       if (!*(msg_ptr + *offset)) { \/* \u043c\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u043c\u0441\u044f \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f. *\/         *offset = 0; \/* \u0441\u0431\u0440\u043e\u0441 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f. *\/         return 0; \/* \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0446\u0430 \u0444\u0430\u0439\u043b\u0430. *\/     }       msg_ptr += *offset;       \/* \u041f\u043e\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0431\u0443\u0444\u0435\u0440. *\/     while (length &amp;&amp; *msg_ptr) {         \/* \u0411\u0443\u0444\u0435\u0440 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0430 \u043d\u0435 \u0432          * \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0435 \u044f\u0434\u0440\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435 \"*\" \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0422\u0443\u0442 133         * \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c put_user, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437          * \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430 \u044f\u0434\u0440\u0430 \u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0441\u0435\u0433\u043c\u0435\u043d\u0442.          *\/         put_user(*(msg_ptr++), buffer++);         length--;         bytes_read++;     }       *offset += bytes_read;       \/* \u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0447\u0442\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0431\u0430\u0439\u0442, \u043f\u043e\u043c\u0435\u0449\u0451\u043d\u043d\u044b\u0445 \u0432 \u0431\u0443\u0444\u0435\u0440. *\/     return bytes_read; }   \/* \u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0444\u0430\u0439\u043b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430: echo \"hi\" > \/dev\/hello *\/ static ssize_t device_write(struct file *filp, const char __user *buff,                             size_t len, loff_t *off) {     pr_alert(\"Sorry, this operation is not supported.\\n\");     return -EINVAL; }   module_init(chardev_init); module_exit(chardev_exit);   MODULE_LICENSE(\"GPL\");<\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  <\/p>\n<h3><font color=\"#3AC1EF\">\u258d 6.6 \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0434\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 \u044f\u0434\u0440\u0430<\/font><\/h3>\n<p>  \u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b, \u044f\u0432\u043b\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f\u0434\u0440\u043e \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c, \u043e\u0431\u044b\u0447\u043d\u043e \u0441\u0440\u0435\u0434\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f. \u0418\u043d\u043e\u0433\u0434\u0430 \u043c\u043e\u0433\u0443\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043d\u043e\u0432\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b, \u043d\u043e \u0441\u0442\u0430\u0440\u044b\u0435, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443. \u042d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u2013 \u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u044f\u0434\u0440\u0430 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u043d\u0430\u0440\u0443\u0448\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432. \u0424\u0430\u0439\u043b\u044b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0442\u0430\u043a\u0436\u0435 \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u043d\u044b\u043c\u0438. \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u044f\u0434\u0440\u0430 \u043c\u0435\u0436\u0434\u0443 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 \u0432\u043f\u043e\u043b\u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f.<\/p>\n<p>  \u0420\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u044f\u0434\u0440\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e \u0438\u043c\u0435\u044e\u0442 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439 \u043e\u0442\u043b\u0438\u0447\u0438\u044f, \u0438 \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439, \u0442\u043e \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438. \u0414\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u043f\u0443\u0442\u0451\u043c \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u0430\u043a\u0440\u043e\u0441\u0430 <code>LINUX_VERSION_CODE<\/code> \u0441 \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u043c <code>KERNEL_VERSION<\/code>. \u0412 \u0432\u0435\u0440\u0441\u0438\u0438 <code>a.b.c<\/code> \u044f\u0434\u0440\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u0430\u043a\u0440\u043e\u0441\u0430 \u0431\u0443\u0434\u0435\u0442 <i>2<sup>16<\/sup>a + 2<sup>8<\/sup>b + \u0441<\/i>.<\/p>\n<h2><font color=\"#3AC1EF\">\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435<\/font><\/h2>\n<p>  \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0451\u0442 \u043e \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 <code>\/proc<\/code>, \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438 \u0441 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c <code>sysfs<\/code>, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432.  <\/p>\n<blockquote><p><b><font color=\"#3AC1EF\"><a href=\"https:\/\/bit.ly\/3uL5ZOg\">\u041c\u043e\u0449\u043d\u044b\u0435 VPS \u043d\u0430 SSD<\/a> \u0441\u043e \u0441\u043a\u0438\u0434\u043a\u0430\u043c\u0438 \u0434\u043e 53%. \u041f\u0430\u043d\u0435\u043b\u044c ISPmanager \u0432 \u043f\u043e\u0434\u0430\u0440\u043e\u043a*<\/font><\/b>. <\/p><\/blockquote>\n<p><a href=\"http:\/\/ruvds.com\/ru-rub?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=Bright_Translate&amp;utm_content=posobie_po_programmirovaniyu_modulej_yadra_linux_ch_2\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/sz\/7j\/pf\/sz7jpfj8i1pa6ocj-eia09dev4q.png\" data-src=\"https:\/\/habrastorage.org\/webt\/sz\/7j\/pf\/sz7jpfj8i1pa6ocj-eia09dev4q.png\"\/><\/a><\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/683106\/\"> https:\/\/habr.com\/ru\/company\/ruvds\/blog\/683106\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/683106\/\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/-7\/yl\/hp\/-7ylhpzc6raohz-vopxottyejfu.png\" data-src=\"https:\/\/habrastorage.org\/webt\/-7\/yl\/hp\/-7ylhpzc6raohz-vopxottyejfu.png\"\/><\/div>\n<p><\/a><br \/>  \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u043f\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u044f\u0434\u0440\u0430 \u043e\u0442 2 \u0438\u044e\u043b\u044f 2022. \u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u0443\u0437\u043d\u0430\u0435\u043c, \u0447\u0435\u043c \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u044f\u0434\u0440\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u0430\u043c\u044f\u0442\u0438. \u0412\u0442\u043e\u0440\u0430\u044f \u0436\u0435 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 \u043e\u0434\u043d\u043e\u043c\u0443 \u0438\u0437 \u0442\u0438\u043f\u043e\u0432 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u2014 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u043e\u0441\u043d\u043e\u0432\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-337280","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/337280","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=337280"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/337280\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=337280"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=337280"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=337280"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}