{"id":90050,"date":"2020-07-28T13:42:44","date_gmt":"2020-07-28T11:42:44","guid":{"rendered":"https:\/\/prohoster.info\/blog\/novosti-interneta\/google-nachal-otkrytie-realizaczii-modeli-potokov-mn"},"modified":"2020-07-28T13:42:44","modified_gmt":"2020-07-28T11:42:44","slug":"google-nachal-otkrytie-realizaczii-modeli-potokov-mn","status":"publish","type":"post","link":"https:\/\/prohoster.info\/da\/blog\/news\/google-nachal-otkrytie-realizaczii-modeli-potokov-mn","title":{"rendered":"Google er begyndt at implementere M:N stream-modellen.","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Google <noindex><a rel=\"nofollow\" href=\"https:\/\/lore.kernel.org\/lkml\/20200722234538.166697-1-posk@posk.io\/\">har<\/a><\/noindex> for inclusion in the Linux kernel, the first set of patches implements the components necessary for the operation of the M:N thread model. Google's initiative is related to the unveiling of an API developed behind closed doors. <noindex><a rel=\"nofollow\" href=\"http:\/\/pdxplumbers.osuosl.org\/2013\/ocw\/\/system\/presentations\/1653\/original\/LPC%20-%20User%20Threading.pdf\">SwitchTo<\/a><\/noindex> for the Linux kernel, providing the operation of a multithreading subsystem implemented in user space that uses the M:N thread model. The subsystem is used by Google to ensure the operation of services requiring minimal latency. Scheduling and management of thread distribution is entirely done in user space, significantly reducing the number of context-switching operations by minimizing system calls.<\/p>\n<p>For the operation of the specified subsystem at the Linux kernel level, the SwitchTo API has been implemented, offering three basic operations \u2014 wait, resume, and swap (switching). To be included in the kernel, the new operation FUTEX_SWAP code is proposed, complementing <noindex><a rel=\"nofollow\" href=\"https:\/\/man7.org\/linux\/man-pages\/man2\/futex.2.html\">FUTEX_WAIT and FUTEX_WAKE<\/a><\/noindex>, and providing a foundation for creating multithreaded libraries in user space. FUTEX_SWAP can also be used for message passing between tasks, similar to RPC. For example, currently, message passing between tasks requires at least four calls to FUTEX_WAIT and FUTEX_WAKE, while using FUTEX_SWAP will allow this to be done in one operation that will be executed 5-10 times faster.<\/p>\n<p><center><noindex><a rel=\"nofollow\" href=\"http:\/\/pdxplumbers.osuosl.org\/2013\/ocw\/\/system\/presentations\/1653\/original\/LPC%20-%20User%20Threading.pdf\"><img decoding=\"async\" alt=\"Google er begyndt at implementere M:N stream-modellen.\" src=\"\/wp-content\/uploads\/2020\/07\/a8a6049cd1d1aafd2a8caf08afcf3d6d.png\" style=\"display:block;margin: 0 auto;\" \/><\/a><\/noindex><\/center><\/p>\n<p>Currently, primarily 1:1 and N:1 thread models are used in practice. The 1:1 model is used in <noindex><a rel=\"nofollow\" href=\"https:\/\/en.wikipedia.org\/wiki\/Native_POSIX_Thread_Library\">NPTL<\/a><\/noindex> (POSIX threads) and <noindex><a rel=\"nofollow\" href=\"https:\/\/en.wikipedia.org\/wiki\/LinuxThreads\">LinuxThreads<\/a><\/noindex>, and implies a direct mapping of a user space thread to a thread (execution scheduling unit) at the kernel level. The N:1 model is implemented in <noindex><a rel=\"nofollow\" href=\"https:\/\/www.gnu.org\/software\/pth\/\">GNU Pth<\/a><\/noindex>, which moves thread scheduling to user space and allows N user space threads to be bound to one thread in the kernel, while the kernel has no information about user threads.<\/p>\n<p>The main disadvantage of the 1:1 model is the high overhead of context switching between the kernel and user space. The N:1 model addresses this issue, but creates a new one \u2014 as a thread in the kernel is an indivisible unit of scheduling, user threads bound to a single thread in the operating system kernel cannot scale across CPU cores and end up being tied to one CPU core.<\/p>\n<p>M:N modellen er hybrid og eliminerer alle de f\u00f8rn\u00e6vnte ulemper ved at matche N str\u00f8mme i brugeromr\u00e5det med M str\u00f8mme i OS-kernen, hvilket b\u00e5de reducerer overheadomkostningerne ved kontekstskift og muligg\u00f8r skalering over CPU-kerner. Prisen for denne l\u00f8sning er en betydelig kompleksitet i implementeringen af brugeromr\u00e5dets planl\u00e6gger og behovet for mekanismer til at synkronisere handlinger med kerneplanl\u00e6ggeren.<\/p>\n<p><center><div class=\"youtube-placeholder\" data-id=\"KXuZi9aeGTw\" onclick=\"loadVideo(this)\">\r\n        <img decoding=\"async\" src=\"https:\/\/img.youtube.com\/vi\/KXuZi9aeGTw\/hqdefault.jpg\" alt=\"Afspil video\" loading=\"lazy\" width=\"480\" height=\"360\" style=\"width:100%;height:auto;\">\r\n        <div class=\"play-button\"><\/div>\r\n    <\/div><\/center><\/p>\n<p><noindex><a rel=\"nofollow\" name=\"link\"><\/a><\/noindex><\/p>\n<p>Kilde: <a \ncontent=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=53443\">opennet.ru<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Google \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b\u0430 \u0434\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432 \u0441\u043e\u0441\u0442\u0430\u0432 \u044f\u0434\u0440\u0430 Linux \u043f\u0435\u0440\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043f\u0430\u0442\u0447\u0435\u0439 \u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 M:N. \u0418\u043d\u0438\u0446\u0438\u0430\u0442\u0438\u0432\u0430 Google \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0435\u043c \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0432\u0448\u0435\u0433\u043e\u0441\u044f \u0437\u0430 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u043c\u0438 \u0434\u0432\u0435\u0440\u044f\u043c\u0438 API SwitchTo \u0434\u043b\u044f \u044f\u0434\u0440\u0430 Linux, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0443 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0439 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0449\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u0442\u043e\u043a\u043e\u0432 M:N. \u041f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 Google \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":90051,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-90050","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.3 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Google \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b\u0430 \u0434\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432 \u0441\u043e\u0441\u0442\u0430\u0432 \u044f\u0434\u0440\u0430 Linux \u043f\u0435\u0440\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043f\u0430\u0442\u0447\u0435\u0439 \u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/da\/blog\/news\/google-nachal-otkrytie-realizaczii-modeli-potokov-mn\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.3\" \/>\n\t\t<meta property=\"og:locale\" content=\"da_DK\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47Google \u043d\u0430\u0447\u0430\u043b \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 M:N | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Google \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b\u0430 \u0434\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432 \u0441\u043e\u0441\u0442\u0430\u0432 \u044f\u0434\u0440\u0430 Linux \u043f\u0435\u0440\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043f\u0430\u0442\u0447\u0435\u0439 \u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/da\/blog\/news\/google-nachal-otkrytie-realizaczii-modeli-potokov-mn\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-07-28T11:42:44+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-07-28T11:42:44+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Google er begyndt at \u00e5bne op for implementeringen af M:N str\u00f8mmodellen | ProHoster","description":"Google har foresl\u00e5et den f\u00f8rste s\u00e6t patches med implementering til at blive inkluderet i Linux-kernen.","canonical_url":"https:\/\/prohoster.info\/da\/blog\/news\/google-nachal-otkrytie-realizaczii-modeli-potokov-mn","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"da_DK","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47Google \u043d\u0430\u0447\u0430\u043b \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 M:N | ProHoster","og:description":"\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Google \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b\u0430 \u0434\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432 \u0441\u043e\u0441\u0442\u0430\u0432 \u044f\u0434\u0440\u0430 Linux \u043f\u0435\u0440\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043f\u0430\u0442\u0447\u0435\u0439 \u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439.","og:url":"https:\/\/prohoster.info\/da\/blog\/news\/google-nachal-otkrytie-realizaczii-modeli-potokov-mn","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2020-07-28T11:42:44+00:00","article:modified_time":"2020-07-28T11:42:44+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"90050","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-02-28 12:59:44","updated":"2022-10-01 00:41:43","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/posts\/90050","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/comments?post=90050"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/posts\/90050\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/media\/90051"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/media?parent=90050"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/categories?post=90050"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/tags?post=90050"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}