SlideShare ist ein Scribd-Unternehmen logo
1 von 42
Downloaden Sie, um offline zu lesen
oraccha
http://d.hatena.ne.jp/oraccha/
MINIX

•




•                    Google Group

    https://groups.google.com/group/minixReadingClub
Andrew S. Tanenbaum




 Albert S. Woodhull
OS


     OS
•


    •




•       MINIX 3
MINIX
• 1987   MINIX 1: UNIX (v7)             OS

  • 8088   16bit

• 1997   MINIX 2

  • 386   32bit

  • v7   → POSIX.1        IEEE1003.1/ISO 9945-1

• 2006   MINIX 3 (book version   MINIX 3.1.0)
OS
•            OS

    •       CPU         IO
        •   CPU
        •


•                 OS

    •


    •              OS
1.              fork, waitpid, exec, exit, ...

2.     sigaction, sigreturn, kill, alarm, ...

3.              creat, open, close, read, write, ...

4.           mkdir, rmdir, mount, unmount, chdir, ...

5.   chmod, chown, unmask, ...

6.   time, stime, utime, times
OS


     THE   MULTICS


       VM/370


       exokernel


       MINIX 3
• OS

•

•




       P.55
Jochen Liedtke
“Toward Real Microkernels,” CACM Vol. 39, No.9, 1996.
•   A New Hope:
    •   1980                        UNIX
    •       Mach   Chorus    Mach

•   The Microkernel Strikes Back:
    •

    •       L4   Exokernel

•   Return of Virtual Machines:
    •

    •       VMWare Xen
•


    •   CPU

    •


• OS




              CPU
•



•
                 ‣CPU
    •
                 ‣
    • Peterson

    • TSL

•

•
                 Mars Pathfinder’s Sojourner
• Peterson

  •                        Dekker


  •               N

      • Filter

      • Lamport   Bakery

  • TSL
PERTERSON
int turn;
boolean interested[2];

do {                                   do {
                                                                enter region
 interested[0] = TRUE;                  interested[1] = TRUE;
 turn = 0;                              turn = 1;
 while (turn == 0 && interested[1]);    while (turn == 1 && interested[0]);

 /* critical region */                  /* critical region */   leave region
 interested[0] = FALSE;                 interested[1] = FALSE;

  /* non critical region */              /* non critical region */
} while (TRUE);                        } while (TRUE);
                         0                                       1
TSL
• Test-and-Set      Lock
    •                                       read
        write read cmp          1

•

    • ts   (System/360)
    • cas     (68000, SPARC)
    • xchg, cmpxchg     (x86)
    • ll/sc   (MIPS), ldrex/strex (ARMv6)
•                                   sleep&wakeup
• Semafore              Semaphore
    • P: down   sleep
    • V: up     wakeup
•
                                        •
    •
                                        •
    •                                   •
• CPU   I/O

•

•

    •

    •

•
MINIX 3

4     init                                       ...


3
     (pm)        (vfs)      (vm)       (inet)           (rs)
                 TTY       Ethernet
2                                                ...
    (at_wini)    (tty)     (lance)

1               (kernel)
                                      (system)         (clock)
                                                                 P.121
• boot   monitor
  •
                     init

• MINIX     kernel
  •

• init(8)
  • /etc/rc

      • service(8)

  • /etc/ttytab             getty (login)
• PM


    •


• service(8)


•                 MINIX3

    • C.Giuffrida, “We   Crashed, Now What?,” USENIX HotDep’10
•
       F4

