How to rewrite the OS using C by strong type
Skip to next slide
You can skip to the next slide in
3
Ad
Skip to next slide
You can skip to the next slide in
3
Ad
Skip to next slide
You can skip to the next slide in
3
Ad
Skip to next slide
You can skip to the next slide in
3
Ad
Skip to next slide
You can skip to the next slide in
3
Ad
Skip to next slide
You can skip to the next slide in
3
Ad
Skip to next slide
You can skip to the next slide in
3
Ad
Skip to next slide
You can skip to the next slide in
3
Ad
Skip to next slide
You can skip to the next slide in
3
Ad
Skip to next slide
You can skip to the next slide in
3
Ad
Skip to next slide
You can skip to the next slide in
3
Ad
×
Your browser does not support the video tag.
Skip to next slide
Ad
×
How to rewrite the OS using C by strong type Metasepi Project / Kiwamu Okabe
Who am I? ☆ http://www.masterq.net/ ☆ Organizer of Metasepi Project ☆ A developer of Ajhc Haskell compiler ☆ A Debian Main...
Agenda ☆ [1] Problems of OS using C ☆ [2] Type safety ☆ [3] Existing OS using strong type ☆ [4] Snatch-driven development ...
[1] Problems of OS using C ☆ Most OS uses C language ☆ C is good for system programming ☆ But C occurs many problems
Buffer overrun ☆ Pointer to array doesn't know the length
Page fault in kernel ☆ Page fault in user space => SEGV ☆ Page fault in kernel space => Halt!
Weak type ☆ Great use of (void *) type ☆ NetBSD kernel uses 45130 times! $ pwd /home/kiwamu/src/netbsd/sys $ grep "void *"...
[2] Type safety ☆ Get less runtime errors
Avoid buffer overrun Strong type avoids buffer overrun.
Avoid page fault in kernel Only touch the area constructed.
Flexibility without weak type ☆ Algebraic data type data Node = Leaf Integer | Branch Node Node ☆ Type class class Functo...
Kernel needs strong type ☆ IoT:Internet of Things ☆ Poor hardware, and Rich feature ☆ Many custom requests shower kernel ☆...
[3] Existing OS using strong type Alreadly we have. ☆ Funk http://home.gna.org/funk/ ☆ snowflake-os https://code.google.c...
Poor design and less functions ☆ Design from scratch ☆ Polling interrupt ☆ Not have bus driver ☆ Support less devices ☆ On...
No compatible POSIX
[4] Snatch-driven development Rewrite kernel using C with strong type by little and little.
UNIX like OS needs reentrant
Strong type OS uses polling intr
Ajhc Haskell compiler Context can run without lock.
[5] Demo The proof of the pudding is in the eating.
MCU app without OS #1 https://github.com/ajhc/demo-cortex-m3
MCU app without OS #2 Memory map
MCU app with OS https://github.com/ajhc/demo-cortex-m3
[6] Case study of Snatch We found some idioms that are useful to rewrite C language with Haskell.
Idiom1: Call function C and Haskell call with each other.
Idiom2: Read/Write memory Haskell can read/write memory directly.
Idiom3: Read/Write struct Read structs chained with pointer.
Idiom4: Foreign Primitives Directly insert the text following const.
[7] Future work ☆ Benchmark ☆ Pointer combinator ☆ Share state between contexts ☆ Porting libraries running on GHC ☆ Debug...
Try to use the other language ☆ ATS http://www.ats-lang.org/ JATS-UG - Japan ATS User Group http://jats-ug.metasepi.org/ ☆...
Workshop at Nagoya ☆ Functional MCU programing workshop at Nagoya ☆ Meeting minutes http://metasepi.org/posts/2014-01-05-m...
Share Slideshare
LinkedIn
Facebook
Twitter
Embed
Size (px)
Show related Slideshows at end
WordPress Shortcode
Link
Share
Email
Jorge Silva, Sr. Research Statistic...
Jorge Silva, Sr. Research Statistic...
by MLconf
4035 views
The impact of innovation on travel ...
The impact of innovation on travel ...
by Brian Solis
101715 views
Open Source Creativity
Open Source Creativity
by Sara Cannon
173051 views
Reuters: Pictures of the Year 2016 ...
Reuters: Pictures of the Year 2016 ...
by maditabalnco
165166 views
The Six Highest Performing B2B Blog...
The Six Highest Performing B2B Blog...
by Barry Feldman
131589 views
The Outcome Economy
The Outcome Economy
by Helge Tennø
345778 views
View on Slideshare
1
of
31
Ad
View on Slideshare
1
of
31
Ad
AltStyle
によって変換されたページ
(->オリジナル)
/
アドレス:
モード:
デフォルト
音声ブラウザ
ルビ付き
配色反転
文字拡大
モバイル