# <!-- METAHEADER
# –––––––––––––––––––––––––––––––––––––––––––––––––– -->
"*": "https://raw.githubusercontent.com/wefindx/schema/master/intent/oo-item.yaml"
# <!-- HEADER
# –––––––––––––––––––––––––––––––––––––––––––––––––– -->
"base:title": "0oo - Maximising use of the CPU"
"og:title": "Maximising use of the CPU"
"og:description": "I think multithreaded programs can be created by scheduling in advance what needs to go on when and where, the problem is communication - to continue processing on the next step of the algorithm. If you have a 2 dimensional grid, you can place work on one thread at a time. If you need to synchronize, you slow down. Take the A* algorithm. It can be parallelised. So you have X worker threads take a neighbour and explore it. It doesn&#x27;t need to be single threaded. Think of a server that handles 10,000 connections. You want X threads epolling over …"
"og:image": "https://avatars0.githubusercontent.com/u/28134655"
"og:url": "/intent/167001/"
"base:css": "/static/css/bootstrap.min.9c25540d6272.css"
"base:extra-css": "/static/css/base.57997aeac1df.css"
"base:favicon": "/static/favicon.acaa334f0136.ico"
"base:body_class": ""
"layout:logo": "/static/0oo.8d2a8bbef612.svg"
"layout:index": "/"
"layout:menu": "/menu/"
"layout:categories": "/intents/"
"layout:ideas": "/methods/"
"layout:projects": "/projects/"
"layout:users": "/users/"
"layout:about": "/about/"
"layout:help": "/help/"
"layout:bug_report": "https://github.com/wefindx/0oo"
"layout:login": "/accounts/login/"
"layout:light-off": "/darken/?darken=true"
"layout:set-multilingual": "/mulang/?mulang=true"
"layout:lang": "言語"
"layout:set-language-post-action": "/i18n/setlang/"
"layout:csrf-token": "D4WWU8NXdIKApgmv1pDcgse0stgUvgoInM24TmFVcpZd1TC1tmJRdEemYOICmoPv"
"layout:input-next": "/intent/167001/"
"layout:languages": [{"code": "ja", "is-active": "true", "name": "日本語"}, {"code": "lt", "is-active": "false", "name": "Lietuviškai"}, {"code": "zh-hans", "is-active": "false", "name": "简体中文"}, {"code": "en", "is-active": "false", "name": "English"}, {"code": "ru", "is-active": "false", "name": "Русский"}, {"code": "oo", "is-active": "false", "name": "O;o,"}]
# <!-- TOPIC
# –––––––––––––––––––––––––––––––––––––––––––––––––– -->
"item:parent:intents": [{"title": "Responsively fast software", "url": "/intent/165001/"}]
"item:title": "Maximising use of the CPU"
"item:votes": 0
"item:add-vote": "#addnote"
"item:intent": "/intent/167001/?l=ja"
"item:base-administration": false
"item:body": |
    I think multithreaded programs can be created by scheduling in advance what needs to go on when and where, the problem is communication - to continue processing on the next step of the algorithm.
    If you have a 2 dimensional grid, you can place work on one thread at a time.
    If you need to synchronize, you slow down.
    
    Take the A* algorithm. It can be parallelised. So you have X worker threads take a neighbour and explore it. It doesn't need to be single threaded.
    
    Think of a server that handles 10,000 connections. You want X threads epolling over 100s of connections at all times. You want to fill that 2d diagram with work and not prevent any other connection from progressing.
    The worst case is that 10,000 connections all have work simultaneously. You could have 1000 thread running that each epoll connections, then write an event to a multiconsumer multiproducer ringbuffer to read/send data to those connections.
    You could have 1000 threads each waiting for events on their own ringbuffers for handling "read/write/broadcast" events.
"item:permalink": "/intent/167001/?l=ja"
"item:source-date": ""
"item:owner": "chronological"
"item:ownerlink": "/user/198/chronological"
"item:created": "2022-07-11T15:21:48.888716"
"item:intent:child:add": "/admin/hlog/intent/add/?parent=167001"
# <!-- LINKS
# –––––––––––––––––––––––––––––––––––––––––––––––––– -->
"item:method:items":
"item:method:add": "/admin/hlog/method/add/?parent=167001"
"item:comment:add": "/intents/addnote?parent=167001"
"item:comment:add:csrf_token": "D4WWU8NXdIKApgmv1pDcgse0stgUvgoInM24TmFVcpZd1TC1tmJRdEemYOICmoPv"
"item:comment:form": |
    <li> <textarea name="text" cols="40" rows="10" id="addnote" class="comment-textarea" required>
    </textarea></li>
    <li><label for="id_vote">投票：</label> <select name="vote" id="id_vote">
      <option value="-1">[−]</option>
      <option value="0" selected>-</option>
      <option value="1">[+]</option>
    </select></li>
    <li><label for="id_crawl">静かに：</label> <input type="checkbox" name="crawl" onchange="handleSilently(this)" id="id_crawl"></li>
    <li><label for="id_has_questions">概念：</label> <input type="checkbox" name="has_questions" id="id_has_questions"> <span class="helptext">コメントが新しい問題を挙げるとマークする。</span></li>
    <li><label for="id_has_ideas">発想：</label> <input type="checkbox" name="has_ideas" id="id_has_ideas"> <span class="helptext">コメントが潜在的な解決を提供するとマークする。</span></li>
    <li><label for="id_has_facts">事実：</label> <input type="checkbox" name="has_facts" id="id_has_facts"> <span class="helptext">コメントが推論に役に立つの事実があるとマークする。</span></li>
    <a href="/accounts/login/"><u>ログイン</u>してください。</a>
# <!-- COMMENTS
# –––––––––––––––––––––––––––––––––––––––––––––––––– -->
"item:comment:items":
"base:js": "/static/js/base.c7357c06cc89.js"
