Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
マルチスレッディングの仕組み (2016)
Search
4D Japan
November 01, 2024
Technology
0
7
マルチスレッディングの仕組み (2016)
4D Japan
November 01, 2024
Tweet
Share
More Decks by 4D Japan
See All by 4D Japan
Unicodeの話 (2007)
miyako
0
3
Unicodeの話 (2008)
miyako
0
6
Google Apps Integration (2012)
miyako
0
4
Creating Custom Widgets (2012)
miyako
0
3
地図データの活用 (2016)
miyako
0
8
オブジェクトフィールド (2016)
miyako
0
3
新しい変換タグ (2016)
miyako
0
5
プログラムコードの最適化 (2016)
miyako
0
7
自動アップグレード (2016)
miyako
0
2
Other Decks in Technology
See All in Technology
小規模に始めるデータメッシュとデータガバナンスの実践
kimujun
4
630
Exadata Database Service on Cloud@Customer セキュリティ、ネットワーク、および管理について
oracle4engineer
PRO
0
1.1k
Shift-from-React-to-Vue
calm1205
4
1.4k
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
5
49k
신뢰할 수 있는 AI 검색 엔진을 만들기 위한 Liner의 여정
huffon
0
440
【技術書典17】OpenFOAM(自宅で極める流体解析)2次元円柱まわりの流れ
kamakiri1225
0
240
家具家電付アパートの冷蔵庫をIoT化してみた!
scbc1167
0
130
Amazon_CloudWatch_ログ異常検出_導入ガイド
tsujiba
4
1.7k
「 SharePoint 難しい」ってよく聞くけど、そんなに言うなら8歳の息子に試してもらった
taichinakamura
2
740
AWS CDKでデータリストアの運用、どのように設計する?~Aurora・EFSの実践事例を紹介~/aws-cdk-data-restore-aurora-efs
mhrtech
4
710
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
27
12k
国土交通省 データコンペ参加者向け勉強会
takehikohashimoto
0
230
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
What's in a price? How to price your products and services
michaelherold
243
12k
StorybookのUI Testing Handbookを読んだ
zakiyama
26
5.2k
BBQ
matthewcrist
85
9.3k
A better future with KSS
kneath
238
17k
Gamification - CAS2011
davidbonilla
80
5k
Statistics for Hackers
jakevdp
796
220k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
GraphQLとの向き合い方2022年版
quramy
43
13k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Fontdeck: Realign not Redesign
paulrobertlloyd
81
5.2k
Visualization
eitanlees
145
15k
Transcript
ϚϧνεϨοσΟϯάͷΈ inside multi-threading Laurent Esnault, Vice President of Engineering ϩϗϯɾΤϊʔ
༻ޠղઆ
ίΦϖϥςΟϒϞʔυ ༻ޠղઆ
• ϓϩηεಉ࢜ͰεέδϡʔϧΛཧ - ໌ࣔత·ͨ҉ࣔత*%-& ίΦϖϥςΟϒϞʔυ ༻ޠղઆ
• ϓϩηεಉ࢜ͰεέδϡʔϧΛཧ - ໌ࣔత·ͨ҉ࣔత*%-& • ར༻Ͱ͖ΔίΞݸͷΈ ίΦϖϥςΟϒϞʔυ ༻ޠղઆ
• ϓϩηεಉ࢜ͰεέδϡʔϧΛཧ - ໌ࣔత·ͨ҉ࣔత*%-& • ར༻Ͱ͖ΔίΞݸͷΈ • ϢʔβʔΠϯλϑΣʔε0, ίΦϖϥςΟϒϞʔυ ༻ޠղઆ
• ϓϩηεಉ࢜ͰεέδϡʔϧΛཧ - ໌ࣔత·ͨ҉ࣔత*%-& • ར༻Ͱ͖ΔίΞݸͷΈ • ϢʔβʔΠϯλϑΣʔε0, ϓϦΤϯϓςΟϒϞʔυ ίΦϖϥςΟϒϞʔυ
༻ޠղઆ
• ϓϩηεಉ࢜ͰεέδϡʔϧΛཧ - ໌ࣔత·ͨ҉ࣔత*%-& • ར༻Ͱ͖ΔίΞݸͷΈ • ϢʔβʔΠϯλϑΣʔε0, ϓϦΤϯϓςΟϒϞʔυ •
04͕εέδϡʔϧΛཧ ίΦϖϥςΟϒϞʔυ ༻ޠղઆ
• ϓϩηεಉ࢜ͰεέδϡʔϧΛཧ - ໌ࣔత·ͨ҉ࣔత*%-& • ར༻Ͱ͖ΔίΞݸͷΈ • ϢʔβʔΠϯλϑΣʔε0, ϓϦΤϯϓςΟϒϞʔυ •
04͕εέδϡʔϧΛཧ • ۭ͍͍ͯΔίΞΛͯ͢ར༻Ͱ͖Δ ίΦϖϥςΟϒϞʔυ ༻ޠղઆ
• ϓϩηεಉ࢜ͰεέδϡʔϧΛཧ - ໌ࣔత·ͨ҉ࣔత*%-& • ར༻Ͱ͖ΔίΞݸͷΈ • ϢʔβʔΠϯλϑΣʔε0, ϓϦΤϯϓςΟϒϞʔυ •
04͕εέδϡʔϧΛཧ • ۭ͍͍ͯΔίΞΛͯ͢ར༻Ͱ͖Δ • ϢʔβʔΠϯλϑΣʔε/( ίΦϖϥςΟϒϞʔυ ༻ޠղઆ
ϓϦΤϯϓςΟϒϞʔυ ίΦϖϥςΟϒϞʔυ ༻ޠղઆ
U U $16 $16 ϓϦΤϯϓςΟϒϞʔυ ίΦϖϥςΟϒϞʔυ ༻ޠղઆ
ϓϩηε" U U $16 $16 *%-& ϓϦΤϯϓςΟϒϞʔυ ίΦϖϥςΟϒϞʔυ ༻ޠղઆ
ϓϩηε" ϓϩηε# U U $16 $16 *%-& *%-& ϓϦΤϯϓςΟϒϞʔυ ίΦϖϥςΟϒϞʔυ
༻ޠղઆ
ϓϩηε" ϓϩηε" ϓϩηε# U U $16 $16 *%-& *%-& ϓϦΤϯϓςΟϒϞʔυ
ίΦϖϥςΟϒϞʔυ ༻ޠղઆ
ϓϩηε" ϓϩηε" ϓϩηε# U U $16 $16 U U $16
$16 *%-& *%-& ϓϦΤϯϓςΟϒϞʔυ ίΦϖϥςΟϒϞʔυ ༻ޠղઆ
ϓϩηε" ϓϩηε# ϓϩηε" ϓϩηε" ϓϩηε# U U $16 $16 U
U $16 $16 *%-& *%-& ϓϦΤϯϓςΟϒϞʔυ ίΦϖϥςΟϒϞʔυ ༻ޠղઆ
ϓϦΤϯϓςΟϒϞʔυ
ϓϦΤϯϓςΟϒϞʔυ • %#%
ϓϦΤϯϓςΟϒϞʔυ • %#% • 42-
ϓϦΤϯϓςΟϒϞʔυ • %#% • 42- • )551
σϞϯετϨʔγϣϯ %ϓϩηεΛϓϦΤϯϓςΟϒϞʔυͰ࣮ߦ͢Δ
BE PREPARED NOT SCARED ৺ߏ͕͑େࣄ ҟมࡂΛʰාΕΔͳ४උͤΑʱ ʢถͷඪޠʣ
BE PREPARED NOT SCARED • Ϗοτ൛ • ίϯύΠϧϞʔυ • ϓϦΤϯϓςΟϒରԠίϚϯυ
৺ߏ͕͑େࣄ ҟมࡂΛʰාΕΔͳ४උͤΑʱ ʢถͷඪޠʣ
BE PREPARED NOT SCARED • Ϗοτ൛ • ίϯύΠϧϞʔυ • ϓϦΤϯϓςΟϒରԠίϚϯυ
৺ߏ͕͑େࣄ ҟมࡂΛʰාΕΔͳ४උͤΑʱ ʢถͷඪޠʣ
BE PREPARED NOT SCARED • Ϗοτ൛ • ίϯύΠϧϞʔυ • ϓϦΤϯϓςΟϒରԠίϚϯυ
৺ߏ͕͑େࣄ ҟมࡂΛʰාΕΔͳ४උͤΑʱ ʢถͷඪޠʣ
ΦϯϥΠϯυΩϡϝϯτ
ΦϯϥΠϯυΩϡϝϯτ
࣮ߦϞʔυ
࣮ߦϞʔυ ϝιουϓϩύςΟ
• ϓϦΤϯϓςΟϒ࣮ߦՄ ࣮ߦϞʔυ ϝιουϓϩύςΟ
• ϓϦΤϯϓςΟϒ࣮ߦՄ • ϓϦΤϯϓςΟϒ࣮ߦෆՄ ࣮ߦϞʔυ ϝιουϓϩύςΟ
• ϓϦΤϯϓςΟϒ࣮ߦՄ • ϓϦΤϯϓςΟϒ࣮ߦෆՄ • ಛʹઃఆ͠ͳ͍ ࣮ߦϞʔυ ϝιουϓϩύςΟ
• ϓϦΤϯϓςΟϒ࣮ߦՄ • ϓϦΤϯϓςΟϒ࣮ߦෆՄ • ಛʹઃఆ͠ͳ͍ ࣮ߦϞʔυ ίϯύΠϥʔʹΑΔνΣοΫ ϝιουϓϩύςΟ
• ϓϦΤϯϓςΟϒ࣮ߦՄ • ϓϦΤϯϓςΟϒ࣮ߦෆՄ • ಛʹઃఆ͠ͳ͍ • ϓϦΤϯϓςΟϒରԠ ࣮ߦϞʔυ ίϯύΠϥʔʹΑΔνΣοΫ
ϝιουϓϩύςΟ
• ϓϦΤϯϓςΟϒ࣮ߦՄ • ϓϦΤϯϓςΟϒ࣮ߦෆՄ • ಛʹઃఆ͠ͳ͍ • ϓϦΤϯϓςΟϒରԠ • ϓϦΤϯϓςΟϒඇରԠ
࣮ߦϞʔυ ίϯύΠϥʔʹΑΔνΣοΫ ϝιουϓϩύςΟ
σϞϯετϨʔγϣϯ ࣮ߦϞʔυ
ॳΊʹݺΕΔ ϓϩδΣΫτϝιου͚ͩ มߋ͢Εྑ͍ ϙΠϯτ
BE PREPARED NOT SCARED • Ϗοτ൛ • ίϯύΠϧϞʔυ • ϓϦΤϯϓςΟϒରԠίϚϯυ
• Πϯλʔϓϩηεม༻ېࢭ • ϢʔβʔΠϯλϑΣʔεແ͠ ৺ߏ͕͑େࣄ ҟมࡂΛʰාΕΔͳ४උͤΑʱ ʢถͷඪޠʣ
BE PREPARED NOT SCARED • Ϗοτ൛ • ίϯύΠϧϞʔυ • ϓϦΤϯϓςΟϒରԠίϚϯυ
• Πϯλʔϓϩηεม༻ېࢭ • ϢʔβʔΠϯλϑΣʔεແ͠ ৺ߏ͕͑େࣄ ҟมࡂΛʰාΕΔͳ४උͤΑʱ ʢถͷඪޠʣ
ίΦϖϥςΟϒ
ίΦϖϥςΟϒ <>myVar:=<>myVar+1
ίΦϖϥςΟϒ <>myVar:=<>myVar+1 IDLE IDLE
ϓϦΤϯϓςΟϒ <>myVar:=<>myVar+1 <>myVar:=<>myVar+1 <>myVar:=<>myVar+1 <>myVar:=<>myVar+1 IDLE IDLE
ϓϦΤϯϓςΟϒ <>myVar:=<>myVar+1 <>myVar:=<>myVar+1 <>myVar:=<>myVar+1 <>myVar:=<>myVar+1 IDLE IDLE IDLE
<>myVar:=<>myVar+1 CLEAR SEMAPHORE("myVar") If(Not(Semaphore("myVar";1000))) ϓϦΤϯϓςΟϒ End if
ΠϯλʔϓϩηεΛΘͣʹͲ͏ͬͯ ϓϩηεؒͰใΛΓऔΓ͢Δͷ
$"--803,&3
$"--803,&3 • ໊લ͕͞ΕͨϝοηʔδϘοΫε
$"--803,&3 • ໊લ͕͞ΕͨϝοηʔδϘοΫε • ϝιουΛ࣮ߦ͢ΔͨΊͷϓϩηε
$"--803,&3 • ໊લ͕͞ΕͨϝοηʔδϘοΫε • ϝιουΛ࣮ߦ͢ΔͨΊͷϓϩηε • $"--803,&3ͰϝοηʔδΛಧ͚Δ - Ҿ/FXQSPDFTTʹࣅ͍ͯΔ -
ҙͷϓϩδΣΫτϝιου - ҙͷύϥϝʔλʔ
myWorker ΞϓϦέʔγϣϯϓϩηε myWorkerϓϩηε
myWorker CALL WORKER("myWorker"; "myMethod";$param) ΞϓϦέʔγϣϯϓϩηε myWorkerϓϩηε
myWorker CALL WORKER("myWorker"; "myMethod";$param) ΞϓϦέʔγϣϯϓϩηε myWorkerϓϩηε
myWorker CALL WORKER("myWorker"; "myMethod";$param) ΞϓϦέʔγϣϯϓϩηε myWorkerϓϩηε you’ve got mail!
myWorker ΞϓϦέʔγϣϯϓϩηε myWorkerϓϩηε CALL WORKER("myWorker"; "myMethod";$param)
myWorker ΞϓϦέʔγϣϯϓϩηε myWorkerϓϩηε CALL WORKER("myWorker"; "myMethod";$param)
myWorker ΞϓϦέʔγϣϯϓϩηε myWorkerϓϩηε myMethod($param) CALL WORKER("myWorker"; "myMethod";$param)
myWorker ΞϓϦέʔγϣϯϓϩηε myWorkerϓϩηε CALL WORKER("myWorker"; "myMethod";$param)
σϞϯετϨʔγϣϯ ϓϩηεؒͷσʔλ௨৴
BE PREPARED NOT SCARED • Ϗοτ൛ • ίϯύΠϧϞʔυ • ϓϦΤϯϓςΟϒରԠίϚϯυ
• Πϯλʔϓϩηεม༻ېࢭ • ϢʔβʔΠϯλϑΣʔεແ͠ ৺ߏ͕͑େࣄ ҟมࡂΛʰාΕΔͳ४උͤΑʱ ʢถͷඪޠʣ
BE PREPARED NOT SCARED • Ϗοτ൛ • ίϯύΠϧϞʔυ • ϓϦΤϯϓςΟϒରԠίϚϯυ
• Πϯλʔϓϩηεม༻ېࢭ • ϢʔβʔΠϯλϑΣʔεແ͠ ৺ߏ͕͑େࣄ ҟมࡂΛʰාΕΔͳ४උͤΑʱ ʢถͷඪޠʣ
Ͳ͏ͬͯϓϦΤϯϓςΟϒϓϩηεͷ ϢʔβʔΠϯλϑΣʔεΛ࡞͢Δͷ
$"--'03.
$"--'03. • ΠϯυຖʹϝοηʔδϘοΫε
$"--'03. • ΠϯυຖʹϝοηʔδϘοΫε • ϑΥʔϜͷίϯςΩετͰϝιουΛ࣮ߦ͢Δ
$"--'03. • ΠϯυຖʹϝοηʔδϘοΫε • ϑΥʔϜͷίϯςΩετͰϝιουΛ࣮ߦ͢Δ • $"--'03.ͰϝοηʔδΛಧ͚Δ - Ҿ$"--803,&3ʹࣅ͍ͯΔ -
ҙͷϓϩδΣΫτϝιου - ҙͷύϥϝʔλʔ
myWindow ϓϩηε·ͨϫʔΧʔ myWindowΠϯυ
myWindow CALL FORM($myWindow; "myMethod";$param) ϓϩηε·ͨϫʔΧʔ myWindowΠϯυ
myWindow CALL FORM($myWindow; "myMethod";$param) ϓϩηε·ͨϫʔΧʔ myWindowΠϯυ
myWindow CALL FORM($myWindow; "myMethod";$param) ϓϩηε·ͨϫʔΧʔ myWindowΠϯυ you’ve got mail!
myWindow CALL FORM($myWindow; "myMethod";$param) ϓϩηε·ͨϫʔΧʔ myWindowΠϯυ
myWindow CALL FORM($myWindow; "myMethod";$param) ϓϩηε·ͨϫʔΧʔ myWindowΠϯυ
myWindow CALL FORM($myWindow; "myMethod";$param) ϓϩηε·ͨϫʔΧʔ myWindowΠϯυ myMethod($param)
myWindow CALL FORM($myWindow; "myMethod";$param) ϓϩηε·ͨϫʔΧʔ myWindowΠϯυ
σϞϯετϨʔγϣϯ Πϯυؒͷϝοηʔδૹड৴
Ϗοτ൛
Ϗοτ൛ Windows Mac
v12 Ϗοτ൛ Windows Mac
v12 Ϗοτ൛ Windows Mac v13 OD BC
v12 Ϗοτ൛ Windows Mac v13 OD BC v15 OD BC
v12 v15 Rx Ϗοτ൛ Windows Mac v13 OD BC v15
OD BC
v12 v15 Rx v15 R5 Ϗοτ൛ Windows Mac v13 OD
BC v15 OD BC
v12 v15 Rx v15 R5 v16 Ϗοτ൛ Windows Mac v13
OD BC v15 OD BC
ϓϦΤϯϓςΟϒϞʔυ ΫϥΠΞϯταʔόʔ σʔλϕʔε 42- )551 TUBUJD EZOBNJD ϥϯήʔδ
·ͱΊ
·ͱΊ • Ϗοτ൛ ֦ுੑ ͓ΑͼॲཧྗΞοϓͷجૅ εέʔϥϏϦςΟ ύϑΥʔϚϯε
·ͱΊ • Ϗοτ൛ ֦ுੑ ͓ΑͼॲཧྗΞοϓͷجૅ εέʔϥϏϦςΟ ύϑΥʔϚϯε • ඇಉظϝοηʔδ؆୯͔ͭೳతͳϓϩηεؒ௨৴ ηϚϑΥʔෆཁɾσουϩοΫճආ
·ͱΊ • Ϗοτ൛ ֦ுੑ ͓ΑͼॲཧྗΞοϓͷجૅ εέʔϥϏϦςΟ ύϑΥʔϚϯε • ඇಉظϝοηʔδ؆୯͔ͭೳతͳϓϩηεؒ௨৴ ηϚϑΥʔෆཁɾσουϩοΫճආ
• ૣɹɹΛೖखͯ͠׳Ε͓͖ͯ·͠ΐ͏ 3