tutorial_lc.dvi

Similar documents
13 I/O

A Responsive Processor for Parallel/Distributed Real-time Processing

リアルタイムシステム

橡EN1165.PDF

スライド 1

26 FPGA FPGA (Field Programmable Gate Array) ASIC (Application Specific Integrated Circuit) FPGA FPGA FPGA FPGA Linux FreeDOS skewed way L1

WinDriver PCI Quick Start Guide

,…I…y…„†[…e…B…fi…O…V…X…e…•‡Ì…J†[…l…‰fi®“ì‡Ì›Â”‰›»pdfauthor

Microsoft Word - sbnt40r7.doc

untitled

SmartLMSユーザーズガイド<講師編>

Intel Memory Protection Extensions(Intel MPX) x86, x CPU skylake 2015 Intel Software Development Emulator 本資料に登場する Intel は Intel Corp. の登録

untitled

Cell/B.E. BlockLib

LT 低コスト、シャットダウン機能付き デュアルおよびトリプル300MHz 電流帰還アンプ

1 2

FreeBSD 1

00-COVER.P65



( ) 3 1 ( ), ( ).. 1

strtok-count.eps


Microsoft Word - C.....u.K...doc

/* sansu1.c */ #include <stdio.h> main() { int a, b, c; /* a, b, c */ a = 200; b = 1300; /* a 200 */ /* b 200 */ c = a + b; /* a b c */ }

Windows XP Windows Me Windows 98 Second Edition Windows /... 25

アセンブラ入門(CASL II) 第3版

: Nonblocking I/O readpartial read EOF Solaris FILE 256 ungetc SEGV errno stdio considered harmful p.

1 C STL(1) C C C libc C C C++ STL(Standard Template Library ) libc libc C++ C STL libc STL iostream Algorithm libc STL string vector l

E for LINUX UNIX Windows 10

本機をお使いの方へ

1 2

untitled

PrintWalker/LXE インストールガイド

etrust Access Control etrust Access Control UNIX(Linux, Windows) 2

1 2

1 1 TA, ,9 1. ( 2. TM TM GUI TM 1. P7-13 TM Notepad, Meadow, ( P109 ). 2. (shisaku01/sys test)


PC Windows 95, Windows 98, Windows NT, Windows 2000, MS-DOS, UNIX CPU

Express5800/R110a-1Hユーザーズガイド

1) // 2) I/O 3) Japan Advanced Institute of Science and Technology 2013/07/26 1

CPU Levels in the memory hierarchy Level 1 Level 2... Increasing distance from the CPU in access time Level n Size of the memory at each level 1: 2.2

Linuxデバイスドライバ.PDF

REX-5051fx,ex User's Manual

Express5800/120Ed

thesis.dvi

NI P1200 Release Notes Cover

PROLIANT ML


NL-22/NL-32取扱説明書_操作編

Apache Web Server 2 Compaq ActiveAnswers Deskpro Compaq Insight Manager Fastart Systempro Systempro/LT ProLiant ROMPaq Qvision SmartStart NetFlex Quic

08+11Extra

untitled

エラー処理・分割コンパイル・コマンドライン引数

チュートリアル XP Embedded 入門編

Oracle Database 11g × Hitachi Storage Solutionsのベストプラクティス

IP L09( Tue) : Time-stamp: Tue 14:52 JST hig TCP/IP. IP,,,. ( ) L09 IP (2017) 1 / 28

自動シャットタ<3099>ウンクイックインストールカ<3099>イト<3099>.indb

V850E2/ML4 マイクロコンピュータ Peripheral LibUSB Demo アプリケーションノート

Microsoft PowerPoint - dev1.ppt

CM-3G 周辺モジュール拡張技術文書 MS5607センサ(温度、気圧)

第5回お試しアカウント付き並列プログラミング講習会

EDSF2006_ PDF

DL1720/DL1740ディジタルオシロスコープユーザーズマニュアル

Audiophile USB

EQUIUM EQUIUM S5010 1

ExpressUpdate Agent インストレーションマニュアル

joho07-1.ppt


94

橡Webcamユーザーガイド03.PDF

C

(Version: 2017/4/18) Intel CPU 1 Intel CPU( AMD CPU) 64bit SIMD Inline Assemler Windows Visual C++ Linux gcc 2 FPU SSE2 Intel CPU do

1 142

LHA-FW801

Solution Report

untitled

(1)

N08

Nios® II HAL API を使用したソフトウェア・サンプル集 「Modular Scatter-Gather DMA Core」

Nios II - PIO を使用した I2C-Bus (2ワイヤ)マスタの実装

Express5800/120Le

double float

For_Beginners_CAPL.indd

(1/2) 2/45 HPC top runner application programmer PC-9801F N88-BASIC Quick BASIC + DOS ( ) BCB Windows Percolation, Event-driven MD ActionScript Flash

4

1 2 TonePrint TonePrint Editor Ready

Linux2.4でのメモリ管理機構

:



4

1 122

BIOS 設定書 BIOS 出荷時設定 BIOS 設定を工場出荷状態に戻す必要がある場合は 本書の手順に従って作業をおこなってください BIOS 設定を変更されていない場合は 本書の作業は必要ありません BIOS 出荷時設定は以下の手順でおこないます スタート A) BIOS の Setup Uti

HP ProLiant 500シリーズ

imcs04 ソフトウェアマニュアル imcs04 ソフトウェアマニュアル Ver1.4 株式会社イクシスリサーチ , ixs Research Corporation All right reserved.

main.dvi

日歯雑誌(H22・7月号)HP用/p06‐16 クリニカル① 田崎

NewsLetter-No2

GNU/Linux on SuperH g,,,,, GNU/Linux on SuperH [1] SuperH (SH-3 SH-4) GNU/Linux g linux-kernel 1998 Linux (SH-3) g GD

Transcription:

00 Linux v.s. RT Linux v.s. ART-Linux Linux RT-Linux ART-Linux Linux kumagai@emura.mech.tohoku.ac.jp

1 1.1 Linux Yes, No.,. OS., Yes. Linux,.,, Linux., Linux.,, Linux. Linux.,,. Linux,.,, 0..,. RT-Linux (1)(2), ART-Linux (4)(5),.,... RT-Linux ART-Linux,., Linux OS, OS (6)..,,, MS-DOS,.,,. 2 00

1.2 1.2. Linux(UNIX), MS-DOS OS,, ( ) 1.3 ( ),.,,.,,.,,,,,,.,,., Linux,, Linux., RT-Linux, ART-Linux. Linux 3

2 Linux RTLinux ART-Linux Linux, ( ), (, ),.,,,,., Linux, ( ).,.,. 1 [ms] ( ),., Linux,,.,,,,. 2.1 Linux,,., ( ),., (, ).,. while(1) { DoControl(); usleep(15000); } // // 4 00

2.1 21 cycle_15.xy 20.5 Interval [ms] 20 19.5 19 0 100 200 300 400 500 600 700 800 900 1000 Cycle 2.1 15 [ms], 1000,,.,,. MS-DOS, CPU,,,., Linux ( ) CPU,,.,. 2.1., 20 [ms].,,. 20 [ms] 10 [ms] (Alpha Linux 2,1 [ms] )., Linux, 20 [ms], 10 [ms],. Linux 5

2 LINUX 6 5 Interval [ms] 4 3 2 1 0 0 10 20 30 40 50 Time [s] 2.2 5 [ms] 10000 20 [ms] 10 [ms],.,.,,. /usr/src/linux/include/asm/param.h HZ. 100 1000.,, lilo.,.,,., top 1000%.., 5 [ms] 2.2. 10000, 5 [ms]. ( ). 100 [Hz] (=10 [ms]), 1[kHz](=1 [ms]) ( 1k-Linux ).,,,., (HZ=100 ),,. 6 00

2.2 Misc process Cyclic process CPU idle Misc process Cyclic process CPU idle 2.3 ( ) 2.2,..,.,.,. 2.3 1k-Linux, 3 [ms] ( )., CPU., H CPU (, CPU ).. CPU,,. (=3 [ms]),.,,.,.,,,. Linux 7

2 LINUX 2.2.1 CPU Linux OS,, CPU (CPU ),. (, (2) ). CPU, CPU., ( ), ( ). CPU. CPU. CPU.. Linux(UNIX) ( :ps aux),., CPU,,., Linux,,, CPU..,,,, CPU, ( ).,. CPU.,, 1.,, ( ). ( ),., 10 [ms] ( 20 =200[ms])..,,.,,, CPU. 8 00

2.3 2.2.2 Linux,.,,.,,.,,.,, CPU.,,,, CPU.,.,, ( ).. CPU,.,,,,, CPU,. Linux,,,,.. 2.3 2.3.1,, ( ).,,,. Linux 9

2 LINUX,,,.. gettimeofday()., ( ).,,. Pentium CPU. 64, CPU,, CPU., CPU (8)., Linux,.. unsigned long long GetTick(void) { unsigned int h,l; /* read Pentium time-stamp counter */ asm (".byte 0x0f,0x31" : "=a" (l),"=d" (h)); return ((unsigned long long int)h<<32) l; } (, gcc O ). long long, 64bit (printf %Ld ).,, CPU,. CPU, ( 1% ).,,, CPU Pentium. 2.3.2,.,,.. 2.4. 2 3,6 [ms] 3. 4,5 [ms]. 2,., ( (2)). (, ). 10 00

2.3 Misc process Cyclic process(2) Cyclic process(1) CPU idle Misc process Cyclic process(2) Cyclic process(1) CPU idle 2.4 2 ( 3,6 [ms] 4,5 [ms] ),,,,. 2.3.3 CPU, CPU.,, CPU.,,. Linux, UNIX nice, nice() setpriority()., ±20. nice, 20,. 20, Linux 11

2 LINUX CPU. Linux 20 ( 1 ), 10 [ms] ( 0 )., 20( ) 0( ), 400[ms](=10 [ms] 40):200[ms] CPU ( )., 2, CPU.,, root.. CPU,., Linux CPU. sched setscheduler(),.,, X ( ),., ( 1 )..,. (nice 20), 1.,,.,. 1,,,,.,, CPU,. 12 00

2.4. ----------------------------------------------------------------------- # nice --20./program./program 20. --20 - + -20 ----------------------------------------------------------------------- nice(-20); nice <unistd.h> setpriority(prio_process, getpid(), -20); <sys/time.h><sys/resource.h> setpriority, ----------------------------------------------------------------------- struct sched_param sp; sp.sched_priority=99; // 1( )-99( ) sched_setscheduler(0,sched_fifo,&sp); <sched.h> ----------------------------------------------------------------------- 2.4,,.,., ( ).,.,,.... 20 [ms] linux/include/asm/param.h HZ., 1., HZ.,,. Linux 13

3 Linux Linux., OS,.,,OS.,, ( ),. Linux, I/O, root,. I/O,. 3.1 I/O (x86),., I/O,., I/O., Intel 86 CPU (, I/O ). 3.1.1 I/O, ( ). int ioperm(unsigned long from, unsigned long num, int turn on); I/O from, num. turn on 1,., 14 00

3.1 I/O (X86)., 0x3ff,, iopl(). int iopl(int level); I/O. level 3 ( 0)., PCI I/O 0x3ff,, iopl(3);.,, unistd.h, sys/io.h ( man iopl, man ioperm )., root. root (su), root (chown root ), setuid (chmod +s ).,, root,., root, ( or ). 3.1.2 I/O,, I/O. unsigned char inb(unsigned short port); unsigned short inw(unsigned short port); unsigned int inl(unsigned short port); port 1(inb), 2(inw), 4(inl). void outb(unsigned char value, unsigned short port); void outw(unsigned short value, unsigned short port); void outl(unsigned int value, unsigned short port); port 1(outb), 2(outw), 4(outl) value. asm/io.h, gcc O., MS-DOS out?., Segmentation Fault (SIGSEGV). Linux 15

3 LINUX 3.2 I/O, ( )., /dev/mem., read()/write()., lseek();., open( /dev/mem, O RDONLY(O RDWD)); lseek(fd, address, SEEK SET);, read/write(fd, buf, count);,., lseek();. Linux,,.,., mmap(), read/write(),. 3.3 PCI PCI I/O.,,,. PCI,,. /proc/pci. cat /proc/pci PCI. % cat /proc/pci PCI devices found: Bus 0, device 16, function 0: Multimedia video controller: Intel SAA7116 (rev 0). Medium devsel. IRQ 9. Master Capable. Latency=64. : Bus 0, device 15, function 0: Bridge: Unknown vendor Unknown device (rev 1). 16 00

3.3 PCI Delay [ms] 0.45 0.4 0.35 0.3 0.25 0.2 0.15 0.1 0.05 0 0 100 200 300 400 500 600 700 800 900 1000 Cycle intsel.xy 3.1 Vendor id=136c. Device id=9054. Medium devsel. Fast back-to-back capable. IRQ 10. Non-prefetchable 32 bit memory at 0xec002000. I/O at 0x1400. I/O at 0x14f0. :,, IDE.,,, Linux. Vendor id, Device id.,.. http://www.pcisig.com/membership/vendors/index.html,.,. Vendor=136c, Device=9054 48bit. 16, 0xec002000, 0x1400, 14f0 I/O, IRQ10. I/O 2,,, 0x14f0.,, 2,. Linux 17

3 LINUX 3.4,.,.,,,,., select() (10). 3.1., 366[MHz] Celeron 2, (1k-Linux 2.2.10, X,, ). [µs].,.,.,,.,, C (10).,,. 3.5, Linux. I/O, mmap (10)., PCI,, MS-DOS,.,. 18 00

4, Linux,.,,,..., OS,.,,,,. OS,.,, 1,,,,.,,,,,. WEB. http://www.mechatronics.mech.tohoku.ac.jp/~kumagai/linux/,,,. Linux 19

(1) Real-Time Linux, http://www.rtlinux.org/ (2), : LINUX /, (1999) (3) 99 RT-Linux, (1999) (4),, :,, 355/356(1998) (5) : ART-Linux, ART-Linux : ART-Linux 1999 11, CQ (1999) (6) : PC/AT OS, Vol.16 No.8, 8/13(1998) (7) : Linux ( 1/2 ), 17, 847/850(1999) (8) Intel Architectrue Softoware Developer s Manual Volume 3: System Programming Guide Order Number 243192, 14-14, Intel Corporation(1997) (http://www.intel.com/ PDF ) (9) : RT-Linux, http://www.mechatronics.mech.tohoku.ac.jp/~kumagai/linux/, (2000) (10) : Linux, http://www.mechatronics.mech.tohoku.ac.jp/~kumagai/linux/, (2000) 20 00