• is    kill
# cd servers/is
# vi dmp_kernel.c
# diff dmp_kernel.c.orig dmp_kernel.c
338c338
< ! printf("(%02u) %-7.7s %s %s %7d",
---
> ! printf("(%02u) %-7.7s %s %s %6d",
# make && make install
# kill 38
PS
 PID TTY   TIME   CMD
(-4)   ?   0h44   idle
(-3)   ?   0:00   clock
(-2)   ?   0:00   system
(-1)   ?   0:00   kernel
   5   ?   0:00   pm
   7   ?   0:00   vfs
   4   ?   0:00   rs
   8   ?   0:00   memory
:
   1   ?   0:00 init
:
 122 co    0:00 sh
 123 c1    0:00 getty
• MINIX3   book                                  v3.1.0
 ISO               Appendix B

 • MINIX3   book version (v3.1.0) current version (v3.1.8)



 • http://www.minix3.org/doc/
/USR/SRC
include           make world /usr/include


           sys           POSIX
          minix      MINIX 3 OS
          ibm        IBM PC
kernel
drivers
servers
• src/tools   make
 (       http://wiki.minix3.org/en/DevelopersGuide/RebuildingSystem)

  • /boot/boot:

  • /boot/images:

  • /sbin:

                  # cd /usr/src/tools
                  # make image
                  # make install
•   newminix
• MINIX     C/S

•



    •


        •


        •
S   kernel   R
•                                     send

                                  (          )
    • send    receive   sendrec                                   receive


    •

                                                 S   kernel   R

                                                                  receive
    •
        sendrec                       send
•

    • notify

      •
•                                              priv

    • ipc_to: IPC

    • traps: IPC          send receive           sendrec        notify

    •                               pm vfs      rs              sendrec
                    sendrec   send                    sendrec

                     pm       vfs      vm      inet     rs

                                     drivers
                                     kernel
sys_fork       PM
   sys_exec        PM        EXEC    SP
    sys_exit       PM
  sys_privctl       RS
   sys_irqctl    driver
  sys_devio      driver        I/O
  sys_umap       driver
 sys_vircopy    FS, driver
sys_physcopy     driver
 sys_getinfo        all
                                          P.208
FORK&EXEC
• UNIX              PDP-7

    •                                                    OS
                TSS

•                                   fork exec

    • fork   exec

        •                          SDS 930 TSS

    •

                        D.M.Ritchie, ”The evolution of the UNIX Time-sharing system,” 1979
•                          IDT
             iretd

•   CPU              TSS         SS   ESP
    stackframe_s

•                                           stackframe_s


•                                               iretd


    •
31                             16 15 14 13 12            8 7               0




                                    IA32
                                                                                    D
                                                                                P   P   0 0 1 0 1                           4
                                                                                    L

                                             31                             16 15                                       0


                                                    TSS                                                                     0

IDTR
                                             31                             16 15 14 13 12            8 7      5 4      0


  base        limit                                             31..16          P
                                                                                    D
                                                                                    P
                                                                                    L
                                                                                        0 D 1 1 0       0 0 0               4




                               IDT
                                             31                             16 15                                       0


                                                                                                            15..0           0

         +
             55                              31                             16 15 14 13 12

                                                                                    D
                                                                                                      8 7      5 4      0


                                                                31..16          P   P   0 D 1 1 1       0 0 0               4
                                                                                    L

                                             31                             16 15                                       0


                                                                                                            15..0           0

                                              DPL


             33   SYS386_VECTOR               P

                                              D                          1=32           0=16



                                                              5-2. IDT


                                    5.12.
                                                                                                      256
                                                          !                                                          "#$$

                                            32      255
             0        zero divide
                                                                            !                               %&'

                                                                          "#$$
                                                    !                                        ()*)+)
IA32
        SS                                        SS
        ESP                                       ESP
      EFLAGS                                    EFLAGS
                                                              IRET   pop
        CS                                        CS
        EIP                                       EIP
    (Error Code)                 CPU   push   (Error Code)



•                  push
•                         push                      push
•                    IRET                               pop
restart()

service(int)   syscall()

  save()




                           P.188
_RESTART
               struct stackframe_s (struct proc                          )
               call save                       save        jmp

                    SS                                        SS                k_stktop       _restart
                   ESP                                       ESP
                 EFLAGS                                    EFLAGS
                   CS                                        CS
                   EIP                                       EIP
           hwint_XX   ret address   (RETADR)     hwint_XX        ret address
                                                            EAX                            mov esp, k_stktop
                                                            ECX
save                                                        EDX
                                                            EBX                save
       ret                    jmp
                                                            ESP
              hwint_XX              ret        _restart                          push
                                                            EBP
                                                             ESI
  v3.1.8                                                    EDI
                                                      DS            ES
                                                      FS            GS
                               struct stackframe_s
call save


                  SS                                SS
                 ESP                               ESP
                EFLAGS                           EFLAGS
                 CS                                 CS
                 EIP                               EIP
          (Error Code)   CPU   push             old EFLAGS
                                                  old CS
                                                  old EIP
                               _exception or
_errexception
C

Weitere ähnliche Inhalte

Was ist angesagt?

BeagleBone Black: Platform Bring-Up with Upstream Components
BeagleBone Black: Platform Bring-Up with Upstream ComponentsBeagleBone Black: Platform Bring-Up with Upstream Components
BeagleBone Black: Platform Bring-Up with Upstream ComponentsGlobalLogic Ukraine
 
BeagleBone Black with Upstream Software
BeagleBone Black with Upstream SoftwareBeagleBone Black with Upstream Software
BeagleBone Black with Upstream SoftwareGlobalLogic Ukraine
 
Surge2014 talk - illumos State of the Community & POSIX Update
Surge2014 talk - illumos State of the Community & POSIX UpdateSurge2014 talk - illumos State of the Community & POSIX Update
Surge2014 talk - illumos State of the Community & POSIX UpdateGarrett D'Amore
 
Confraria SECURITY & IT - Lisbon Set 29, 2011
Confraria SECURITY & IT - Lisbon Set 29, 2011Confraria SECURITY & IT - Lisbon Set 29, 2011
Confraria SECURITY & IT - Lisbon Set 29, 2011ricardomcm
 
A Journey to Boot Linux on Raspberry Pi
A Journey to Boot Linux on Raspberry PiA Journey to Boot Linux on Raspberry Pi
A Journey to Boot Linux on Raspberry PiJian-Hong Pan
 
Introducing Swift - and the Sunset of Our Culture?
Introducing Swift - and the Sunset of Our Culture?Introducing Swift - and the Sunset of Our Culture?
Introducing Swift - and the Sunset of Our Culture?dankogai
 
明日から出来る! 指に優しいキー配列 (改訂版)
明日から出来る! 指に優しいキー配列 (改訂版)明日から出来る! 指に優しいキー配列 (改訂版)
明日から出来る! 指に優しいキー配列 (改訂版)tekezo
 
All Things Containers - TechParty FACCAT 2016
All Things Containers - TechParty FACCAT 2016All Things Containers - TechParty FACCAT 2016
All Things Containers - TechParty FACCAT 2016Fabiano Franz
 
Linux Container Basics
Linux Container BasicsLinux Container Basics
Linux Container BasicsMichael Kehoe
 
Keynote 1 - Engineering Software Analytics Studies
Keynote 1 - Engineering Software Analytics StudiesKeynote 1 - Engineering Software Analytics Studies
Keynote 1 - Engineering Software Analytics StudiesESEM 2014
 
Elephant bird build Error
Elephant bird build ErrorElephant bird build Error
Elephant bird build ErrorKapil Dewade
 
Building Network Functions with eBPF & BCC
Building Network Functions with eBPF & BCCBuilding Network Functions with eBPF & BCC
Building Network Functions with eBPF & BCCKernel TLV
 
Software Packaging for Cross OS Distribution
Software Packaging for Cross OS DistributionSoftware Packaging for Cross OS Distribution
Software Packaging for Cross OS DistributionJian-Hong Pan
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedureDhaval Kaneria
 
明日から出来る! 指に優しいキー配列
明日から出来る! 指に優しいキー配列明日から出来る! 指に優しいキー配列
明日から出来る! 指に優しいキー配列tekezo
 
Yum server ( FTP Server )
Yum server ( FTP Server ) Yum server ( FTP Server )
Yum server ( FTP Server ) MOHSIN HASAN
 

Was ist angesagt? (20)

BeagleBone Black: Platform Bring-Up with Upstream Components
BeagleBone Black: Platform Bring-Up with Upstream ComponentsBeagleBone Black: Platform Bring-Up with Upstream Components
BeagleBone Black: Platform Bring-Up with Upstream Components
 
eBPF Workshop
eBPF WorkshopeBPF Workshop
eBPF Workshop
 
BeagleBone Black with Upstream Software
BeagleBone Black with Upstream SoftwareBeagleBone Black with Upstream Software
BeagleBone Black with Upstream Software
 
Surge2014 talk - illumos State of the Community & POSIX Update
Surge2014 talk - illumos State of the Community & POSIX UpdateSurge2014 talk - illumos State of the Community & POSIX Update
Surge2014 talk - illumos State of the Community & POSIX Update
 
Confraria SECURITY & IT - Lisbon Set 29, 2011
Confraria SECURITY & IT - Lisbon Set 29, 2011Confraria SECURITY & IT - Lisbon Set 29, 2011
Confraria SECURITY & IT - Lisbon Set 29, 2011
 
A Journey to Boot Linux on Raspberry Pi
A Journey to Boot Linux on Raspberry PiA Journey to Boot Linux on Raspberry Pi
A Journey to Boot Linux on Raspberry Pi
 
Introducing Swift - and the Sunset of Our Culture?
Introducing Swift - and the Sunset of Our Culture?Introducing Swift - and the Sunset of Our Culture?
Introducing Swift - and the Sunset of Our Culture?
 
明日から出来る! 指に優しいキー配列 (改訂版)
明日から出来る! 指に優しいキー配列 (改訂版)明日から出来る! 指に優しいキー配列 (改訂版)
明日から出来る! 指に優しいキー配列 (改訂版)
 
All Things Containers - TechParty FACCAT 2016
All Things Containers - TechParty FACCAT 2016All Things Containers - TechParty FACCAT 2016
All Things Containers - TechParty FACCAT 2016
 
eBPF Basics
eBPF BasicseBPF Basics
eBPF Basics
 
Linux Container Basics
Linux Container BasicsLinux Container Basics
Linux Container Basics
 
Keynote 1 - Engineering Software Analytics Studies
Keynote 1 - Engineering Software Analytics StudiesKeynote 1 - Engineering Software Analytics Studies
Keynote 1 - Engineering Software Analytics Studies
 
Elephant bird build Error
Elephant bird build ErrorElephant bird build Error
Elephant bird build Error
 
Introduction to Modern U-Boot
Introduction to Modern U-BootIntroduction to Modern U-Boot
Introduction to Modern U-Boot
 
Building Network Functions with eBPF & BCC
Building Network Functions with eBPF & BCCBuilding Network Functions with eBPF & BCC
Building Network Functions with eBPF & BCC
 
Linux kernel system call
Linux kernel system callLinux kernel system call
Linux kernel system call
 
Software Packaging for Cross OS Distribution
Software Packaging for Cross OS DistributionSoftware Packaging for Cross OS Distribution
Software Packaging for Cross OS Distribution
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedure
 
明日から出来る! 指に優しいキー配列
明日から出来る! 指に優しいキー配列明日から出来る! 指に優しいキー配列
明日から出来る! 指に優しいキー配列
 
Yum server ( FTP Server )
Yum server ( FTP Server ) Yum server ( FTP Server )
Yum server ( FTP Server )
 

Ähnlich wie オペレーティングシステム 設計と実装 第3版(20101211)

スマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみた
スマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみたスマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみた
スマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみたTaro Matsuzawa
 
SMP Implementation for OpenBSD/sgi [Japanese Edition]
SMP Implementation for OpenBSD/sgi [Japanese Edition]SMP Implementation for OpenBSD/sgi [Japanese Edition]
SMP Implementation for OpenBSD/sgi [Japanese Edition]Takuya ASADA
 
イマドキなNetwork/IO
イマドキなNetwork/IOイマドキなNetwork/IO
イマドキなNetwork/IOTakuya ASADA
 
Cncf k8s_network_part1
Cncf k8s_network_part1Cncf k8s_network_part1
Cncf k8s_network_part1Erhwen Kuo
 
SMP implementation for OpenBSD/sgi
SMP implementation for OpenBSD/sgiSMP implementation for OpenBSD/sgi
SMP implementation for OpenBSD/sgiTakuya ASADA
 
Jonny_Martin-Asterisk
Jonny_Martin-AsteriskJonny_Martin-Asterisk
Jonny_Martin-Asterisktutorialsruby
 
Jonny_Martin-Asterisk
Jonny_Martin-AsteriskJonny_Martin-Asterisk
Jonny_Martin-Asterisktutorialsruby
 
Jonny_Martin-Asterisk
Jonny_Martin-AsteriskJonny_Martin-Asterisk
Jonny_Martin-Asterisktutorialsruby
 
Jonny_Martin-Asterisk
Jonny_Martin-AsteriskJonny_Martin-Asterisk
Jonny_Martin-Asterisktutorialsruby
 
09_Practical Multicore programming
09_Practical Multicore programming09_Practical Multicore programming
09_Practical Multicore programmingnoerror
 
シェル芸でライフハック(特論)
シェル芸でライフハック(特論)シェル芸でライフハック(特論)
シェル芸でライフハック(特論)Yuki Shimazaki
 
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全維泰 蔡
 
Linux Perf Tools
Linux Perf ToolsLinux Perf Tools
Linux Perf ToolsRaj Pandey
 
スケジューラからみたOSの話
スケジューラからみたOSの話スケジューラからみたOSの話
スケジューラからみたOSの話Takeshi Fujiwara
 
Linux Performance Tools 2014
Linux Performance Tools 2014Linux Performance Tools 2014
Linux Performance Tools 2014Brendan Gregg
 
How to Root 10 Million Phones with One Exploit
How to Root 10 Million Phones with One ExploitHow to Root 10 Million Phones with One Exploit
How to Root 10 Million Phones with One ExploitJiahong Fang
 
AsiaBSDCon2023 - Hardening Emulated Devices in OpenBSD’s vmd(8) Hypervisor
AsiaBSDCon2023 - Hardening Emulated Devices in OpenBSD’s vmd(8) HypervisorAsiaBSDCon2023 - Hardening Emulated Devices in OpenBSD’s vmd(8) Hypervisor
AsiaBSDCon2023 - Hardening Emulated Devices in OpenBSD’s vmd(8) HypervisorDave Voutila
 
Is That A Penguin In My Windows?
Is That A Penguin In My Windows?Is That A Penguin In My Windows?
Is That A Penguin In My Windows?zeroSteiner
 

Ähnlich wie オペレーティングシステム 設計と実装 第3版(20101211) (20)

スマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみた
スマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみたスマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみた
スマートフォン勉強会@関東 #11 どう考えてもdisconなものをiPhoneに移植してみた
 
SMP Implementation for OpenBSD/sgi [Japanese Edition]
SMP Implementation for OpenBSD/sgi [Japanese Edition]SMP Implementation for OpenBSD/sgi [Japanese Edition]
SMP Implementation for OpenBSD/sgi [Japanese Edition]
 
イマドキなNetwork/IO
イマドキなNetwork/IOイマドキなNetwork/IO
イマドキなNetwork/IO
 
SdE2 - Pilot Tock
SdE2 - Pilot TockSdE2 - Pilot Tock
SdE2 - Pilot Tock
 
Cncf k8s_network_part1
Cncf k8s_network_part1Cncf k8s_network_part1
Cncf k8s_network_part1
 
SMP implementation for OpenBSD/sgi
SMP implementation for OpenBSD/sgiSMP implementation for OpenBSD/sgi
SMP implementation for OpenBSD/sgi
 
Jonny_Martin-Asterisk
Jonny_Martin-AsteriskJonny_Martin-Asterisk
Jonny_Martin-Asterisk
 
Jonny_Martin-Asterisk
Jonny_Martin-AsteriskJonny_Martin-Asterisk
Jonny_Martin-Asterisk
 
Jonny_Martin-Asterisk
Jonny_Martin-AsteriskJonny_Martin-Asterisk
Jonny_Martin-Asterisk
 
Jonny_Martin-Asterisk
Jonny_Martin-AsteriskJonny_Martin-Asterisk
Jonny_Martin-Asterisk
 
09_Practical Multicore programming
09_Practical Multicore programming09_Practical Multicore programming
09_Practical Multicore programming
 
シェル芸でライフハック(特論)
シェル芸でライフハック(特論)シェル芸でライフハック(特論)
シェル芸でライフハック(特論)
 
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
 
Linux Perf Tools
Linux Perf ToolsLinux Perf Tools
Linux Perf Tools
 
スケジューラからみたOSの話
スケジューラからみたOSの話スケジューラからみたOSの話
スケジューラからみたOSの話
 
Linux Performance Tools 2014
Linux Performance Tools 2014Linux Performance Tools 2014
Linux Performance Tools 2014
 
How to Root 10 Million Phones with One Exploit
How to Root 10 Million Phones with One ExploitHow to Root 10 Million Phones with One Exploit
How to Root 10 Million Phones with One Exploit
 
Workshop@naha_val3
Workshop@naha_val3Workshop@naha_val3
Workshop@naha_val3
 
AsiaBSDCon2023 - Hardening Emulated Devices in OpenBSD’s vmd(8) Hypervisor
AsiaBSDCon2023 - Hardening Emulated Devices in OpenBSD’s vmd(8) HypervisorAsiaBSDCon2023 - Hardening Emulated Devices in OpenBSD’s vmd(8) Hypervisor
AsiaBSDCon2023 - Hardening Emulated Devices in OpenBSD’s vmd(8) Hypervisor
 
Is That A Penguin In My Windows?
Is That A Penguin In My Windows?Is That A Penguin In My Windows?
Is That A Penguin In My Windows?
 

Mehr von Ryousei Takano

Error Permissive Computing
Error Permissive ComputingError Permissive Computing
Error Permissive ComputingRyousei Takano
 
Opportunities of ML-based data analytics in ABCI
Opportunities of ML-based data analytics in ABCIOpportunities of ML-based data analytics in ABCI
Opportunities of ML-based data analytics in ABCIRyousei Takano
 
ABCI: An Open Innovation Platform for Advancing AI Research and Deployment
ABCI: An Open Innovation Platform for Advancing AI Research and DeploymentABCI: An Open Innovation Platform for Advancing AI Research and Deployment
ABCI: An Open Innovation Platform for Advancing AI Research and DeploymentRyousei Takano
 
クラウド環境におけるキャッシュメモリQoS制御の評価
クラウド環境におけるキャッシュメモリQoS制御の評価クラウド環境におけるキャッシュメモリQoS制御の評価
クラウド環境におけるキャッシュメモリQoS制御の評価Ryousei Takano
 
USENIX NSDI 2016 (Session: Resource Sharing)
USENIX NSDI 2016 (Session: Resource Sharing)USENIX NSDI 2016 (Session: Resource Sharing)
USENIX NSDI 2016 (Session: Resource Sharing)Ryousei Takano
 
User-space Network Processing
User-space Network ProcessingUser-space Network Processing
User-space Network ProcessingRyousei Takano
 
Flow-centric Computing - A Datacenter Architecture in the Post Moore Era
Flow-centric Computing - A Datacenter Architecture in the Post Moore EraFlow-centric Computing - A Datacenter Architecture in the Post Moore Era
Flow-centric Computing - A Datacenter Architecture in the Post Moore EraRyousei Takano
 
A Look Inside Google’s Data Center Networks
A Look Inside Google’s Data Center NetworksA Look Inside Google’s Data Center Networks
A Look Inside Google’s Data Center NetworksRyousei Takano
 
クラウド時代の半導体メモリー技術
クラウド時代の半導体メモリー技術クラウド時代の半導体メモリー技術
クラウド時代の半導体メモリー技術Ryousei Takano
 
AIST Super Green Cloud: lessons learned from the operation and the performanc...
AIST Super Green Cloud: lessons learned from the operation and the performanc...AIST Super Green Cloud: lessons learned from the operation and the performanc...
AIST Super Green Cloud: lessons learned from the operation and the performanc...Ryousei Takano
 
IEEE CloudCom 2014参加報告
IEEE CloudCom 2014参加報告IEEE CloudCom 2014参加報告
IEEE CloudCom 2014参加報告Ryousei Takano
 
Expectations for optical network from the viewpoint of system software research
Expectations for optical network from the viewpoint of system software researchExpectations for optical network from the viewpoint of system software research
Expectations for optical network from the viewpoint of system software researchRyousei Takano
 
Exploring the Performance Impact of Virtualization on an HPC Cloud
Exploring the Performance Impact of Virtualization on an HPC CloudExploring the Performance Impact of Virtualization on an HPC Cloud
Exploring the Performance Impact of Virtualization on an HPC CloudRyousei Takano
 
不揮発メモリとOS研究にまつわる何か
不揮発メモリとOS研究にまつわる何か不揮発メモリとOS研究にまつわる何か
不揮発メモリとOS研究にまつわる何かRyousei Takano
 
High-resolution Timer-based Packet Pacing Mechanism on the Linux Operating Sy...
High-resolution Timer-based Packet Pacing Mechanism on the Linux Operating Sy...High-resolution Timer-based Packet Pacing Mechanism on the Linux Operating Sy...
High-resolution Timer-based Packet Pacing Mechanism on the Linux Operating Sy...Ryousei Takano
 
クラウドの垣根を超えた高性能計算に向けて~AIST Super Green Cloudでの試み~
クラウドの垣根を超えた高性能計算に向けて~AIST Super Green Cloudでの試み~クラウドの垣根を超えた高性能計算に向けて~AIST Super Green Cloudでの試み~
クラウドの垣根を超えた高性能計算に向けて~AIST Super Green Cloudでの試み~Ryousei Takano
 
From Rack scale computers to Warehouse scale computers
From Rack scale computers to Warehouse scale computersFrom Rack scale computers to Warehouse scale computers
From Rack scale computers to Warehouse scale computersRyousei Takano
 
高性能かつスケールアウト可能なHPCクラウド AIST Super Green Cloud
高性能かつスケールアウト可能なHPCクラウド AIST Super Green Cloud高性能かつスケールアウト可能なHPCクラウド AIST Super Green Cloud
高性能かつスケールアウト可能なHPCクラウド AIST Super Green CloudRyousei Takano
 
Iris: Inter-cloud Resource Integration System for Elastic Cloud Data Center
Iris: Inter-cloud Resource Integration System for Elastic Cloud Data CenterIris: Inter-cloud Resource Integration System for Elastic Cloud Data Center
Iris: Inter-cloud Resource Integration System for Elastic Cloud Data CenterRyousei Takano
 

Mehr von Ryousei Takano (20)

Error Permissive Computing
Error Permissive ComputingError Permissive Computing
Error Permissive Computing
 
Opportunities of ML-based data analytics in ABCI
Opportunities of ML-based data analytics in ABCIOpportunities of ML-based data analytics in ABCI
Opportunities of ML-based data analytics in ABCI
 
ABCI: An Open Innovation Platform for Advancing AI Research and Deployment
ABCI: An Open Innovation Platform for Advancing AI Research and DeploymentABCI: An Open Innovation Platform for Advancing AI Research and Deployment
ABCI: An Open Innovation Platform for Advancing AI Research and Deployment
 
ABCI Data Center
ABCI Data CenterABCI Data Center
ABCI Data Center
 
クラウド環境におけるキャッシュメモリQoS制御の評価
クラウド環境におけるキャッシュメモリQoS制御の評価クラウド環境におけるキャッシュメモリQoS制御の評価
クラウド環境におけるキャッシュメモリQoS制御の評価
 
USENIX NSDI 2016 (Session: Resource Sharing)
USENIX NSDI 2016 (Session: Resource Sharing)USENIX NSDI 2016 (Session: Resource Sharing)
USENIX NSDI 2016 (Session: Resource Sharing)
 
User-space Network Processing
User-space Network ProcessingUser-space Network Processing
User-space Network Processing
 
Flow-centric Computing - A Datacenter Architecture in the Post Moore Era
Flow-centric Computing - A Datacenter Architecture in the Post Moore EraFlow-centric Computing - A Datacenter Architecture in the Post Moore Era
Flow-centric Computing - A Datacenter Architecture in the Post Moore Era
 
A Look Inside Google’s Data Center Networks
A Look Inside Google’s Data Center NetworksA Look Inside Google’s Data Center Networks
A Look Inside Google’s Data Center Networks
 
クラウド時代の半導体メモリー技術
クラウド時代の半導体メモリー技術クラウド時代の半導体メモリー技術
クラウド時代の半導体メモリー技術
 
AIST Super Green Cloud: lessons learned from the operation and the performanc...
AIST Super Green Cloud: lessons learned from the operation and the performanc...AIST Super Green Cloud: lessons learned from the operation and the performanc...
AIST Super Green Cloud: lessons learned from the operation and the performanc...
 
IEEE CloudCom 2014参加報告
IEEE CloudCom 2014参加報告IEEE CloudCom 2014参加報告
IEEE CloudCom 2014参加報告
 
Expectations for optical network from the viewpoint of system software research
Expectations for optical network from the viewpoint of system software researchExpectations for optical network from the viewpoint of system software research
Expectations for optical network from the viewpoint of system software research
 
Exploring the Performance Impact of Virtualization on an HPC Cloud
Exploring the Performance Impact of Virtualization on an HPC CloudExploring the Performance Impact of Virtualization on an HPC Cloud
Exploring the Performance Impact of Virtualization on an HPC Cloud
 
不揮発メモリとOS研究にまつわる何か
不揮発メモリとOS研究にまつわる何か不揮発メモリとOS研究にまつわる何か
不揮発メモリとOS研究にまつわる何か
 
High-resolution Timer-based Packet Pacing Mechanism on the Linux Operating Sy...
High-resolution Timer-based Packet Pacing Mechanism on the Linux Operating Sy...High-resolution Timer-based Packet Pacing Mechanism on the Linux Operating Sy...
High-resolution Timer-based Packet Pacing Mechanism on the Linux Operating Sy...
 
クラウドの垣根を超えた高性能計算に向けて~AIST Super Green Cloudでの試み~
クラウドの垣根を超えた高性能計算に向けて~AIST Super Green Cloudでの試み~クラウドの垣根を超えた高性能計算に向けて~AIST Super Green Cloudでの試み~
クラウドの垣根を超えた高性能計算に向けて~AIST Super Green Cloudでの試み~
 
From Rack scale computers to Warehouse scale computers
From Rack scale computers to Warehouse scale computersFrom Rack scale computers to Warehouse scale computers
From Rack scale computers to Warehouse scale computers
 
高性能かつスケールアウト可能なHPCクラウド AIST Super Green Cloud
高性能かつスケールアウト可能なHPCクラウド AIST Super Green Cloud高性能かつスケールアウト可能なHPCクラウド AIST Super Green Cloud
高性能かつスケールアウト可能なHPCクラウド AIST Super Green Cloud
 
Iris: Inter-cloud Resource Integration System for Elastic Cloud Data Center
Iris: Inter-cloud Resource Integration System for Elastic Cloud Data CenterIris: Inter-cloud Resource Integration System for Elastic Cloud Data Center
Iris: Inter-cloud Resource Integration System for Elastic Cloud Data Center
 

Kürzlich hochgeladen

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 

Kürzlich hochgeladen (20)

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 

オペレーティングシステム 設計と実装 第3版(20101211)

  • 2. MINIX • • Google Group https://groups.google.com/group/minixReadingClub
  • 3. Andrew S. Tanenbaum Albert S. Woodhull
  • 4. OS OS
  • 5.
  • 6. • • MINIX 3
  • 7. MINIX • 1987 MINIX 1: UNIX (v7) OS • 8088 16bit • 1997 MINIX 2 • 386 32bit • v7 → POSIX.1 IEEE1003.1/ISO 9945-1 • 2006 MINIX 3 (book version MINIX 3.1.0)
  • 8. OS • OS • CPU IO • CPU • • OS • • OS
  • 9. 1. fork, waitpid, exec, exit, ... 2. sigaction, sigreturn, kill, alarm, ... 3. creat, open, close, read, write, ... 4. mkdir, rmdir, mount, unmount, chdir, ... 5. chmod, chown, unmask, ... 6. time, stime, utime, times
  • 10. OS THE MULTICS VM/370 exokernel MINIX 3
  • 12. Jochen Liedtke “Toward Real Microkernels,” CACM Vol. 39, No.9, 1996.
  • 13. A New Hope: • 1980 UNIX • Mach Chorus Mach • The Microkernel Strikes Back: • • L4 Exokernel • Return of Virtual Machines: • • VMWare Xen
  • 14.
  • 15. • CPU • • OS CPU
  • 16. • • ‣CPU • ‣ • Peterson • TSL • • Mars Pathfinder’s Sojourner
  • 17. • Peterson • Dekker • N • Filter • Lamport Bakery • TSL
  • 18. PERTERSON int turn; boolean interested[2]; do { do { enter region interested[0] = TRUE; interested[1] = TRUE; turn = 0; turn = 1; while (turn == 0 && interested[1]); while (turn == 1 && interested[0]); /* critical region */ /* critical region */ leave region interested[0] = FALSE; interested[1] = FALSE; /* non critical region */ /* non critical region */ } while (TRUE); } while (TRUE); 0 1
  • 19. TSL • Test-and-Set Lock • read write read cmp 1 • • ts (System/360) • cas (68000, SPARC) • xchg, cmpxchg (x86) • ll/sc (MIPS), ldrex/strex (ARMv6)
  • 20. sleep&wakeup • Semafore Semaphore • P: down sleep • V: up wakeup • • • • • •
  • 21. • CPU I/O • • • • •
  • 22. MINIX 3 4 init ... 3 (pm) (vfs) (vm) (inet) (rs) TTY Ethernet 2 ... (at_wini) (tty) (lance) 1 (kernel) (system) (clock) P.121
  • 23. • boot monitor • init • MINIX kernel • • init(8) • /etc/rc • service(8) • /etc/ttytab getty (login)
  • 24. • PM • • service(8) • MINIX3 • C.Giuffrida, “We Crashed, Now What?,” USENIX HotDep’10
  • 25. F4 • is kill # cd servers/is # vi dmp_kernel.c # diff dmp_kernel.c.orig dmp_kernel.c 338c338 < ! printf("(%02u) %-7.7s %s %s %7d", --- > ! printf("(%02u) %-7.7s %s %s %6d", # make && make install # kill 38
  • 26. PS PID TTY TIME CMD (-4) ? 0h44 idle (-3) ? 0:00 clock (-2) ? 0:00 system (-1) ? 0:00 kernel 5 ? 0:00 pm 7 ? 0:00 vfs 4 ? 0:00 rs 8 ? 0:00 memory : 1 ? 0:00 init : 122 co 0:00 sh 123 c1 0:00 getty
  • 27. • MINIX3 book v3.1.0 ISO Appendix B • MINIX3 book version (v3.1.0) current version (v3.1.8) • http://www.minix3.org/doc/
  • 28. /USR/SRC include make world /usr/include sys POSIX minix MINIX 3 OS ibm IBM PC kernel drivers servers
  • 29. • src/tools make ( http://wiki.minix3.org/en/DevelopersGuide/RebuildingSystem) • /boot/boot: • /boot/images: • /sbin: # cd /usr/src/tools # make image # make install
  • 30. newminix
  • 31. • MINIX C/S • • • •
  • 32. S kernel R • send ( ) • send receive sendrec receive • S kernel R receive • sendrec send
  • 33. • notify •
  • 34. priv • ipc_to: IPC • traps: IPC send receive sendrec notify • pm vfs rs sendrec sendrec send sendrec pm vfs vm inet rs drivers kernel
  • 35. sys_fork PM sys_exec PM EXEC SP sys_exit PM sys_privctl RS sys_irqctl driver sys_devio driver I/O sys_umap driver sys_vircopy FS, driver sys_physcopy driver sys_getinfo all P.208
  • 36. FORK&EXEC • UNIX PDP-7 • OS TSS • fork exec • fork exec • SDS 930 TSS • D.M.Ritchie, ”The evolution of the UNIX Time-sharing system,” 1979
  • 37. IDT iretd • CPU TSS SS ESP stackframe_s • stackframe_s • iretd •
  • 38. 31 16 15 14 13 12 8 7 0 IA32 D P P 0 0 1 0 1 4 L 31 16 15 0 TSS 0 IDTR 31 16 15 14 13 12 8 7 5 4 0 base limit 31..16 P D P L 0 D 1 1 0 0 0 0 4 IDT 31 16 15 0 15..0 0 + 55 31 16 15 14 13 12 D 8 7 5 4 0 31..16 P P 0 D 1 1 1 0 0 0 4 L 31 16 15 0 15..0 0 DPL 33 SYS386_VECTOR P D 1=32 0=16 5-2. IDT 5.12. 256 ! "#$$ 32 255 0 zero divide ! %&' "#$$ ! ()*)+)
  • 39. IA32 SS SS ESP ESP EFLAGS EFLAGS IRET pop CS CS EIP EIP (Error Code) CPU push (Error Code) • push • push push • IRET pop
  • 40. restart() service(int) syscall() save() P.188
  • 41. _RESTART struct stackframe_s (struct proc ) call save save jmp SS SS k_stktop _restart ESP ESP EFLAGS EFLAGS CS CS EIP EIP hwint_XX ret address (RETADR) hwint_XX ret address EAX mov esp, k_stktop ECX save EDX EBX save ret jmp ESP hwint_XX ret _restart push EBP ESI v3.1.8 EDI DS ES FS GS struct stackframe_s
  • 42. call save SS SS ESP ESP EFLAGS EFLAGS CS CS EIP EIP (Error Code) CPU push old EFLAGS old CS old EIP _exception or _errexception C