{"id":457399,"date":"2025-04-25T15:04:38","date_gmt":"2025-04-25T15:04:38","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=457399"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=457399","title":{"rendered":"<span>\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b Linux, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u043d\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/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-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041c\u043d\u043e\u0433\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432 Linux-\u0441\u0440\u0435\u0434\u0435, \u043d\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0433\u043b\u0443\u0431\u043e\u043a\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u044e\u0442, \u043a\u0430\u043a \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u041e\u0421 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u043d\u0438\u0437\u043a\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435. \u041d\u0430 \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f\u0445 \u0432\u0441\u0451 \u0447\u0430\u0449\u0435 \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044e\u0442 \u043f\u0440\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b Linux. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a\u0438\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0438 \u043a\u0430\u043a \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442.<\/p>\n<p>\u042d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0420\u043e\u0430\u0434\u043c\u044d\u043f \u0438 \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u0445.<\/p>\n<p><strong>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/strong><\/p>\n<ol>\n<li>\n<p><a href=\"#why_matter\">\u041f\u043e\u0447\u0435\u043c\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u0432\u0430\u0436\u043d\u044b<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#work_with_file\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u043c\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#threads_processes\">\u041f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0438 \u043f\u043e\u0442\u043e\u043a\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#ipc\">\u041c\u0435\u0436\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043d\u043e\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 (IPC)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#inotify\">\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#containers\">\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f: namespaces \u0438 cgroups<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#memory\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043f\u0430\u043c\u044f\u0442\u044c\u044e<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#rules\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#signals\">\u0421\u0438\u0433\u043d\u0430\u043b\u044b \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#multiplexing\">\u041c\u0443\u043b\u044c\u0442\u0438\u043f\u043b\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#time\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#libc\">\u0412\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u0447\u0435\u0440\u0435\u0437 libc<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#interface\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#questions\">\u0412\u043e\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f\u0445 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043e\u0442\u0432\u0435\u0442\u043e\u0432<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#books\">\u041a\u043d\u0438\u0433\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#conclusion\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/a><\/p>\n<\/li>\n<\/ol>\n<p><a class=\"anchor\" name=\"why_matter\" id=\"why_matter\"><\/a><\/p>\n<h3>\u041f\u043e\u0447\u0435\u043c\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u0432\u0430\u0436\u043d\u044b<\/h3>\n<p>\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b (syscalls) \u2014 \u044d\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e\u043c \u0438 \u044f\u0434\u0440\u043e\u043c \u041e\u0421. \u0427\u0435\u0440\u0435\u0437 \u043d\u0438\u0445 Python (\u0438 \u043b\u044e\u0431\u0430\u044f \u0434\u0440\u0443\u0433\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430) \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c: \u0444\u0430\u0439\u043b\u0430\u043c, \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c, \u043f\u0430\u043c\u044f\u0442\u0438, \u0441\u0435\u0442\u0438 \u0438 \u0434\u0440. \u0414\u0430\u0436\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 <code>open('file.txt')<\/code> \u0432 Python \u0432 \u0438\u0442\u043e\u0433\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u043c\u0443 \u0432\u044b\u0437\u043e\u0432\u0443 <code>open()<\/code> \u044f\u0434\u0440\u0430.<\/p>\n<p>\u042d\u0442\u0438 \u0437\u043d\u0430\u043d\u0438\u044f \u0432\u0430\u0436\u043d\u044b \u043a\u0430\u043a \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u0442\u0430\u043a \u0438 \u0434\u043b\u044f \u043f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439.<\/p>\n<p>\u041c\u043d\u043e\u0433\u0438\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0441\u0447\u0438\u0442\u0430\u044e\u0442, \u0447\u0442\u043e \u044d\u0442\u043e \u0432\u0441\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f senior-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u043d\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0431\u0430\u0437\u0430 \u043d\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u0430 \u043a \u043a\u0430\u043a\u043e\u043c\u0443-\u0442\u043e \u0433\u0440\u0435\u0439\u0434\u0443. \u0418\u043d\u0430\u0447\u0435 \u043f\u043e\u0441\u043b\u0435 \u0412\u0423\u0417\u043e\u0432 \u043c\u044b \u0431\u044b \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u0438 senior-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432.<\/p>\n<p><a class=\"anchor\" name=\"work_with_file\" id=\"work_with_file\"><\/a><\/p>\n<h3>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u043c\u0438<\/h3>\n<ul>\n<li>\n<p><code>open()<\/code> \u2014 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0444\u0430\u0439\u043b, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440.<\/p>\n<\/li>\n<li>\n<p><code>read()<\/code>, <code>write()<\/code> \u2014 \u0447\u0442\u0435\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u043c\u0443 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u0443.<\/p>\n<\/li>\n<li>\n<p><code>close()<\/code> \u2014 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440.<\/p>\n<\/li>\n<li>\n<p><code>lseek()<\/code> \u2014 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0447\u0442\u0435\u043d\u0438\u044f\/\u0437\u0430\u043f\u0438\u0441\u0438.<\/p>\n<\/li>\n<li>\n<p><code>stat()<\/code>, <code>fstat()<\/code> \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430.<\/p>\n<\/li>\n<li>\n<p><code>unlink()<\/code> \u2014 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 (\u0430\u043d\u0430\u043b\u043e\u0433 <code>rm<\/code>).<\/p>\n<\/li>\n<li>\n<p><code>mkdir()<\/code>, <code>rmdir()<\/code>, <code>rename()<\/code> \u2014 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><code>ftruncate()<\/code>, <code>truncate()<\/code> \u2014 \u0443\u0441\u0435\u0447\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430. \u0427\u0430\u0441\u0442\u043e <code>ftruncate()<\/code>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 <code>mmap()<\/code> \u043a\u0430\u043a \u0431\u0430\u0437\u0430 \u0434\u043b\u044f zero-copy append \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u043a\u043e\u043b\u044c\u0446\u0435\u0432\u044b\u0445 \u0431\u0443\u0444\u0435\u0440\u043e\u0432 (ring-buffer).<\/p>\n<\/li>\n<li>\n<p><code>fsync()<\/code>, <code>fdatasync()<\/code> \u2014 \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0431\u0443\u0444\u0435\u0440\u0430 \u043d\u0430 \u0434\u0438\u0441\u043a.<\/p>\n<\/li>\n<li>\n<p><code>sync()<\/code> \u2014 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043d\u0430 \u0434\u0438\u0441\u043a.<\/p>\n<\/li>\n<li>\n<p><code>fadvise()<\/code> \u2014 \u0434\u0430\u0451\u0442 \u044f\u0434\u0440\u0443 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u043f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0433\u043e \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0444\u0430\u0439\u043b\u0443.<\/p>\n<\/li>\n<li>\n<p><code>fallocate()<\/code> \u2014 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043c\u0435\u0441\u0442\u0430 \u0434\u043b\u044f \u0444\u0430\u0439\u043b\u0430.<\/p>\n<\/li>\n<li>\n<p><code>fcntl()<\/code> \u2014 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0445 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"threads_processes\" id=\"threads_processes\"><\/a><\/p>\n<h3>\u041f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0438 \u043f\u043e\u0442\u043e\u043a\u0438<\/h3>\n<ul>\n<li>\n<p><code>fork()<\/code> \u2014 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043a\u043e\u043f\u0438\u044e \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p><code>execve()<\/code> \u2014 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043d\u043e\u0432\u044b\u043c.<\/p>\n<\/li>\n<li>\n<p><code>wait()<\/code>, <code>waitpid()<\/code> \u2014 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p><code>_exit()<\/code> \u2014 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p><code>clone()<\/code> \u2014 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0439 \u0432\u044b\u0437\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u0442\u043e\u043a\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><code>getpid()<\/code>, <code>getppid()<\/code> \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 PID \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p><code>gettid()<\/code> \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 Thread ID (\u0432\u0430\u0436\u043d\u043e \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438).<\/p>\n<\/li>\n<li>\n<p><code>prctl()<\/code> \u2014 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 (\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438\u043c\u0435\u043d\u0438, \u0437\u0430\u043f\u0440\u0435\u0442 core dump \u0438 \u0434\u0440.).<\/p>\n<\/li>\n<li>\n<p><code>tgkill()<\/code> \u2014 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u043f\u043e\u0442\u043e\u043a\u0443.<\/p>\n<\/li>\n<li>\n<p><code>prlimit()<\/code> \u2014 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u043d\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"ipc\" id=\"ipc\"><\/a><\/p>\n<h3>\u041c\u0435\u0436\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043d\u043e\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 (IPC)<\/h3>\n<ul>\n<li>\n<p><code>pipe()<\/code> \u2014 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u0430\u043d\u0430\u043b\u0430 \u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><code>dup()<\/code>, <code>dup2()<\/code> \u2014 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0445 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><code>socket()<\/code>, <code>bind()<\/code>, <code>listen()<\/code>, <code>accept()<\/code>, <code>connect()<\/code> \u2014 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0441\u0435\u0442\u0435\u0432\u044b\u043c\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><code>send()<\/code>, <code>recv()<\/code> \u2014 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0441\u043e\u043a\u0435\u0442\u0430\u043c.<\/p>\n<\/li>\n<li>\n<p><code>sendmsg()<\/code>, <code>recvmsg()<\/code> \u2014 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p><code>shutdown()<\/code> \u2014 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><code>mmap()<\/code> \u2014 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u0438\u043b\u0438 \u043f\u0430\u043c\u044f\u0442\u0438 \u0432 \u0430\u0434\u0440\u0435\u0441\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e.<\/p>\n<\/li>\n<li>\n<p><code>eventfd()<\/code>, <code>signalfd()<\/code>, <code>timerfd()<\/code> \u2014 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0435 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u044b \u0434\u043b\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u0438 \u0442\u0430\u0439\u043c\u0435\u0440\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"inotify\" id=\"inotify\"><\/a><\/p>\n<h3>\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c<\/h3>\n<ul>\n<li>\n<p><code>inotify_init()<\/code> \u2013 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c inotify \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440.<\/p>\n<\/li>\n<li>\n<p><code>inotify_add_watch(fd, path, mask)<\/code> \u2013 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435 \u0437\u0430 <code>path<\/code> \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c\u0438 (<code>mask<\/code>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>IN_MODIFY<\/code>, <code>IN_CREATE<\/code> \u0438 \u0442.\u0434.).<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"containers\" id=\"containers\"><\/a><\/p>\n<h3>\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f: namespaces \u0438 cgroups<\/h3>\n<ul>\n<li>\n<p><code>unshare()<\/code> \u2014 \u043e\u0442\u0434\u0435\u043b\u044f\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432 \u043d\u043e\u0432\u044b\u0439 namespace (UTS, IPC, mount, user, PID, network \u0438 \u0434\u0440.).<\/p>\n<\/li>\n<li>\n<p><code>setns()<\/code> \u2014 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c\u0443 namespace.<\/p>\n<\/li>\n<li>\n<p><code>clone()<\/code> \u0441 \u0444\u043b\u0430\u0433\u0430\u043c\u0438 <code>CLONE_NEW*<\/code> \u2014 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0432 \u043d\u043e\u0432\u044b\u0445 namespaces.<\/p>\n<\/li>\n<li>\n<p><code>mount()<\/code> \u0438 <code>umount2()<\/code> \u2014 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0440\u0430\u0437\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c (\u0447\u0430\u0441\u0442\u043e \u0432 <code>mount<\/code> namespace).<\/p>\n<\/li>\n<li>\n<p><code>pivot_root()<\/code> \u2014 \u0437\u0430\u043c\u0435\u043d\u0430 \u043a\u043e\u0440\u043d\u044f \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0424\u0421 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430.<\/p>\n<\/li>\n<li>\n<p><code>chroot()<\/code> \u2014 \u0443\u043f\u0440\u043e\u0449\u0451\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f <code>pivot_root()<\/code>.<\/p>\n<\/li>\n<li>\n<p><code>cgcreate<\/code>, <code>cgroupfs<\/code>, <code>cgroup_add_task()<\/code> (\u0447\u0435\u0440\u0435\u0437 \u0444\u0430\u0439\u043b\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 <code>\/sys\/fs\/cgroup<\/code>) \u2014 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 cgroups (\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 CPU, \u043f\u0430\u043c\u044f\u0442\u0438, IO). <code>cgroups<\/code> \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0444\u0430\u0439\u043b\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 <code>\/sys\/fs\/cgroup<\/code>, \u043d\u043e \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0442\u0430\u043a\u0438\u0435 \u0432\u044b\u0437\u043e\u0432\u044b, \u043a\u0430\u043a <code>mount<\/code>, <code>open<\/code>, <code>write<\/code>, <code>prlimit<\/code> \u0438 <code>clone<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"memory\" id=\"memory\"><\/a><\/p>\n<h3>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043f\u0430\u043c\u044f\u0442\u044c\u044e<\/h3>\n<ul>\n<li>\n<p><code>mmap()<\/code>, <code>munmap()<\/code> \u2014 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p><code>brk()<\/code>, <code>sbrk()<\/code> \u2014 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u043a\u0443\u0447\u0438. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435 \u0432 <code>malloc()<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"rules\" id=\"rules\"><\/a><\/p>\n<h3>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438<\/h3>\n<ul>\n<li>\n<p><code>getuid()<\/code>, <code>geteuid()<\/code>, <code>getgid()<\/code> \u2014 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\/\u0433\u0440\u0443\u043f\u043f\u044b.<\/p>\n<\/li>\n<li>\n<p><code>setuid()<\/code>, <code>setgid()<\/code> \u2014 \u0441\u043c\u0435\u043d\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\/\u0433\u0440\u0443\u043f\u043f\u044b.<\/p>\n<\/li>\n<li>\n<p><code>chmod()<\/code>, <code>chown()<\/code> \u2014 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><code>umask()<\/code> \u2014 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043c\u0430\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><code>setrlimit()<\/code> \u2014 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043b\u0438\u043c\u0438\u0442\u043e\u0432 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 (CPU, \u043f\u0430\u043c\u044f\u0442\u044c \u0438 \u0442.\u043f.).<\/p>\n<\/li>\n<li>\n<p><code>capget()<\/code>, <code>capset()<\/code> \u2014 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 capability-\u043c\u043e\u0434\u0435\u043b\u044c\u044e (\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0439).<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"signals\" id=\"signals\"><\/a><\/p>\n<h3>\u0421\u0438\u0433\u043d\u0430\u043b\u044b \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438<\/h3>\n<ul>\n<li>\n<p><code>kill()<\/code> \u2014 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0443.<\/p>\n<\/li>\n<li>\n<p><code>tgkill()<\/code> \u2014 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u043f\u043e\u0442\u043e\u043a\u0443 (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u043c \u043a\u043e\u0434\u0435).<\/p>\n<\/li>\n<li>\n<p><code>signal()<\/code>, <code>sigaction()<\/code> \u2014 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><code>signalfd()<\/code> \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u043a\u0430\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440.<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"multiplexing\" id=\"multiplexing\"><\/a><\/p>\n<h3>\u041c\u0443\u043b\u044c\u0442\u0438\u043f\u043b\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430<\/h3>\n<ul>\n<li>\n<p><code>select()<\/code> \u2014 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 I\/O.<\/p>\n<\/li>\n<li>\n<p><code>poll()<\/code>, <code>epoll_wait()<\/code> \u2014 \u0431\u043e\u043b\u0435\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0430\u043d\u0430\u043b\u043e\u0433\u0438 select.<\/p>\n<\/li>\n<li>\n<p><code>epoll_create1()<\/code>, <code>epoll_ctl()<\/code> \u2014 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 epoll.<\/p>\n<\/li>\n<li>\n<p><code>splice()<\/code> \u2014 zero-copy \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u043c\u0438 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><code>io_uring<\/code> \u2014 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e I\/O, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u043d\u0438\u0437\u043a\u0438\u0435 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u0438 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0441\u0442\u0435\u043a\u0430\u0445.<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"time\" id=\"time\"><\/a><\/p>\n<h3>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c<\/h3>\n<ul>\n<li>\n<p><code>clock_gettime()<\/code> \u2014 \u0442\u043e\u0447\u043d\u043e\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<\/li>\n<li>\n<p><code>nanosleep()<\/code> \u2014 \u043f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0430 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f.<\/p>\n<\/li>\n<li>\n<p><code>gettimeofday()<\/code> \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445 (\u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0430\u044e\u0449\u0438\u0439, \u043d\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f).<\/p>\n<\/li>\n<li>\n<p><code>timerfd_create()<\/code> \u2014 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0433\u043e \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u0430 \u0441 \u0442\u0430\u0439\u043c\u0435\u0440\u043e\u043c (\u0443\u0434\u043e\u0431\u043d\u043e \u0432 event loop).<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"libc\" id=\"libc\"><\/a><\/p>\n<h3>\u0412\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u0447\u0435\u0440\u0435\u0437 libc<\/h3>\n<p>\u0425\u043e\u0442\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>malloc()<\/code>, <code>calloc()<\/code>, <code>realloc()<\/code> \u0438 <code>free()<\/code> \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u043c\u0438 \u0432\u044b\u0437\u043e\u0432\u0430\u043c\u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043f\u043e\u0432\u0435\u0440\u0445 \u043d\u0438\u0445. \u042d\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u2014 \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <code>libc<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <code>brk()<\/code> \u0438 <code>mmap()<\/code> \u0434\u043b\u044f \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<ul>\n<li>\n<p><code>malloc(size)<\/code> \u2014 \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442 \u0431\u043b\u043e\u043a \u043f\u0430\u043c\u044f\u0442\u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430.<\/p>\n<\/li>\n<li>\n<p><code>calloc(n, size)<\/code> \u2014 \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442 \u0438 \u043e\u0431\u043d\u0443\u043b\u044f\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u044c \u043f\u043e\u0434 \u043c\u0430\u0441\u0441\u0438\u0432.<\/p>\n<\/li>\n<li>\n<p><code>realloc(ptr, new_size)<\/code> \u2014 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0440 \u0440\u0430\u043d\u0435\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430.<\/p>\n<\/li>\n<li>\n<p><code>free(ptr)<\/code> \u2014 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u044c.<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043e\u0431\u044a\u0451\u043c\u0430\u0445 <code>malloc()<\/code> \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>mmap()<\/code> \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u0430 \u043d\u0435 <code>brk()<\/code> \u2014 \u044d\u0442\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0430\u043b\u043b\u043e\u043a\u0430\u0442\u043e\u0440\u0430 (<code>ptmalloc<\/code>, <code>jemalloc<\/code>, <code>tcmalloc<\/code>). \u042d\u0442\u043e \u0432\u0430\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0443\u0442\u0435\u0447\u0435\u043a \u043f\u0430\u043c\u044f\u0442\u0438 \u0438\u043b\u0438 \u0442\u044e\u043d\u0438\u043d\u0433\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e:<\/p>\n<ul>\n<li>\n<p><code>mlock()<\/code> \u2014 \u0437\u0430\u0449\u0438\u0442\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u043e\u0442 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0432 swap.<\/p>\n<\/li>\n<li>\n<p><code>mprotect()<\/code> \u2014 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430.<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"interface\" id=\"interface\"><\/a><\/p>\n<h3>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439<\/h3>\n<ul>\n<li>\n<p><code>procfs<\/code> (<code>\/proc<\/code>) \u2014 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0444\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u0445 \u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u044f\u0434\u0440\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430, \u043e\u0442\u043b\u0430\u0434\u043a\u0438, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f PID, \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043f\u0430\u043c\u044f\u0442\u0438, \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445 \u0438 \u0442.\u0434.<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"questions\" id=\"questions\"><\/a><\/p>\n<h3>\u0412\u043e\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f\u0445 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043e\u0442\u0432\u0435\u0442\u043e\u0432<\/h3>\n<h4>\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 fork() \u0438 \u0447\u0435\u043c \u043e\u043d \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 exec()?<\/h4>\n<p><code>fork()<\/code> \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043a\u043e\u043f\u0438\u044e \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, <code>exec()<\/code> \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043d\u043e\u0432\u044b\u043c. \u041e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043d\u043e\u0432\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0432 \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435.<\/p>\n<h4>\u041a\u0430\u043a Python \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u041e\u0421?<\/h4>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 <code>open()<\/code>, <code>read()<\/code>, <code>write()<\/code> \u0438 \u0434\u0440. \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043e\u0431\u0451\u0440\u0442\u043a\u0438 \u043d\u0430\u0434 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u043c\u0438 \u0432\u044b\u0437\u043e\u0432\u0430\u043c\u0438 <code>open<\/code>, <code>read<\/code>, <code>write<\/code>, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0435 glibc.<\/p>\n<h4>\u0427\u0435\u043c \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f select \u043e\u0442 epoll?<\/h4>\n<p><code>select<\/code> \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u043e\u0432 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d 1024 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u0430\u043c\u0438. <code>epoll<\/code> \u2014 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439. <code>io_uring<\/code> \u2014 \u0435\u0449\u0451 \u0431\u043e\u043b\u0435\u0435 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0430\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u043c\u0438 \u0440\u0430\u0441\u0445\u043e\u0434\u0430\u043c\u0438.<\/p>\n<h4>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 mmap \u0438 \u0433\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f?<\/h4>\n<p><code>mmap()<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0432 \u043f\u0430\u043c\u044f\u0442\u044c, \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438.<\/p>\n<h4>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 brk() \u0438 \u043a\u0430\u043a \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f?<\/h4>\n<p><code>brk()<\/code> \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u0442 \u0438\u043b\u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442 \u043a\u0443\u0447\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 <code>malloc()<\/code> \u0434\u043b\u044f \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<h4>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 malloc() \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c?<\/h4>\n<p>\u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442 <code>brk()<\/code> \u0438\u043b\u0438 <code>mmap()<\/code> \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u0438\u0437 \u044f\u0434\u0440\u0430. \u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435 \u0431\u043b\u043e\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 <code>brk()<\/code>, \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u2014 \u0447\u0435\u0440\u0435\u0437 <code>mmap()<\/code>.<\/p>\n<h4>\u041a\u0430\u043a\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0441\u043e\u043a\u0435\u0442\u0430\u043c\u0438 \u0432 Python?<\/h4>\n<p><code>socket()<\/code>, <code>bind()<\/code>, <code>connect()<\/code>, <code>accept()<\/code>, <code>send()<\/code>, <code>recv()<\/code> \u2014 \u0432\u0441\u0451 \u044d\u0442\u043e \u043e\u0431\u0451\u0440\u0442\u043a\u0438 \u043d\u0430\u0434 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u043c\u0438 \u0432\u044b\u0437\u043e\u0432\u0430\u043c\u0438.<\/p>\n<h4>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 mlock() \u0438 \u0433\u0434\u0435 \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e?<\/h4>\n<p><code>mlock()<\/code> \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u044c \u0432 RAM, \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u044f \u0435\u0451 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0443 \u0432 swap. \u0412\u0430\u0436\u043d\u043e \u0432 \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438, real-time \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u0438 \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h4>\u0417\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u0435\u043d mprotect()?<\/h4>\n<p>\u0414\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u043f\u0430\u043c\u044f\u0442\u0438 \u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0431\u0443\u0444\u0435\u0440.<\/p>\n<h4>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \/proc \u0438 \u043a\u0430\u043a \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c?<\/h4>\n<p>\u042d\u0442\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0444\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0438 \u044f\u0434\u0440\u0435. \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f: \u0447\u0442\u0435\u043d\u0438\u0435 <code>cmdline<\/code>, <code>status<\/code>, \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 <code>\/proc\/&lt;pid&gt;\/fd<\/code>.<\/p>\n<h4>\u041a\u0430\u043a\u0438\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u044e\u0442 \u0432 \u0438\u0437\u043e\u043b\u044f\u0446\u0438\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432?<\/h4>\n<p><code>clone()<\/code> \u0441 <code>CLONE_NEW*<\/code>, <code>unshare()<\/code>, <code>setns()<\/code>, <code>chroot()<\/code>, <code>pivot_root()<\/code> \u2014 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432.<\/p>\n<p><a class=\"anchor\" name=\"books\" id=\"books\"><\/a><\/p>\n<h3>\u041a\u043d\u0438\u0433\u0438<\/h3>\n<h4>\u041a\u043d\u0438\u0433\u0438 \u043f\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u043c \u0432\u044b\u0437\u043e\u0432\u0430\u043c Linux<\/h4>\n<ol>\n<li>\n<p><strong>\u00abLinux API. \u0418\u0441\u0447\u0435\u0440\u043f\u044b\u0432\u0430\u044e\u0449\u0435\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e\u00bb<\/strong><br \/><em>\u0410\u0432\u0442\u043e\u0440: \u041c\u0430\u0439\u043a\u043b \u041a\u0435\u0440\u0440\u0438\u0441\u043a<\/em><br \/>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u043c \u0432\u044b\u0437\u043e\u0432\u0430\u043c Linux, \u0432\u043a\u043b\u044e\u0447\u0430\u044f <code>fork()<\/code>, <code>exec()<\/code>, <code>mmap()<\/code>, <code>clone()<\/code> \u0438 \u0434\u0440\u0443\u0433\u0438\u0435. \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0438 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0439. \u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d, \u0445\u043e\u0442\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438 \u043e\u0442\u043c\u0435\u0447\u0430\u044e\u0442, \u0447\u0442\u043e \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u044b\u043c. <\/p>\n<\/li>\n<li>\n<p><strong>\u00abLinux Kernel Development\u00bb<\/strong><br \/><em>\u0410\u0432\u0442\u043e\u0440: \u0420\u043e\u0431\u0435\u0440\u0442 \u041b\u0430\u0432<\/em><br \/>\u0424\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u044f\u0434\u0440\u0430 Linux, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438, \u0430\u043d\u0430\u043b\u0438\u0437 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e.<\/p>\n<\/li>\n<li>\n<p><strong>\u00ab\u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e Linux\u00bb<\/strong><br \/><em>\u0410\u0432\u0442\u043e\u0440: <\/em>\u041a\u0435\u0442\u043e\u0432 \u0414\u043c\u0438\u0442\u0440\u0438\u0439 \u0412\u043b\u0430\u0434\u0438\u043c\u0438\u0440\u043e\u0432\u0438\u0447<br \/>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u044f\u0434\u0440\u0430 \u0438 \u0438\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0438 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0438, \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0438 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<\/ol>\n<h4>\u041a\u043d\u0438\u0433\u0438 \u043f\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438<\/h4>\n<ol>\n<li>\n<p><strong>\u00abThe Docker Book\u00bb<\/strong><br \/><em>\u0410\u0432\u0442\u043e\u0440: \u0414\u0436\u0435\u0439\u043c\u0441 \u0422\u0451\u0440\u043d\u0430<\/em><br \/>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e Docker, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443, \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u043c\u0435\u0442\u043e\u0434\u0438\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043c\u043d\u043e\u0433\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043a\u043e\u0434\u0430 \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438. <\/p>\n<\/li>\n<li>\n<p><strong>\u00abKubernetes: Up and Running\u00bb<\/strong><br \/><em>\u0410\u0432\u0442\u043e\u0440\u044b: \u041a\u043b\u0430\u0440\u0435\u043d\u0441 \u0414\u0440\u0430\u0433\u043e\u0432\u0438\u0447, \u0414\u0436\u043e\u0437\u0435\u0444 \u0414\u0436\u0435\u043a, \u041a\u0430\u0438\u0442\u043e \u0421\u0430\u043a\u0443\u0440\u043e<\/em><br \/>\u041f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043e\u0440\u043a\u0435\u0441\u0442\u0440\u0430\u0446\u0438\u0438 Kubernetes, \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439 \u0432 \u043c\u0438\u0440\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u041a\u043d\u0438\u0433\u0430 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043e\u0441\u0432\u043e\u0438\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Kubernetes.<\/p>\n<\/li>\n<\/ol>\n<p><a class=\"anchor\" name=\"conclusion\" id=\"conclusion\"><\/a><\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u2014 \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0430\u043a\u0430\u0434\u0435\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0437\u043d\u0430\u043d\u0438\u0435. \u042d\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u0430 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u041e\u0421, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c, \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438, \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438 \u0438\u043b\u0438 \u0441\u0435\u0442\u044f\u043c\u0438. \u0414\u0430\u0436\u0435 \u0432 Python, \u0433\u0434\u0435 \u043c\u043d\u043e\u0433\u043e\u0435 \u0430\u0431\u0441\u0442\u0440\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043e, \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0442\u0435 \u0436\u0435 \u0441\u0430\u043c\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u044f\u0434\u0440\u0430.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0440\u0430\u0441\u0442\u0438 \u043a\u0430\u043a \u0438\u043d\u0436\u0435\u043d\u0435\u0440 \u2014 \u0440\u0430\u0437\u0431\u0435\u0440\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u0430\u0448 \u043a\u043e\u0434 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u041e\u0421.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><\/p>\n<div class=\"tm-article-poll-container\"><!--[--><\/p>\n<div class=\"tm-article-poll tm-article-poll_variant-bordered\">\n<div class=\"tm-notice tm-notice_positive tm-article-poll__notice\"><!----><\/p>\n<div class=\"tm-notice__inner\"><!----><\/p>\n<div class=\"tm-notice__content\" data-test-id=\"notice-content\"><!--[--><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/companies\/beget\/articles\/903650\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><!--]--><\/div>\n<\/div>\n<\/div>\n<p><!--[--><\/p>\n<div class=\"tm-article-poll__header\">\u041a\u0430\u043a \u0432\u044b \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u0441\u044c \u043a io_uring?<\/div>\n<div class=\"tm-article-poll__answers\"><!--[--><\/p>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">8.82% <\/span><span class=\"tm-article-poll__answer-label\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0438 \u043a\u0430\u0439\u0444\u0443\u044e<\/span><span class=\"tm-article-poll__answer-votes\">3<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 8.82%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">14.71% <\/span><span class=\"tm-article-poll__answer-label\">\u041f\u043e\u043a\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0438\u0442\u0430\u043b\/\u0441\u043c\u043e\u0442\u0440\u0435\u043b \u0434\u043e\u043a\u043b\u0430\u0434\u044b<\/span><span class=\"tm-article-poll__answer-votes\">5<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 14.71%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">76.47% <\/span><span class=\"tm-article-poll__answer-label\">\u0421\u043b\u044b\u0448\u0430\u043b, \u043d\u043e \u043d\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043b\u0441\u044f<\/span><span class=\"tm-article-poll__answer-votes\">26<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width: 76.47%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">0% <\/span><span class=\"tm-article-poll__answer-label\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b, \u043d\u043e \u043e\u0442\u043a\u0430\u0437\u0430\u043b\u0441\u044f (\u043d\u0430\u043f\u0438\u0448\u0438 \u043f\u0440\u0438\u0447\u0438\u043d\u0443 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445)<\/span><span class=\"tm-article-poll__answer-votes\">0<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 0%\"><\/div>\n<\/div>\n<\/div>\n<p><!--]--><\/div>\n<div class=\"tm-article-poll__stats\"> \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 34 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.    \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0438\u0441\u044c 25 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. <\/div>\n<p><!--]--><\/div>\n<div class=\"tm-article-poll tm-article-poll_variant-bordered\">\n<div class=\"tm-notice tm-notice_positive tm-article-poll__notice\"><!----><\/p>\n<div class=\"tm-notice__inner\"><!----><\/p>\n<div class=\"tm-notice__content\" data-test-id=\"notice-content\"><!--[--><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/companies\/beget\/articles\/903650\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><!--]--><\/div>\n<\/div>\n<\/div>\n<p><!--[--><\/p>\n<div class=\"tm-article-poll__header\">\u041a\u0430\u043a\u043e\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Linux \u0432\u044b \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0435 \u00ab\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u043e\u043c\u00bb \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430?<\/div>\n<div class=\"tm-article-poll__answers\"><!--[--><\/p>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">77.14% <\/span><span class=\"tm-article-poll__answer-label\">\u041f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 fork(), exec()<\/span><span class=\"tm-article-poll__answer-votes\">27<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width: 77.14%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">22.86% <\/span><span class=\"tm-article-poll__answer-label\">\u0423\u043c\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 select()<\/span><span class=\"tm-article-poll__answer-votes\">8<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 22.86%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">25.71% <\/span><span class=\"tm-article-poll__answer-label\">\u0423\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 mmap, fcntl, statx<\/span><span class=\"tm-article-poll__answer-votes\">9<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 25.71%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">17.14% <\/span><span class=\"tm-article-poll__answer-label\">\u0417\u043d\u0430\u043d\u0438\u0435 clone, cgroups, io_uring, pivot_root<\/span><span class=\"tm-article-poll__answer-votes\">6<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 17.14%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">22.86% <\/span><span class=\"tm-article-poll__answer-label\">\u0412\u0441\u0451 \u0432\u044b\u0448\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435<\/span><span class=\"tm-article-poll__answer-votes\">8<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 22.86%\"><\/div>\n<\/div>\n<\/div>\n<p><!--]--><\/div>\n<div class=\"tm-article-poll__stats\"> \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 35 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.   \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0441\u044f 21 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c. <\/div>\n<p><!--]--><\/div>\n<div class=\"tm-article-poll tm-article-poll_variant-bordered\">\n<div class=\"tm-notice tm-notice_positive tm-article-poll__notice\"><!----><\/p>\n<div class=\"tm-notice__inner\"><!----><\/p>\n<div class=\"tm-notice__content\" data-test-id=\"notice-content\"><!--[--><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/companies\/beget\/articles\/903650\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><!--]--><\/div>\n<\/div>\n<\/div>\n<p><!--[--><\/p>\n<div class=\"tm-article-poll__header\">\u0427\u0442\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0432\u0430\u0441 \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u043b\u0438 \u043d\u0430 \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f\u0445?<\/div>\n<div class=\"tm-article-poll__answers\"><!--[--><\/p>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">21.43% <\/span><span class=\"tm-article-poll__answer-label\">fork \/ exec \u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c<\/span><span class=\"tm-article-poll__answer-votes\">6<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 21.43%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">7.14% <\/span><span class=\"tm-article-poll__answer-label\">mmap \u0438 zero-copy<\/span><span class=\"tm-article-poll__answer-votes\">2<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 7.14%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">14.29% <\/span><span class=\"tm-article-poll__answer-label\">\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 select \/ poll \/ epoll<\/span><span class=\"tm-article-poll__answer-votes\">4<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 14.29%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">14.29% <\/span><span class=\"tm-article-poll__answer-label\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 (getuid, setuid)<\/span><span class=\"tm-article-poll__answer-votes\">4<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 14.29%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">10.71% <\/span><span class=\"tm-article-poll__answer-label\">namespaces \u0438 cgroups<\/span><span class=\"tm-article-poll__answer-votes\">3<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 10.71%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">67.86% <\/span><span class=\"tm-article-poll__answer-label\">\u041d\u0438\u0447\u0435\u0433\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e<\/span><span class=\"tm-article-poll__answer-votes\">19<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width: 67.86%\"><\/div>\n<\/div>\n<\/div>\n<p><!--]--><\/div>\n<div class=\"tm-article-poll__stats\"> \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 28 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.   \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0441\u044f 21 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c. <\/div>\n<p><!--]--><\/div>\n<p><!--]--><\/div>\n<p> \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\/articles\/903650\/\"> https:\/\/habr.com\/ru\/articles\/903650\/<\/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-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041c\u043d\u043e\u0433\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0432 Linux-\u0441\u0440\u0435\u0434\u0435, \u043d\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0433\u043b\u0443\u0431\u043e\u043a\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u044e\u0442, \u043a\u0430\u043a \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u041e\u0421 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u043d\u0438\u0437\u043a\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435. \u041d\u0430 \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f\u0445 \u0432\u0441\u0451 \u0447\u0430\u0449\u0435 \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044e\u0442 \u043f\u0440\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b Linux. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a\u0438\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0438 \u043a\u0430\u043a \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442.<\/p>\n<p>\u042d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0420\u043e\u0430\u0434\u043c\u044d\u043f \u0438 \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u0445.<\/p>\n<p><strong>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/strong><\/p>\n<ol>\n<li>\n<p><a href=\"#why_matter\">\u041f\u043e\u0447\u0435\u043c\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u0432\u0430\u0436\u043d\u044b<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#work_with_file\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u043c\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#threads_processes\">\u041f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0438 \u043f\u043e\u0442\u043e\u043a\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#ipc\">\u041c\u0435\u0436\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043d\u043e\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 (IPC)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#inotify\">\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#containers\">\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f: namespaces \u0438 cgroups<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#memory\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043f\u0430\u043c\u044f\u0442\u044c\u044e<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#rules\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#signals\">\u0421\u0438\u0433\u043d\u0430\u043b\u044b \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#multiplexing\">\u041c\u0443\u043b\u044c\u0442\u0438\u043f\u043b\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#time\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#libc\">\u0412\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u0447\u0435\u0440\u0435\u0437 libc<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#interface\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#questions\">\u0412\u043e\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f\u0445 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043e\u0442\u0432\u0435\u0442\u043e\u0432<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#books\">\u041a\u043d\u0438\u0433\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#conclusion\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/a><\/p>\n<\/li>\n<\/ol>\n<p><a class=\"anchor\" name=\"why_matter\" id=\"why_matter\"><\/a><\/p>\n<h3>\u041f\u043e\u0447\u0435\u043c\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u0432\u0430\u0436\u043d\u044b<\/h3>\n<p>\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b (syscalls) \u2014 \u044d\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e\u043c \u0438 \u044f\u0434\u0440\u043e\u043c \u041e\u0421. \u0427\u0435\u0440\u0435\u0437 \u043d\u0438\u0445 Python (\u0438 \u043b\u044e\u0431\u0430\u044f \u0434\u0440\u0443\u0433\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430) \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c: \u0444\u0430\u0439\u043b\u0430\u043c, \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c, \u043f\u0430\u043c\u044f\u0442\u0438, \u0441\u0435\u0442\u0438 \u0438 \u0434\u0440. \u0414\u0430\u0436\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 <code>open('file.txt')<\/code> \u0432 Python \u0432 \u0438\u0442\u043e\u0433\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u043c\u0443 \u0432\u044b\u0437\u043e\u0432\u0443 <code>open()<\/code> \u044f\u0434\u0440\u0430.<\/p>\n<p>\u042d\u0442\u0438 \u0437\u043d\u0430\u043d\u0438\u044f \u0432\u0430\u0436\u043d\u044b \u043a\u0430\u043a \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435, \u0442\u0430\u043a \u0438 \u0434\u043b\u044f \u043f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439.<\/p>\n<p>\u041c\u043d\u043e\u0433\u0438\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0441\u0447\u0438\u0442\u0430\u044e\u0442, \u0447\u0442\u043e \u044d\u0442\u043e \u0432\u0441\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f senior-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u043d\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0431\u0430\u0437\u0430 \u043d\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u0430 \u043a \u043a\u0430\u043a\u043e\u043c\u0443-\u0442\u043e \u0433\u0440\u0435\u0439\u0434\u0443. \u0418\u043d\u0430\u0447\u0435 \u043f\u043e\u0441\u043b\u0435 \u0412\u0423\u0417\u043e\u0432 \u043c\u044b \u0431\u044b \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u0438 senior-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432.<\/p>\n<p><a class=\"anchor\" name=\"work_with_file\" id=\"work_with_file\"><\/a><\/p>\n<h3>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u043c\u0438<\/h3>\n<ul>\n<li>\n<p><code>open()<\/code> \u2014 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0444\u0430\u0439\u043b, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440.<\/p>\n<\/li>\n<li>\n<p><code>read()<\/code>, <code>write()<\/code> \u2014 \u0447\u0442\u0435\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u043c\u0443 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u0443.<\/p>\n<\/li>\n<li>\n<p><code>close()<\/code> \u2014 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440.<\/p>\n<\/li>\n<li>\n<p><code>lseek()<\/code> \u2014 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0447\u0442\u0435\u043d\u0438\u044f\/\u0437\u0430\u043f\u0438\u0441\u0438.<\/p>\n<\/li>\n<li>\n<p><code>stat()<\/code>, <code>fstat()<\/code> \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430.<\/p>\n<\/li>\n<li>\n<p><code>unlink()<\/code> \u2014 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 (\u0430\u043d\u0430\u043b\u043e\u0433 <code>rm<\/code>).<\/p>\n<\/li>\n<li>\n<p><code>mkdir()<\/code>, <code>rmdir()<\/code>, <code>rename()<\/code> \u2014 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><code>ftruncate()<\/code>, <code>truncate()<\/code> \u2014 \u0443\u0441\u0435\u0447\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430. \u0427\u0430\u0441\u0442\u043e <code>ftruncate()<\/code>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 <code>mmap()<\/code> \u043a\u0430\u043a \u0431\u0430\u0437\u0430 \u0434\u043b\u044f zero-copy append \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u043a\u043e\u043b\u044c\u0446\u0435\u0432\u044b\u0445 \u0431\u0443\u0444\u0435\u0440\u043e\u0432 (ring-buffer).<\/p>\n<\/li>\n<li>\n<p><code>fsync()<\/code>, <code>fdatasync()<\/code> \u2014 \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0431\u0443\u0444\u0435\u0440\u0430 \u043d\u0430 \u0434\u0438\u0441\u043a.<\/p>\n<\/li>\n<li>\n<p><code>sync()<\/code> \u2014 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043d\u0430 \u0434\u0438\u0441\u043a.<\/p>\n<\/li>\n<li>\n<p><code>fadvise()<\/code> \u2014 \u0434\u0430\u0451\u0442 \u044f\u0434\u0440\u0443 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u043f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0433\u043e \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0444\u0430\u0439\u043b\u0443.<\/p>\n<\/li>\n<li>\n<p><code>fallocate()<\/code> \u2014 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043c\u0435\u0441\u0442\u0430 \u0434\u043b\u044f \u0444\u0430\u0439\u043b\u0430.<\/p>\n<\/li>\n<li>\n<p><code>fcntl()<\/code> \u2014 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0445 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"threads_processes\" id=\"threads_processes\"><\/a><\/p>\n<h3>\u041f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0438 \u043f\u043e\u0442\u043e\u043a\u0438<\/h3>\n<ul>\n<li>\n<p><code>fork()<\/code> \u2014 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043a\u043e\u043f\u0438\u044e \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p><code>execve()<\/code> \u2014 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043d\u043e\u0432\u044b\u043c.<\/p>\n<\/li>\n<li>\n<p><code>wait()<\/code>, <code>waitpid()<\/code> \u2014 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p><code>_exit()<\/code> \u2014 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p><code>clone()<\/code> \u2014 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0439 \u0432\u044b\u0437\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u0442\u043e\u043a\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><code>getpid()<\/code>, <code>getppid()<\/code> \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 PID \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p><code>gettid()<\/code> \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 Thread ID (\u0432\u0430\u0436\u043d\u043e \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438).<\/p>\n<\/li>\n<li>\n<p><code>prctl()<\/code> \u2014 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 (\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438\u043c\u0435\u043d\u0438, \u0437\u0430\u043f\u0440\u0435\u0442 core dump \u0438 \u0434\u0440.).<\/p>\n<\/li>\n<li>\n<p><code>tgkill()<\/code> \u2014 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u043f\u043e\u0442\u043e\u043a\u0443.<\/p>\n<\/li>\n<li>\n<p><code>prlimit()<\/code> \u2014 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u043d\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"ipc\" id=\"ipc\"><\/a><\/p>\n<h3>\u041c\u0435\u0436\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043d\u043e\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 (IPC)<\/h3>\n<ul>\n<li>\n<p><code>pipe()<\/code> \u2014 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u0430\u043d\u0430\u043b\u0430 \u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><code>dup()<\/code>, <code>dup2()<\/code> \u2014 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0445 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><code>socket()<\/code>, <code>bind()<\/code>, <code>listen()<\/code>, <code>accept()<\/code>, <code>connect()<\/code> \u2014 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0441\u0435\u0442\u0435\u0432\u044b\u043c\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><code>send()<\/code>, <code>recv()<\/code> \u2014 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0441\u043e\u043a\u0435\u0442\u0430\u043c.<\/p>\n<\/li>\n<li>\n<p><code>sendmsg()<\/code>, <code>recvmsg()<\/code> \u2014 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p><code>shutdown()<\/code> \u2014 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><code>mmap()<\/code> \u2014 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u0438\u043b\u0438 \u043f\u0430\u043c\u044f\u0442\u0438 \u0432 \u0430\u0434\u0440\u0435\u0441\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e.<\/p>\n<\/li>\n<li>\n<p><code>eventfd()<\/code>, <code>signalfd()<\/code>, <code>timerfd()<\/code> \u2014 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0435 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u044b \u0434\u043b\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u0438 \u0442\u0430\u0439\u043c\u0435\u0440\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"inotify\" id=\"inotify\"><\/a><\/p>\n<h3>\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c<\/h3>\n<ul>\n<li>\n<p><code>inotify_init()<\/code> \u2013 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c inotify \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440.<\/p>\n<\/li>\n<li>\n<p><code>inotify_add_watch(fd, path, mask)<\/code> \u2013 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435 \u0437\u0430 <code>path<\/code> \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c\u0438 (<code>mask<\/code>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>IN_MODIFY<\/code>, <code>IN_CREATE<\/code> \u0438 \u0442.\u0434.).<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"containers\" id=\"containers\"><\/a><\/p>\n<h3>\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f: namespaces \u0438 cgroups<\/h3>\n<ul>\n<li>\n<p><code>unshare()<\/code> \u2014 \u043e\u0442\u0434\u0435\u043b\u044f\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432 \u043d\u043e\u0432\u044b\u0439 namespace (UTS, IPC, mount, user, PID, network \u0438 \u0434\u0440.).<\/p>\n<\/li>\n<li>\n<p><code>setns()<\/code> \u2014 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c\u0443 namespace.<\/p>\n<\/li>\n<li>\n<p><code>clone()<\/code> \u0441 \u0444\u043b\u0430\u0433\u0430\u043c\u0438 <code>CLONE_NEW*<\/code> \u2014 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0432 \u043d\u043e\u0432\u044b\u0445 namespaces.<\/p>\n<\/li>\n<li>\n<p><code>mount()<\/code> \u0438 <code>umount2()<\/code> \u2014 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0440\u0430\u0437\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c (\u0447\u0430\u0441\u0442\u043e \u0432 <code>mount<\/code> namespace).<\/p>\n<\/li>\n<li>\n<p><code>pivot_root()<\/code> \u2014 \u0437\u0430\u043c\u0435\u043d\u0430 \u043a\u043e\u0440\u043d\u044f \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0424\u0421 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430.<\/p>\n<\/li>\n<li>\n<p><code>chroot()<\/code> \u2014 \u0443\u043f\u0440\u043e\u0449\u0451\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f <code>pivot_root()<\/code>.<\/p>\n<\/li>\n<li>\n<p><code>cgcreate<\/code>, <code>cgroupfs<\/code>, <code>cgroup_add_task()<\/code> (\u0447\u0435\u0440\u0435\u0437 \u0444\u0430\u0439\u043b\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 <code>\/sys\/fs\/cgroup<\/code>) \u2014 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 cgroups (\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 CPU, \u043f\u0430\u043c\u044f\u0442\u0438, IO). <code>cgroups<\/code> \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0444\u0430\u0439\u043b\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 <code>\/sys\/fs\/cgroup<\/code>, \u043d\u043e \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0442\u0430\u043a\u0438\u0435 \u0432\u044b\u0437\u043e\u0432\u044b, \u043a\u0430\u043a <code>mount<\/code>, <code>open<\/code>, <code>write<\/code>, <code>prlimit<\/code> \u0438 <code>clone<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"memory\" id=\"memory\"><\/a><\/p>\n<h3>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043f\u0430\u043c\u044f\u0442\u044c\u044e<\/h3>\n<ul>\n<li>\n<p><code>mmap()<\/code>, <code>munmap()<\/code> \u2014 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p><code>brk()<\/code>, <code>sbrk()<\/code> \u2014 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u043a\u0443\u0447\u0438. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435 \u0432 <code>malloc()<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"rules\" id=\"rules\"><\/a><\/p>\n<h3>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438<\/h3>\n<ul>\n<li>\n<p><code>getuid()<\/code>, <code>geteuid()<\/code>, <code>getgid()<\/code> \u2014 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\/\u0433\u0440\u0443\u043f\u043f\u044b.<\/p>\n<\/li>\n<li>\n<p><code>setuid()<\/code>, <code>setgid()<\/code> \u2014 \u0441\u043c\u0435\u043d\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\/\u0433\u0440\u0443\u043f\u043f\u044b.<\/p>\n<\/li>\n<li>\n<p><code>chmod()<\/code>, <code>chown()<\/code> \u2014 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><code>umask()<\/code> \u2014 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043c\u0430\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><code>setrlimit()<\/code> \u2014 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043b\u0438\u043c\u0438\u0442\u043e\u0432 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 (CPU, \u043f\u0430\u043c\u044f\u0442\u044c \u0438 \u0442.\u043f.).<\/p>\n<\/li>\n<li>\n<p><code>capget()<\/code>, <code>capset()<\/code> \u2014 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 capability-\u043c\u043e\u0434\u0435\u043b\u044c\u044e (\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0439).<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"signals\" id=\"signals\"><\/a><\/p>\n<h3>\u0421\u0438\u0433\u043d\u0430\u043b\u044b \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438<\/h3>\n<ul>\n<li>\n<p><code>kill()<\/code> \u2014 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0443.<\/p>\n<\/li>\n<li>\n<p><code>tgkill()<\/code> \u2014 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u043f\u043e\u0442\u043e\u043a\u0443 (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u043c \u043a\u043e\u0434\u0435).<\/p>\n<\/li>\n<li>\n<p><code>signal()<\/code>, <code>sigaction()<\/code> \u2014 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><code>signalfd()<\/code> \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u043a\u0430\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440.<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"multiplexing\" id=\"multiplexing\"><\/a><\/p>\n<h3>\u041c\u0443\u043b\u044c\u0442\u0438\u043f\u043b\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430<\/h3>\n<ul>\n<li>\n<p><code>select()<\/code> \u2014 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 I\/O.<\/p>\n<\/li>\n<li>\n<p><code>poll()<\/code>, <code>epoll_wait()<\/code> \u2014 \u0431\u043e\u043b\u0435\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0430\u043d\u0430\u043b\u043e\u0433\u0438 select.<\/p>\n<\/li>\n<li>\n<p><code>epoll_create1()<\/code>, <code>epoll_ctl()<\/code> \u2014 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 epoll.<\/p>\n<\/li>\n<li>\n<p><code>splice()<\/code> \u2014 zero-copy \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u043c\u0438 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><code>io_uring<\/code> \u2014 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e I\/O, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u043d\u0438\u0437\u043a\u0438\u0435 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u0438 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0441\u0442\u0435\u043a\u0430\u0445.<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"time\" id=\"time\"><\/a><\/p>\n<h3>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c<\/h3>\n<ul>\n<li>\n<p><code>clock_gettime()<\/code> \u2014 \u0442\u043e\u0447\u043d\u043e\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<\/li>\n<li>\n<p><code>nanosleep()<\/code> \u2014 \u043f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0430 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f.<\/p>\n<\/li>\n<li>\n<p><code>gettimeofday()<\/code> \u2014 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445 (\u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0430\u044e\u0449\u0438\u0439, \u043d\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f).<\/p>\n<\/li>\n<li>\n<p><code>timerfd_create()<\/code> \u2014 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0433\u043e \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u0430 \u0441 \u0442\u0430\u0439\u043c\u0435\u0440\u043e\u043c (\u0443\u0434\u043e\u0431\u043d\u043e \u0432 event loop).<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"libc\" id=\"libc\"><\/a><\/p>\n<h3>\u0412\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u0447\u0435\u0440\u0435\u0437 libc<\/h3>\n<p>\u0425\u043e\u0442\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>malloc()<\/code>, <code>calloc()<\/code>, <code>realloc()<\/code> \u0438 <code>free()<\/code> \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u043c\u0438 \u0432\u044b\u0437\u043e\u0432\u0430\u043c\u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043f\u043e\u0432\u0435\u0440\u0445 \u043d\u0438\u0445. \u042d\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u2014 \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <code>libc<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <code>brk()<\/code> \u0438 <code>mmap()<\/code> \u0434\u043b\u044f \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<ul>\n<li>\n<p><code>malloc(size)<\/code> \u2014 \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442 \u0431\u043b\u043e\u043a \u043f\u0430\u043c\u044f\u0442\u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430.<\/p>\n<\/li>\n<li>\n<p><code>calloc(n, size)<\/code> \u2014 \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442 \u0438 \u043e\u0431\u043d\u0443\u043b\u044f\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u044c \u043f\u043e\u0434 \u043c\u0430\u0441\u0441\u0438\u0432.<\/p>\n<\/li>\n<li>\n<p><code>realloc(ptr, new_size)<\/code> \u2014 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0440 \u0440\u0430\u043d\u0435\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430.<\/p>\n<\/li>\n<li>\n<p><code>free(ptr)<\/code> \u2014 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u044c.<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043e\u0431\u044a\u0451\u043c\u0430\u0445 <code>malloc()<\/code> \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>mmap()<\/code> \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u0430 \u043d\u0435 <code>brk()<\/code> \u2014 \u044d\u0442\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0430\u043b\u043b\u043e\u043a\u0430\u0442\u043e\u0440\u0430 (<code>ptmalloc<\/code>, <code>jemalloc<\/code>, <code>tcmalloc<\/code>). \u042d\u0442\u043e \u0432\u0430\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0443\u0442\u0435\u0447\u0435\u043a \u043f\u0430\u043c\u044f\u0442\u0438 \u0438\u043b\u0438 \u0442\u044e\u043d\u0438\u043d\u0433\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e:<\/p>\n<ul>\n<li>\n<p><code>mlock()<\/code> \u2014 \u0437\u0430\u0449\u0438\u0442\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u043e\u0442 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0432 swap.<\/p>\n<\/li>\n<li>\n<p><code>mprotect()<\/code> \u2014 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430.<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"interface\" id=\"interface\"><\/a><\/p>\n<h3>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439<\/h3>\n<ul>\n<li>\n<p><code>procfs<\/code> (<code>\/proc<\/code>) \u2014 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0444\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u0445 \u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u044f\u0434\u0440\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430, \u043e\u0442\u043b\u0430\u0434\u043a\u0438, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f PID, \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043f\u0430\u043c\u044f\u0442\u0438, \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445 \u0438 \u0442.\u0434.<\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"questions\" id=\"questions\"><\/a><\/p>\n<h3>\u0412\u043e\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0441\u043e\u0431\u0435\u0441\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f\u0445 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043e\u0442\u0432\u0435\u0442\u043e\u0432<\/h3>\n<h4>\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 fork() \u0438 \u0447\u0435\u043c \u043e\u043d \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 exec()?<\/h4>\n<p><code>fork()<\/code> \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043a\u043e\u043f\u0438\u044e \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, <code>exec()<\/code> \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043d\u043e\u0432\u044b\u043c. \u041e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043d\u043e\u0432\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0432 \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435.<\/p>\n<h4>\u041a\u0430\u043a Python \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u041e\u0421?<\/h4>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 <code>open()<\/code>, <code>read()<\/code>, <code>write()<\/code> \u0438 \u0434\u0440. \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043e\u0431\u0451\u0440\u0442\u043a\u0438 \u043d\u0430\u0434 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u043c\u0438 \u0432\u044b\u0437\u043e\u0432\u0430\u043c\u0438 <code>open<\/code>, <code>read<\/code>, <code>write<\/code>, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0435 glibc.<\/p>\n<h4>\u0427\u0435\u043c \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f select \u043e\u0442 epoll?<\/h4>\n<p><code>select<\/code> \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u043e\u0432 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d 1024 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u0430\u043c\u0438. <code>epoll<\/code> \u2014 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439. <code>io_uring<\/code> \u2014 \u0435\u0449\u0451 \u0431\u043e\u043b\u0435\u0435 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0430\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u043c\u0438 \u0440\u0430\u0441\u0445\u043e\u0434\u0430\u043c\u0438.<\/p>\n<h4>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 mmap \u0438 \u0433\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f?<\/h4>\n<p><code>mmap()<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0432 \u043f\u0430\u043c\u044f\u0442\u044c, \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438.<\/p>\n<h4>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 brk() \u0438 \u043a\u0430\u043a \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f?<\/h4>\n<p><code>brk()<\/code> \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u0442 \u0438\u043b\u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442 \u043a\u0443\u0447\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 <code>malloc()<\/code> \u0434\u043b\u044f \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<h4>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 malloc() \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c?<\/h4>\n<p>\u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442 <code>brk()<\/code> \u0438\u043b\u0438 <code>mmap()<\/code> \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u0438\u0437 \u044f\u0434\u0440\u0430. \u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435 \u0431\u043b\u043e\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 <code>brk()<\/code>, \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u2014 \u0447\u0435\u0440\u0435\u0437 <code>mmap()<\/code>.<\/p>\n<h4>\u041a\u0430\u043a\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0441\u043e\u043a\u0435\u0442\u0430\u043c\u0438 \u0432 Python?<\/h4>\n<p><code>socket()<\/code>, <code>bind()<\/code>, <code>connect()<\/code>, <code>accept()<\/code>, <code>send()<\/code>, <code>recv()<\/code> \u2014 \u0432\u0441\u0451 \u044d\u0442\u043e \u043e\u0431\u0451\u0440\u0442\u043a\u0438 \u043d\u0430\u0434 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u043c\u0438 \u0432\u044b\u0437\u043e\u0432\u0430\u043c\u0438.<\/p>\n<h4>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 mlock() \u0438 \u0433\u0434\u0435 \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e?<\/h4>\n<p><code>mlock()<\/code> \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u044c \u0432 RAM, \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u044f \u0435\u0451 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0443 \u0432 swap. \u0412\u0430\u0436\u043d\u043e \u0432 \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438, real-time \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u0438 \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h4>\u0417\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u0435\u043d mprotect()?<\/h4>\n<p>\u0414\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u043f\u0430\u043c\u044f\u0442\u0438 \u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0431\u0443\u0444\u0435\u0440.<\/p>\n<h4>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \/proc \u0438 \u043a\u0430\u043a \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c?<\/h4>\n<p>\u042d\u0442\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0444\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0438 \u044f\u0434\u0440\u0435. \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f: \u0447\u0442\u0435\u043d\u0438\u0435 <code>cmdline<\/code>, <code>status<\/code>, \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 <code>\/proc\/&lt;pid&gt;\/fd<\/code>.<\/p>\n<h4>\u041a\u0430\u043a\u0438\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u044e\u0442 \u0432 \u0438\u0437\u043e\u043b\u044f\u0446\u0438\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432?<\/h4>\n<p><code>clone()<\/code> \u0441 <code>CLONE_NEW*<\/code>, <code>unshare()<\/code>, <code>setns()<\/code>, <code>chroot()<\/code>, <code>pivot_root()<\/code> \u2014 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432.<\/p>\n<p><a class=\"anchor\" name=\"books\" id=\"books\"><\/a><\/p>\n<h3>\u041a\u043d\u0438\u0433\u0438<\/h3>\n<h4>\u041a\u043d\u0438\u0433\u0438 \u043f\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u043c\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u043c \u0432\u044b\u0437\u043e\u0432\u0430\u043c Linux<\/h4>\n<ol>\n<li>\n<p><strong>\u00abLinux API. \u0418\u0441\u0447\u0435\u0440\u043f\u044b\u0432\u0430\u044e\u0449\u0435\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e\u00bb<\/strong><br \/><em>\u0410\u0432\u0442\u043e\u0440: \u041c\u0430\u0439\u043a\u043b \u041a\u0435\u0440\u0440\u0438\u0441\u043a<\/em><br \/>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u043c \u0432\u044b\u0437\u043e\u0432\u0430\u043c Linux, \u0432\u043a\u043b\u044e\u0447\u0430\u044f <code>fork()<\/code>, <code>exec()<\/code>, <code>mmap()<\/code>, <code>clone()<\/code> \u0438 \u0434\u0440\u0443\u0433\u0438\u0435. \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0438 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0439. \u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d, \u0445\u043e\u0442\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438 \u043e\u0442\u043c\u0435\u0447\u0430\u044e\u0442, \u0447\u0442\u043e \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u044b\u043c. <\/p>\n<\/li>\n<li>\n<p><strong>\u00abLinux Kernel Development\u00bb<\/strong><br \/><em>\u0410\u0432\u0442\u043e\u0440: \u0420\u043e\u0431\u0435\u0440\u0442 \u041b\u0430\u0432<\/em><br \/>\u0424\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u044f\u0434\u0440\u0430 Linux, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438, \u0430\u043d\u0430\u043b\u0438\u0437 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e.<\/p>\n<\/li>\n<li>\n<p><strong>\u00ab\u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e Linux\u00bb<\/strong><br \/><em>\u0410\u0432\u0442\u043e\u0440: <\/em>\u041a\u0435\u0442\u043e\u0432 \u0414\u043c\u0438\u0442\u0440\u0438\u0439 \u0412\u043b\u0430\u0434\u0438\u043c\u0438\u0440\u043e\u0432\u0438\u0447<br \/>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u044f\u0434\u0440\u0430 \u0438 \u0438\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0438 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0438, \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0438 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<\/ol>\n<h4>\u041a\u043d\u0438\u0433\u0438 \u043f\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438<\/h4>\n<ol>\n<li>\n<p><strong>\u00abThe Docker Book\u00bb<\/strong><br \/><em>\u0410\u0432\u0442\u043e\u0440: \u0414\u0436\u0435\u0439\u043c\u0441 \u0422\u0451\u0440\u043d\u0430<\/em><br \/>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e Docker, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443, \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u043c\u0435\u0442\u043e\u0434\u0438\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043c\u043d\u043e\u0433\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043a\u043e\u0434\u0430 \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438. <\/p>\n<\/li>\n<li>\n<p><strong>\u00abKubernetes: Up and Running\u00bb<\/strong><br \/><em>\u0410\u0432\u0442\u043e\u0440\u044b: \u041a\u043b\u0430\u0440\u0435\u043d\u0441 \u0414\u0440\u0430\u0433\u043e\u0432\u0438\u0447, \u0414\u0436\u043e\u0437\u0435\u0444 \u0414\u0436\u0435\u043a, \u041a\u0430\u0438\u0442\u043e \u0421\u0430\u043a\u0443\u0440\u043e<\/em><br \/>\u041f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043e\u0440\u043a\u0435\u0441\u0442\u0440\u0430\u0446\u0438\u0438<\/p>\n<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-457399","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/457399","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=457399"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/457399\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=457399"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=457399"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=457399"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}