[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-735370-105":3,"detail-sidebar-cat-0-en-105":80,"doc-detail-735370-en":130,"doc-similar-735370":290},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":73,"head_meta":75,"extra_data":77,"updated_unix":79},105,"en","concurrent-programming-concurrency-lectures-outline","Concurrent Programming - Concurrency Lectures Outline","","Concurrent Programming is Hard introduces why concurrent programs are non-deterministic and execute statements non-atomically, leading to timing-dependent race conditions on shared state. The outline explains how atomic operations and the linearization point help specify concurrent behaviors, while emphasizing mutual exclusion, behavior reasoning, and comparative testing. It further covers building concurrent data structures with locks, waiting via condition variables, deadlock prevention/avoidance/detection, barrier synchronization for scalability, and interrupt-safe code via enabling or disabling interrupts.",{"@graph":14,"@context":72},[15,34,55],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/concurrent-programming-concurrency-lectures-outline/735370/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/concurrent-programming-concurrency-lectures-outline/735370.png","ImageObject",300,407,{"name":42,"@type":43},"Well Done","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-26","2026-11-23",true,{"@type":52,"interactionType":53,"userInteractionCount":26},"InteractionCounter",{"@type":54},"ViewAction",{"@type":56,"mainEntity":57},"FAQPage",[58,64,68],{"name":59,"@type":60,"acceptedAnswer":61},"Why are concurrent programs non-deterministic?","Question",{"text":62,"@type":63},"Concurrent programs can produce different answers across runs with the same input because many interleavings are possible.","Answer",{"name":65,"@type":60,"acceptedAnswer":66},"How do race conditions relate to shared state and timing?",{"text":67,"@type":63},"A race condition is a timing-dependent error that involves shared state; it happens when at least one interleaving yields an undesirable result.",{"name":69,"@type":60,"acceptedAnswer":70},"What is the purpose of atomic operations and the linearization point?",{"text":71,"@type":63},"Atomic operations make an effect appear to manifest atomically at a specific linearization point, enabling a total order of manifestations for specification.","https://schema.org",{"og:url":32,"og:type":74,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":76,"canonical":32},"index,follow",{"doc_id":78,"site_id":7},735370,1795460537,{"code":4,"msg":81,"data":82},"success",[83,87,91,95,100,104,109,114,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":84,"show_sort_weight":85,"slug":86},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":88,"show_sort_weight":89,"slug":90},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":92,"show_sort_weight":93,"slug":94},"Exam",70,"exam",{"id":96,"doc_module":4,"doc_module_name":25,"category_name":97,"show_sort_weight":98,"slug":99},5,"Comic",60,"comic",{"id":101,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":102,"slug":103},6,50,"technology",{"id":105,"doc_module":4,"doc_module_name":25,"category_name":106,"show_sort_weight":107,"slug":108},7,"Healthcare",40,"healthcare",{"id":110,"doc_module":4,"doc_module_name":25,"category_name":111,"show_sort_weight":112,"slug":113},8,"Research & Report",30,"research-report",{"id":115,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},9,"Religion & Spirituality",20,"religion-spirituality",{"id":117,"doc_module":4,"doc_module_name":25,"category_name":120,"show_sort_weight":117,"slug":121},"World Cup","world-cup",{"id":123,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":123,"slug":125},10,"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":96,"slug":129},19,"General","general",{"code":4,"msg":81,"data":131},{"doc_id":78,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":101,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":26,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":139,"language":140,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":12,"update_tm":79,"read_time":144,"preview_page_count":145,"preview_urls":146},5909892210082,"https://ap-avatar.wpscdn.com/avatar/56001069da27c9f41e8?x-image-process=image/resize,m_fixed,w_180,h_180&k=1789614185077863061","Concurrent Programming  \nRobbert van Renesse  \nConcurrency Lectures Outline  \n• What are the problems?  \no no determinism, no atomicity  \n• What is the solution?  \no some form of mutual exclusion  \n• How to specify concurrent problems?  \no atomic operations  \n• How to construct correct concurrent code?  \no reason about behaviors  \n• How to test concurrent programs?  \no comparing behaviors  \nConcurrency Lectures Outline  \n• How to build Concurrent Data Structures?  \no using locks  \n• How to wait for some condition?  \no using condition variables  \n• How to deal with deadlock?  \no prevention, avoidance, detection  \n• How to use barrier synchronization?  \no improve scalability  \n• How to make code interrupt-safe?  \no enabling/disabling interrupts  \nConcurrent Programming is Hard  \nWhy?  \no Concurrent programs are non-deterministic  \n- run them twice with same input, get two different answers  \n- or worse, one time it works and the second time it fails  \no Program statements are executed non-atomically  \n- x += 1 compiles to something like  \n• LOAD x  \n• ADD 1  \n• STORE x  \n- with concurrency, this leads to non-deterministic interleavings  \nRace Conditions  \n= timing dependent error involving shared state  \n• Usually, in a concurrent program, many interleavings are possible  \n• A race condition occurs when at least one interleaving gives an undesirable result  \nRace Conditions are Hard to Debug  \n• Number of possible interleavings is usually huge  \n• Bad interleavings, if they exist, may happen only rarely  \n- Works 1000x ≠ no race condition  \n• Timing dependent: small changes hide bugs  \no add print statement → bug no longer seems to happen  \nLife of an atomic operation  \nthread invokes operation  \noperation happens atomically”linearization point”  \nthread continues with result  \nConcurrency and Overlap  \nIs the following a possible scenario?  \n1. customer X orders a burger  \n2. customer Y orders a burger (after X)  \n3. customer Y is served a burger  \n4. customer X is served a burger (after Y)  \nConcurrency and Overlap  \nIs the following a possible scenario?  \n1. customer X orders a burger  \n2. customer Y orders a burger (after X)  \n3. customer Y is served a burger  \n4. customer X is served a burger (after Y)  \nWe’ve all seen this happen. It’s a matter of how things get scheduled!  \nSpecifying: “order burger”  \n• Result: a burger (at some later time)  \n• Semantics: the burger manifests itself atomically sometime during the operation  \no Manifestation is linearization point  \no Atomically: no two manifestations at the same time  \n- i.e., linearization points are totally ordered  \no Specification vs implementation  \n- We don’t necessarily care how this is accomplished  \n• It’s easier to specify something when you don’t have to worry about overlap  \no i.e., you can simply give a sequential specification","cbCaieWQyJtevPat","https://ap.wps.com/l/cbCaieWQyJtevPat","pdf",10781679,324,"English","# Concurrency Lectures Outline\n## Problems: determinism and atomicity\n## Solutions: mutual exclusion and atomic operations\n## Constructing correct concurrent code\n## Testing concurrent programs\n## Building concurrent data structures\n## Waiting with condition variables\n## Handling deadlock\n## Barrier synchronization and scalability\n## Interrupt-safe code\n# Concurrent Programming is Hard\n## Non-determinism\n## Non-atomic statement execution and interleavings\n# Race Conditions\n## Definition and timing dependence\n## Why debugging is difficult\n# Life of an atomic operation\n# Concurrency and Overlap\n## Possible overlap scenarios\n# Specifying “order burger”\n## Atomic manifestation and linearization points\n## Specification vs implementation\n## Sequential specification when overlap is ignored","[{\"question\":\"Why are concurrent programs non-deterministic?\",\"answer\":\"Concurrent programs can produce different answers across runs with the same input because many interleavings are possible.\"},{\"question\":\"How do race conditions relate to shared state and timing?\",\"answer\":\"A race condition is a timing-dependent error that involves shared state; it happens when at least one interleaving yields an undesirable result.\"},{\"question\":\"What is the purpose of atomic operations and the linearization point?\",\"answer\":\"Atomic operations make an effect appear to manifest atomically at a specific linearization point, enabling a total order of manifestations for specification.\"}]","Concurrent Programming - Concurrency Lectures Outline | PDF",816,33,[147,151,154,158,162,166,169,173,177,181,184,189,194,199,203,208,213,218,222,226,230,235,239,244,249,254,258,263,268,273,276,281,286],{"page_no":22,"url":148,"width":149,"height":150},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/600c97afc43ec00bbab89f15fbbfceb2.webp",983,736,{"page_no":26,"url":152,"width":153,"height":150},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/1227d25efc538a37c208b41aeebbbadd.webp",982,{"page_no":30,"url":155,"width":156,"height":157},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/5d1c7cae484c226c36c98847c50a21d0.webp",981,735,{"page_no":33,"url":159,"width":160,"height":161},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/1adf610e2ea2374ebeaaff7ba1966d06.webp",980,734,{"page_no":96,"url":163,"width":164,"height":165},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/c5eb57e8276af3c1b626c2849e763c22.webp",979,733,{"page_no":101,"url":167,"width":168,"height":165},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/7e1163cd550fb27f96f2d83989b1c31b.webp",978,{"page_no":105,"url":170,"width":171,"height":172},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/a24fb647f4e71f5fb56f798e9bff14b3.webp",977,732,{"page_no":110,"url":174,"width":175,"height":176},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/e8aeed5ef97cd8eccf90766d53b1bd1b.webp",976,731,{"page_no":115,"url":178,"width":179,"height":180},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/a691f398e84361b35d1d56e8c9fdc767.webp",975,730,{"page_no":123,"url":182,"width":183,"height":180},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/5e3c7c56d59493384a18fa3889bea95a.webp",974,{"page_no":185,"url":186,"width":187,"height":188},11,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/86e4f75dd02121aab07c87437c133be4.webp",973,729,{"page_no":190,"url":191,"width":192,"height":193},12,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/7c796224166183c44f87d3b5e8738128.webp",972,728,{"page_no":195,"url":196,"width":197,"height":198},13,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/a0b620d043417c7567cd7e5ca5edb35c.webp",971,727,{"page_no":200,"url":201,"width":202,"height":198},14,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/0606e37cd402ad11f02e2910d9d34951.webp",970,{"page_no":204,"url":205,"width":206,"height":207},15,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/c49c58a701b7539f70f6086da9dc3326.webp",969,726,{"page_no":209,"url":210,"width":211,"height":212},16,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/434264a5e5ffdc41933b25b6e971002b.webp",968,725,{"page_no":214,"url":215,"width":216,"height":217},17,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/3d375c8cea9ae42b7b76397e03ed013a.webp",967,724,{"page_no":219,"url":220,"width":221,"height":217},18,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/dcaccf9161944b5086ff48e384386117.webp",966,{"page_no":127,"url":223,"width":224,"height":225},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/fbd88028e89d6d4407d07abc80eb4ece.webp",965,723,{"page_no":117,"url":227,"width":228,"height":229},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/30088d81881b0de9e3729a1b4f440c9f.webp",964,722,{"page_no":231,"url":232,"width":233,"height":234},21,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/d07bb9c7a54104888028a7d83f035dd9.webp",963,721,{"page_no":236,"url":237,"width":238,"height":234},22,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/3afd68a401006fd5a07369ebd4925c47.webp",962,{"page_no":240,"url":241,"width":242,"height":243},23,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/acb6af573f29bbfd77b84335d2e5e47b.webp",961,720,{"page_no":245,"url":246,"width":247,"height":248},24,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/d0f0aaad1b93b72472fc55acadcd8bdf.webp",960,719,{"page_no":250,"url":251,"width":252,"height":253},25,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/fa0bf145a1689626a099cf1604656b5b.webp",959,718,{"page_no":255,"url":256,"width":257,"height":253},26,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/e0d5631b61e352972e8412b99fafb525.webp",958,{"page_no":259,"url":260,"width":261,"height":262},27,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/6e1b1926936c3017b2257a6fe1096ca7.webp",957,717,{"page_no":264,"url":265,"width":266,"height":267},28,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/f9396bb0bcd3cde787beccd662ed5cad.webp",956,716,{"page_no":269,"url":270,"width":271,"height":272},29,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/a5a4c65b8468b9bb58b56264f68dab2a.webp",955,715,{"page_no":112,"url":274,"width":275,"height":272},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/72fd6b67ccaef11568ab7daca5e201aa.webp",954,{"page_no":277,"url":278,"width":279,"height":280},31,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/d1785bdb9622f2c9e0b74011ec324395.webp",953,714,{"page_no":282,"url":283,"width":284,"height":285},32,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/2b11d225df884d11350df7f8002dc3ef.webp",952,713,{"page_no":145,"url":287,"width":288,"height":289},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-23/58698bfa47ec0909ae0730643e8fbf26.webp",951,712,{"list":291,"token":11},[292,298,304,310,316,322,328,334,341,348],{"doc_id":293,"doc_title":294,"file_type":137,"home_preview_img_url":295,"slug":296,"view_count":96,"category_name":29,"create_tm":297},700687,"Arduino Playground-MPU-6050 - Introduction","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230011569104/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796121119&Signature=BsFnAmx6QNMpXuFjSBFJ4NB59Mk%3D","arduino-playground-mpu-6050-introduction",1794520009,{"doc_id":299,"doc_title":300,"file_type":137,"home_preview_img_url":301,"slug":302,"view_count":96,"category_name":29,"create_tm":303},690245,"Arm Cortex-M3 Processor Datasheet","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230002603836/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796121119&Signature=XdB1Ais6T67SKUGVWkb8cKNsRRI%3D","arm-cortex-m3-processor-datasheet",1794159438,{"doc_id":305,"doc_title":306,"file_type":137,"home_preview_img_url":307,"slug":308,"view_count":33,"category_name":29,"create_tm":309},687455,"Codebraid Preview for VS Code - Live Pandoc Markdown Preview","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230001260990/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796121119&Signature=PT1i6BIGQzaaQ15YntCkucg7kbM%3D","codebraid-preview-for-vs-code-live-pandoc-markdown-preview",1794083728,{"doc_id":311,"doc_title":312,"file_type":137,"home_preview_img_url":313,"slug":314,"view_count":209,"category_name":29,"create_tm":315},343278,"C8051F040/1/2/3/4/5/6/7 - Analog Peripherals - 12/10-Bit SAR ADC and On-Chip Debug","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229910413119/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796121119&Signature=onkpr8x%2FtRsip%2BVOJOUx8HrOV6g%3D","c8051f0401234567-analog-peripherals-1210-bit-sar-adc-and-on-chip-debug",1790050543,{"doc_id":317,"doc_title":318,"file_type":137,"home_preview_img_url":319,"slug":320,"view_count":200,"category_name":29,"create_tm":321},560164,"ICC11 Service Mode STB - Operation Enhancements","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229947608658/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796121119&Signature=pGhewwc9yUIYFzvZcL36fdqkueA%3D","icc11-service-mode-stb-operation-enhancements",1791802331,{"doc_id":323,"doc_title":324,"file_type":137,"home_preview_img_url":325,"slug":326,"view_count":127,"category_name":29,"create_tm":327},119242,"Hyperbox-brain - A Python toolbox for hyperbox-based machine learning algorithms - open-source library description","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229835115554/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796121119&Signature=El1J8XKd73dR%2FhKOA55WHxNobtQ%3D","hyperbox-brain-a-python-toolbox-for-hyperbox-based-machine-learning-algorithms-open-source-library-description",1785723270,{"doc_id":329,"doc_title":330,"file_type":137,"home_preview_img_url":331,"slug":332,"view_count":30,"category_name":29,"create_tm":333},732791,"FANUC Series 0-D - Highest Reliability - Improved CNC Reliability and Performance","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230031411981/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796121119&Signature=Z24veBOACe2yxAmzMWqOGQfgh2U%3D","fanuc-series-0-d-highest-reliability-improved-cnc-reliability-and-performance",1795382303,{"doc_id":335,"doc_title":336,"file_type":137,"home_preview_img_url":337,"slug":338,"view_count":339,"category_name":29,"create_tm":340},115355,"Claude AI Bible - The Complete Guide to Mastering Claude, Claude Code, Claude Cowork, MCP, AI Agents, Automation & Advanced Prompting","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229831893665/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796121119&Signature=a%2FsdBxS%2BONeJNiQQV1KkqZbQdlU%3D","claude-ai-bible-the-complete-guide-to-mastering-claude-claude-code-claude-cowork-mcp-ai-agents-automation-advanced-prompting",917,1785472614,{"doc_id":342,"doc_title":343,"file_type":137,"home_preview_img_url":344,"slug":345,"view_count":346,"category_name":29,"create_tm":347},185,"XNX Universal Transmitter Installation Manual (Complete Guide) [Honeywell Official]","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229693710157/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796121119&Signature=%2BBvpvcnnZd3%2F3PgGS1ohTkts9h0%3D","xnx-universal-transmitter-installation-manual",856,1776135954,{"doc_id":349,"doc_title":350,"file_type":137,"home_preview_img_url":351,"slug":352,"view_count":353,"category_name":29,"create_tm":354},299143,"THE CANDLESTICK TRADING BIBLE - Trading Guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229905832418/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796121119&Signature=LpIw3u02ye0dselrhzv9uTLK4O4%3D","the-candlestick-trading-bible-trading-guide",805,1789767270]