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

Size: px
Start display at page:

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

Transcription

1 stdio considered harmful stdio considered harmful p.

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

3 : stdio stdio Nonblocking I/O : write ( ) signal handling stdio considered harmful p.

4 readpartial : : FILE stdio considered harmful p.

5 read : : FILE stdio considered harmful p.

6 Solaris FILE 256 : 256 : FILE unsigned char fd stdio stdio considered harmful p.

7 stdio stdio EOF ungetc SEGV stdio errno etc. stdio considered harmful p.

8 1.stdio 2. Ruby 3. Unix stdio considered harmful p.

9 stdio Ruby 1.9 : Ruby 1.8 : Unix Ruby Ruby: Unix: stdio considered harmful p.

10 stdio C FILE I/O (getc, fwrite, ungetc, etc.) (printf, scanf) I/O (popen, pclose) etc. stdio considered harmful p. 1

11 Ruby I/O (1.8 ) script IO#gets, etc. Ruby stdio kernel getc read IO#puts, etc. fwrite buffer write stdio considered harmful p. 1

12 Ruby I/O (1.9 ) script IO#gets, etc. Ruby IO#puts, etc. stdio kernel read buffer write stdio considered harmful p. 1

13 stdio : 1975 Dennis Ritchie Mike Lesk 15 W. Richard Stevens, 1992 stdio considered harmful p. 1

14 Unix stdio stdio: Dennis Ritchie 4.2BSD stdio: Chris Torek 4.4BSD NetBSD, etc. V6 V7 PWB1.0 SystemV Solaris, etc. Nonblocking I/O GNU/Linux stdio: Per Bothner stdio considered harmful p. 1

15 stdio v.s. Nonblocking I/O 1. fd Nonblocking I/O 2. fwrite 3. fflush 4. write 5. EAGAIN 6. stdio considered harmful p. 1

16 fflush (V7, ) /* */ iop->_ptr = base; iop->_cnt = BUFSIZ; if (write(fileno(iop), base, n)!= n) { /* */ iop->_flag = _IOERR; return(eof); } stdio considered harmful p. 1

17 fflush (4.4BSD, ) /* */ fp->_p = p; fp->_w = t & ( SLBF SNBF)? 0 : for (; n > 0; n -= t, p += t) { t = (*fp->_write)(fp->_cookie, (char *)p, n); if (t <= 0) { /* write */ fp->_flags = SERR; return (EOF); } } stdio considered harmful p. 1

18 fflush (glibc, ) /* partial write */ count = _IO_SYSWRITE (fp, data, to... /* */ fp->_io_write_base = fp->_io_write stdio considered harmful p. 1

19 fflush write (V7, 4.4BSD, glibc) write partial (V7) stdio considered harmful p. 1

20 Ruby 1.9 stdio write EAGAIN Ruby 1.8 stdio sync mode write EAGAIN write stdio considered harmful p. 2

21 : Ruby 1.9 write script Ruby stdio kernel buffer IO#puts, etc. write stdio considered harmful p. 2

22 : Ruby 1.8 sync mode write script IO#puts, etc. Ruby buffering mode fwrite stdio buffer write kernel sync mode write stdio considered harmful p. 2

23 : Ruby 1.9 Ruby 1.8 sync mode buffering mode socket sync mode stdio stdio considered harmful p. 2

24 readpartial/ read : (readpartial) context switch ( read ) stdio considered harmful p. 2

25 getc? or select readable = getc stdio considered harmful p. 2

26 ? stdio stdio considered harmful p. 2

27 getc? select readable getc 1byte select (1byte ) stdio considered harmful p. 2

28 FILE? V7 f->_cnt > 0 4.4BSD f->_r > 0 glibc f->_io_read_ptr!= f->_io_read_end etc. ( : 64bit Solaris ) Ruby I/O stdio considered harmful p. 2

29 read Ruby ( ) FILE read 64bit Solaris 64bit Solaris FILE : struct FILE_TAG { long pad[16]; }; stdio considered harmful p. 2

30 read Ruby bit Solaris stdio considered harmful p. 3

31 readpartial 1byte : stdio considered harmful p. 3

32 readpartial telnet.rb - port forwarder - cvs protocol - 1 etc. stdio considered harmful p. 3

33 readpartial read Ruby 1.8 FILE Ruby 1.9 stdio considered harmful p. 3

34 Solaris FILE 256 struct FILE_TAG /* needs to be b unsigned char *_base; /* the buff { ssize_t _cnt; /* number o unsigned char *_ptr; /* next cha unsigned char _flag; /* the stat unsigned char _file; /* UNIX Sys... }; 0 fd < 256 Ruby 1.9 FILE stdio considered harmful p. 3

35 Ruby 1.8 Ruby 1.8 Ruby 1.9 read errno stdio ungetc Nonblocking write Nonblocking IO#read readpartial Solaris 256 EOF popen Windows popen stdio stdio considered harmful p. 3

36 signal handling FD_SETSIZE (a C10K problem) stdio considered harmful p. 3

37 stdio Nonblocking I/O stdio considered harmful p. 3

13 I/O

13 I/O 13 I/O 98-0997-3 14 2 7 Linux OS OS OS I/O I/O TS-I/O I/O I/O TS-I/O TS-I/O 3 1 7 2 9 2.1..................... 9 2.2.................. 10 2.3 2...................... 12 2.4 Linux................... 14

More information

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

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 C/C++ 2007 6 18 1 C STL(1) 2 1.1............................................... 2 1.2 stdio................................................ 3 1.3.......................................... 10 2 11 2.1 sizeof......................................

More information

- 1 - - 2 - - 3 - - 4 - - 5 - - 6 - - 7 - - 8 - - 9 - - 10 - - 11 - - 12 - - 13 - - 14 - - 15 - - 16 - - 17 - - 18 - - 19 - - 20 - - 21 - - 22 - - 23 - - 24 - - 25 - - 26 - - 27 - - 28 - - 29 - - 30 -

More information

I /07/30 Dependable Network Innovation Center, Japan Advanced Institute of Science and Technology

I /07/30 Dependable Network Innovation Center, Japan Advanced Institute of Science and Technology I441 2013/07/30 Dependable Network Innovation Center, Japan Advanced Institute of Science and Technology I/O Japan Advanced Institute of Science and Technology 2013/07/30 1 fork/pthread create I/O Japan

More information

ファイル入出力と プロセス間通信 \(1\)

ファイル入出力と プロセス間通信 \(1\) ファイル入出力と プロセス間通信 (1) 2004 年 12 月 10 日 海谷治彦 1 目次 まずはマニュアルをみよう. 2 章システムコールインタフェース 3 章汎用関数定義 アンバッファー化入出力 (Unbuffered I/O) open, read, write... lseek, dup... 標準入出力ライブラリ fopen, fscanf, fprintf... 標準入力, 標準出力,

More information

tutorial_lc.dvi

tutorial_lc.dvi 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

More information

thesis.dvi

thesis.dvi H8 e041220 2009 2 Copyright c 2009 by Kentarou Nagashima c 2009 Kentarou Nagashima All rights reserved , H8.,,,..,.,., AKI-H8/3052LAN. OS. OS H8 Write Turbo. H8 C, Cygwin.,., windows. UDP., (TA7279P).,.

More information

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

1) // 2) I/O 3) Japan Advanced Institute of Science and Technology 2013/07/26 1 I441 2013/07/26 Dependable Network Innovation Center, Japan Advanced Institute of Science and Technology 1) // 2) I/O 3) Japan Advanced Institute of Science and Technology 2013/07/26 1 1) Comer: Internetworking

More information

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

PC Windows 95, Windows 98, Windows NT, Windows 2000, MS-DOS, UNIX CPU 1. 1.1. 1.2. 1 PC Windows 95, Windows 98, Windows NT, Windows 2000, MS-DOS, UNIX CPU 2. 2.1. 2 1 2 C a b N: PC BC c 3C ac b 3 4 a F7 b Y c 6 5 a ctrl+f5) 4 2.2. main 2.3. main 2.4. 3 4 5 6 7 printf printf

More information

FreeBSD 1

FreeBSD 1 FreeBSD 1 UNIX OS 1 ( ) open, close, read, write, ioctl (cdevsw) OS DMA 2 (8 ) (24 ) 256 open/close/read/write Ioctl 3 2 2 I/O I/O CPU 4 open/close/read/write open, read, write open/close read/write /dev

More information

I TCP 1/2 1

I TCP 1/2 1 I TCP 1/2 1 Transport layer: a birds-eye view Hosts maintain state for each transport endpoint Routers don t maintain perhost state H R R R R H Transport IP IP IP IP IP Copyright(C)2011 Youki Kadobayashi.

More information

02: 変数と標準入出力

02: 変数と標準入出力 C プログラミング入門 基幹 7 ( 水 5) 10: ファイル入出力 Linux にログインし 以下の講義ページを開いておくこと http://www-it.sci.waseda.ac.jp/ teachers/w483692/cpr1/ 2016-06-15 1 標準ライブラリ関数によりファイルの出力を行う 画像ファイルの生成を例題として 配列の作成を復習する 今日の内容 関数を作ってプログラムを構造化する

More information

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

( ) 3 1 ( ), ( ).. 1 30 2019 1 22 ( ) 3 1 ( ), 2-9 5 ( ).. 1 1. ( T):,? ( O):, T:,? O:!?,!?,... T:,,,? O:!?,,, OS? T:,, SSD, OS, CPU, OS SSD,? O:,,...? T: : OS,,, ( ) (1),. Linux, Unix OS. (2), (permission), (owner)., ( :

More information

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV tutimura@mist.i.u-tokyo.ac.jp kaneko@ipl.t.u-tokyo.ac.jp http://www.misojiro.t.u-tokyo.ac.jp/ tutimura/sem3/ 2002 12 11 p.1/33 10/16 1. 10/23 2. 10/30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20

More information

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

Microsoft Word - C.....u.K...doc C uwêííôöðöõ Ð C ÔÖÐÖÕ ÐÊÉÌÊ C ÔÖÐÖÕÊ C ÔÖÐÖÕÊ Ç Ê Æ ~ if eíè ~ for ÒÑÒ ÌÆÊÉÉÊ ~ switch ÉeÍÈ ~ while ÒÑÒ ÊÍÍÔÖÐÖÕÊ ~ 1 C ÔÖÐÖÕ ÐÊÉÌÊ uê~ ÏÒÏÑ Ð ÓÏÖ CUI Ô ÑÊ ÏÒÏÑ ÔÖÐÖÕÎ d ÈÍÉÇÊ ÆÒ Ö ÒÐÑÒ ÊÔÎÏÖÎ d ÉÇÍÊ

More information

02: 変数と標準入出力

02: 変数と標準入出力 C プログラミング入門 基幹 7 ( 水 5) 1 10: ファイル入出力 Linux にログインし 以下の講義ページを開いておくこと http://www-it.sci.waseda.ac.jp/teachers/w48369 2/CPR1/ 2016-06-15 今日の内容 2 標準ライブラリ関数によりファイルの出力を行う画像ファイルの生成を例題として 配列の作成を復習する 文字列の扱いを復習する

More information

Microsoft Word - .....J.^...O.|Word.i10...j.doc

Microsoft Word - .....J.^...O.|Word.i10...j.doc P 1. 2. R H C H, etc. R' n R' R C R'' R R H R R' R C C R R C R' R C R' R C C R 1-1 1-2 3. 1-3 1-4 4. 5. 1-5 5. 1-6 6. 10 1-7 7. 1-8 8. 2-1 2-2 2-3 9. 2-4 2-5 2-6 2-7 10. 2-8 10. 2-9 10. 2-10 10. 11. C

More information

ARM gcc Kunihiko IMAI 2009 1 11 ARM gcc 1 2 2 2 3 3 4 3 4.1................................. 3 4.2............................................ 4 4.3........................................

More information

‚æ4›ñ

‚æ4›ñ ( ) ( ) ( ) A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 (OUS) 9 26 1 / 28 ( ) ( ) ( ) A B C D Z a b c d z 0 1 2 9 (OUS) 9

More information

卒 業 研 究 報 告.PDF

卒 業 研 究 報 告.PDF C 13 2 9 1 1-1. 1-2. 2 2-1. 2-2. 2-3. 2-4. 3 3-1. 3-2. 3-3. 3-4. 3-5. 3-5-1. 3-5-2. 3-6. 3-6-1. 3-6-2. 4 5 6 7-1 - 1 1 1-1. 1-2. ++ Lisp Pascal Java Purl HTML Windows - 2-2 2 2-1. 1972 D.M. (Dennis M Ritchie)

More information

slide4.pptx

slide4.pptx ソフトウェア工学入門 第 4 回ライブラリ関数 ライブラリ関数 stdio stdio : 標準入出力ライブラリ カーネルレベルのストリームに API を追加し インタフェースを提供する カーネル fd read(2) write(2) stdio バッファ BUFSIZ プログラム BUFSIZ ごと 小さい単位 バッファ : 一時的にデータを保存しておく場所のことバッファリング : バッファを経由してデータをやり取りすること

More information

program.dvi

program.dvi 2001.06.19 1 programming semi ver.1.0 2001.06.19 1 GA SA 2 A 2.1 valuename = value value name = valuename # ; Fig. 1 #-----GA parameter popsize = 200 mutation rate = 0.01 crossover rate = 1.0 generation

More information

tuat1.dvi

tuat1.dvi ( 1 ) http://ist.ksc.kwansei.ac.jp/ tutimura/ 2012 6 23 ( 1 ) 1 / 58 C ( 1 ) 2 / 58 2008 9 2002 2005 T E X ptetex3, ptexlive pt E X UTF-8 xdvi-jp 3 ( 1 ) 3 / 58 ( 1 ) 4 / 58 C,... ( 1 ) 5 / 58 6/23( )

More information

102

102 5 102 5 103 q w 104 e r t y 5 u 105 q w e r t y u i 106 o!0 io!1 io q w e r t y 5 u 107 i o 108 q w e q w e r 5 109 q w 110 e r t 5 y 111 q w e r t y u 112 i q w e r 5 113 q w e 114 r t 5 115 q w e 116

More information

計算機プログラミング

計算機プログラミング プログラミング言語 C 第 8 講 システム標準関数 ( 入出力関数 ) システム標準関数 システムに備え付けの関数 例 ) printf( ); scanf( ); 標準出力関数 標準入力関数 A. 入出力用の関数 高水準入出力関数 高水準言語 (OS に依存しない ) 低水準入出力関数 機械語レベル (OS に依存 ) B. それ以外の関数 引数と関数の型 ( 戻り値 ) に注目しましょう 例

More information

ex14.dvi

ex14.dvi 1,, 0, b (b b 2 b ) n k n = n j b j, (0 n j b 1), n =(n k n k 1...n 1 n 0 ) b, n j j j +1, 0,...,b 1 (digit). b b, n b 1 ñ, ñ = k (b 1 n j )b j b N, n b n, n = b N n, n =ñ+1 b N, n m n + m (mod b N ),

More information

VISPO /表1-4

VISPO /表1-4 7 2005 1,132 5,249 362 13,666 311,809 1,359 3,723 1,669 538 3,737 17,418 39,036 75,694 5,281 1,169 161,502 7,463 11,408,436 500,000 13,263 192,052 41,391 49,706 136,232 61,102 12,402,182 11,573,898 273,042

More information

For_Beginners_CAPL.indd

For_Beginners_CAPL.indd CAPL Vector Japan Co., Ltd. 目次 1 CAPL 03 2 CAPL 03 3 CAPL 03 4 CAPL 04 4.1 CAPL 4.2 CAPL 4.3 07 5 CAPL 08 5.1 CANoe 5.2 CANalyzer 6 CAPL 10 7 CAPL 11 7.1 CAPL 7.2 CAPL 7.3 CAPL 7.4 CAPL 16 7.5 18 8 CAPL

More information

untitled

untitled 1. 2. 3. 4. 5. 6. 7. Intelligent Electronic Systems Group 4 PC bitmap.bmp (255,0,0)"" p8-2forint.c or p8-2formot.cdl (printf) (R,G,B)=(127,127,0) (R,G,B)=(255,127,0) viewer bitmap.bmp 1616 24bit (R,G,B)

More information

ディジタル信号処理

ディジタル信号処理 http://www.cfme.chiba-u.jp/~yama// C 言 語 におけるファイル 入 出 力 テキスト バイナリの 取 り 扱 い ( )..[4]% gcc Wall o hoge hoge.c..[5]%./hoge 1 : 1 2 : 2 3 : 3 4 : 0 6..[6]% (! )..[4]% gcc Wall o hoge hoge.c..[5]%!g gcc Wall

More information

PowerPoint Presentation

PowerPoint Presentation p.130 p.198 p.208 2 double weight[num]; double min, max; min = max = weight[0]; for( i= 1; i i < NUM; i++ ) ) if if ( weight[i] > max ) max = weight[i]: if if ( weight[i] < min ) min = weight[i]: weight

More information

PowerPoint プレゼンテーション

PowerPoint プレゼンテーション プログラミング応用演習 第 4 回再帰的構造体 前回の出席確認演習 #include int main() { FILE *fp; int c, linecount, length, maxlength; fp=fopen("/usr/share/dict/words","r"); if (fp == NULL) return 1; linecount=0; length=0;

More information

E for LINUX UNIX Windows 10

E for LINUX UNIX Windows 10 E for LINUX UNIX Windows 10 ...3...4 DASmini...5 1...5...6...7 DASmini...8 3.1 inet_io_open...9 3.2 inet_io_close... 10 3.3 inet_io_packet... 11 3.4 inet_io_cond... 12 3.5 inet_io_stat... 13 3.6 inet_io_stop...

More information

tuat2.dvi

tuat2.dvi ( 2 ) http://ist.ksc.kwansei.ac.jp/ tutimura/ 2012 7 7 ( 2 ) 1 / 54 (1) (2) (?) (1) (2) 2 ( 2 ) 2 / 54 1. 30 2. 2012 6 30 25 OS ( 2 ) 3 / 54 10 20 1993 1996 2000 2003 = 30 ( 2 ) 4 / 54 1 2 2 ( 2 ) 5 /

More information

I httpd School of Information Science, Japan Advanced Institute of Science and Technology

I httpd School of Information Science, Japan Advanced Institute of Science and Technology I117 17 4 httpd School of Information Science, Japan Advanced Institute of Science and Technology httpd HTTP httpd log file access log access.log CERN httpd common format lighttpd common format 2 1000

More information

C言語におけるファイル入出力の高速化

C言語におけるファイル入出力の高速化 C 言語におけるファイル入出力の高速化 東京大学情報基盤センター 黒田久泰 不連続なメモリ上のデータをファイルに保存する場合 内部バッファサイズを大きくすると実行時間が短縮できます また メモリ上に連続して配置されている大規模なデータをファイルに保存する場合には できるだけ大きなデータサイズでファイル入出力を行うことで実行時間が短縮できます ここでは これらの方法や性能について紹介します 1. 内部バッファサイズの変更方法高水準入出力関数

More information

橡ボーダーライン.PDF

橡ボーダーライン.PDF 1 ( ) ( ) 2 3 4 ( ) 5 6 7 8 9 10 11 12 13 14 ( ) 15 16 17 18 19 20 ( ) 21 22 23 24 ( ) 25 26 27 28 29 30 ( ) 31 To be or not to be 32 33 34 35 36 37 38 ( ) 39 40 41 42 43 44 45 46 47 48 ( ) 49 50 51 52

More information

[ 1] 1 Hello World!! 1 #include <s t d i o. h> 2 3 int main ( ) { 4 5 p r i n t f ( H e l l o World!! \ n ) ; 6 7 return 0 ; 8 } 1:

[ 1] 1 Hello World!! 1 #include <s t d i o. h> 2 3 int main ( ) { 4 5 p r i n t f ( H e l l o World!! \ n ) ; 6 7 return 0 ; 8 } 1: 005 9 7 1 1.1 1 Hello World!! 5 p r i n t f ( H e l l o World!! \ n ) ; 7 return 0 ; 8 } 1: 1 [ ] Hello World!! from Akita National College of Technology. 1 : 5 p r i n t f ( H e l l o World!! \ n ) ;

More information

file"a" file"b" fp = fopen("a", "r"); while(fgets(line, BUFSIZ, fp)) {... fclose(fp); fp = fopen("b", "r"); while(fgets(line, BUFSIZ, fp)) {... fclose

filea fileb fp = fopen(a, r); while(fgets(line, BUFSIZ, fp)) {... fclose(fp); fp = fopen(b, r); while(fgets(line, BUFSIZ, fp)) {... fclose I117 9 2 School of Information Science, Japan Advanced Institute of Science and Technology file"a" file"b" fp = fopen("a", "r"); while(fgets(line, BUFSIZ, fp)) {... fclose(fp); fp = fopen("b", "r"); while(fgets(line,

More information

人芯経営論 ・・・リーダーシップ考②

人芯経営論 ・・・リーダーシップ考② 2009/12/15 2009/11/17 2009/11/16 2009/10/19 2009/10/15 2009/10/1 2009/9/17 2009/9/1 2009/8/17 2009/8/17 2009/8/14 2009/8/12 2009/7/28 2009/7/17 2009/7/15 2009/6/24 2009/6/18 2009/6/15 2009/5/20 2009/5/15

More information

全体ロードマップ インターネット電話 音の符号化 ( 信号処理 ) 今日 音の録音 再生 ネットワーク ( ソケット ) プログラミング ファイル入出力 インターネットの基礎 C プログラミング基礎

全体ロードマップ インターネット電話 音の符号化 ( 信号処理 ) 今日 音の録音 再生 ネットワーク ( ソケット ) プログラミング ファイル入出力 インターネットの基礎 C プログラミング基礎 ファイル入出力 全体ロードマップ インターネット電話 音の符号化 ( 信号処理 ) 今日 音の録音 再生 ネットワーク ( ソケット ) プログラミング ファイル入出力 インターネットの基礎 C プログラミング基礎 今日のロードマップ 波形として可視化 (gnuplot) 課題 2.13, 2.15 音を自分のプログラムに読み込む (rec + read) 音を作って鳴らす (write + play)

More information

新・明解C言語 ポインタ完全攻略

新・明解C言語 ポインタ完全攻略 2 1-1 1-1 /* 1-1 */ 1 int n = 100; int *p = &n; printf(" n %d\n", n); /* n int */ printf("*&n %d\n", *&n); /* *&n int */ printf(" p %p\n", p); /* p int * */ printf("&*p %p\n", &*p); /* &*p int * */ printf("sizeof(n)

More information

IP IP DHCP..

IP IP DHCP.. NICE 2008 4 14 1 NICE 2 1.1.................... 2 2 3 2.1........................................ 3 2.2....................................... 5 2.3.................................... 6 2.4...................................

More information

~~~~~~~~~~~~~~~~~~ wait Call CPU time 1, latch: library cache 7, latch: library cache lock 4, job scheduler co

~~~~~~~~~~~~~~~~~~ wait Call CPU time 1, latch: library cache 7, latch: library cache lock 4, job scheduler co 072 DB Magazine 2007 September ~~~~~~~~~~~~~~~~~~ wait Call CPU time 1,055 34.7 latch: library cache 7,278 750 103 24.7 latch: library cache lock 4,194 465 111 15.3 job scheduler coordinator slave wait

More information

Microsoft PowerPoint - CproNt11.ppt [互換モード]

Microsoft PowerPoint - CproNt11.ppt [互換モード] 第 11 章入出力関数とライブラリ関数 CPro:11-01 概要 getchar putchar gets puts scanf printf strcat strcmp strcpy strlen atoi atof sprint sscanf 11.1 コンソール入出力関数 11-02 入力 出力 getchar putchar 一文字 gets puts 文字列 ( 一行 ) scanf printf

More information

橡Taro9-生徒の活動.PDF

橡Taro9-生徒の活動.PDF 3 1 4 1 20 30 2 2 3-1- 1 2-2- -3- 18 1200 1 4-4- -5- 15 5 25 5-6- 1 4 2 1 10 20 2 3-7- 1 2 3 150 431 338-8- 2 3 100 4 5 6 7 1-9- 1291-10 - -11 - 10 1 35 2 3 1866 68 4 1871 1873 5 6-12 - 1 2 3 4 1 4-13

More information

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

Linux2.4でのメモリ管理機構 Linux2.2 on x86 Dec 2001 x86 Linux Linux (demand paging, copy on write ) (buddy system, slab allocator) x86 x86 ( ) (required) (= ) ( ) (optional) x86 Physical address( ) Linear address( ) Logical address(

More information

Baud Rate 9600 Parity NONE Number of Data Bits 8 Number of Stop Bits 1 Flow Control NONE 1 RS232C 200mm 2,000mm DIMM ( ) Telescope East/West LX200 * 1

Baud Rate 9600 Parity NONE Number of Data Bits 8 Number of Stop Bits 1 Flow Control NONE 1 RS232C 200mm 2,000mm DIMM ( ) Telescope East/West LX200 * 1 JARE54 LX200ACF 2012/2/18 2012/6/14 1 Abstract 8 LX200-ACF Linux PC meade Auto Align PC Zero Star Alignment Auto Align Zero Star Alignment 1 1 0.3 Zero Star Alignment 1 0.3 Auto Align 2 54 (2012 11 2013

More information

Minimum C Minimum C Minimum C BNF T okenseq W hite Any D

Minimum C Minimum C Minimum C BNF T okenseq W hite Any D 6 2019 5 14 6.1 Minimum C....................... 6 1 6.2....................................... 6 7 6.1 Minimum C Minimum C BNF T okenseq W hite Any Digit ::= 0 1 2... 9. Number ::= Digit Digit. Alphabet

More information

Linuxデバイスドライバ.PDF

Linuxデバイスドライバ.PDF Linux hidaka@devdrv.com 2002/10/9 Linux Kernel Conference 2002 1 Linux 2 Linux 3 Software Hardware Device Algolith m Protocol Applicati on 4 CPU 128MB NIC ATI Radeon GeForce2 MX400 Matrox G400 DISK 5 OS

More information

A Responsive Processor for Parallel/Distributed Real-time Processing

A Responsive Processor for Parallel/Distributed Real-time Processing E-mail: yamasaki@{ics.keio.ac.jp, etl.go.jp} http://www.ny.ics.keio.ac.jp etc. CPU) I/O I/O or Home Automation, Factory Automation, (SPARC) (SDRAM I/F, DMAC, PCI, USB, Timers/Counters, SIO, PIO, )

More information

問 2 ( 型変換 ) 次のプログラムを実行しても正しい結果が得られない 何が間違いかを指摘し 正しく修正せよ ただし int サイズが 2 バイト long サイズが 4 バイトの処理系での演算を仮定する #include <stdio.h> int main( void ) { int a =

問 2 ( 型変換 ) 次のプログラムを実行しても正しい結果が得られない 何が間違いかを指摘し 正しく修正せよ ただし int サイズが 2 バイト long サイズが 4 バイトの処理系での演算を仮定する #include <stdio.h> int main( void ) { int a = 問 1 配列の宣言整数型配列 data1 にデータが初期設定されている この配列 data1 のデータを下図のように 整数型配列 data2 に代入しなさい また data2 の内容を printf( "data2[0] = %d\n", data2[0] ); printf( "data2[5] = %d\n", data2[5] ); を用いて出力しなさい 実行結果 data2[0] = 76

More information

untitled

untitled EPX-64S Rev 1.2 1.. 3 1.1.......... 3 1.2....... 3 1.3....... 4 1.4... 4 1.5... 4 2........ 5 2.1.... 5 EPX64S_GetNumberOfDevices........ 5 EPX64S_GetSerialNumber........ 6 EPX64S_Open....... 7 EPX64S_OpenBySerialNumber

More information

main main Makefile Makefile C.5 Makefile Makefile Makefile A Mech (TA ) 1. Web (http://www.jsk.t.u-tokyo.ac.jp/ iku

main main Makefile Makefile C.5 Makefile Makefile Makefile A Mech (TA ) 1. Web (http://www.jsk.t.u-tokyo.ac.jp/ iku 2008 (mizuuchi@i.u-tokyo.ac.jp) http://www.jsk.t.u-tokyo.ac.jp/ http://www.jsk.t.u-tokyo.ac.jp/ ikuo/enshu/keisanki/ 2008 5 19 6 24 1 2 2.1 my_sound.c, my_sounc.h, play.c, record.c 2 2. 2.2 2.2.1 main

More information

今日の話 これまでの話 Ruby がどうデザインされているか Unix の機能をどういうデザインで提供するか これからの話 いくつかの問題と改善案

今日の話 これまでの話 Ruby がどうデザインされているか Unix の機能をどういうデザインで提供するか これからの話 いくつかの問題と改善案 Unix 修正主義 Ruby API is Improved Unix API 田中哲 Tanaka Akira 産業技術総合研究所 National Institute of Advanced Industrial Science and Technology (AIST) RubyKaigi2010 今日の話 これまでの話 Ruby がどうデザインされているか Unix の機能をどういうデザインで提供するか

More information

II ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 D

II ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 D II 8 2003 11 12 1 6 ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 Daisuke 8 =>. 73 Daisuke 35 Hiroshi 64 Ichiro 87 Junko

More information

NEXT 1 2 3 1 2 3 4 5 6 1 2 1 2 1 1 1 1 2 3 1 2 3 4 5 6 1 2 3 4 1 2 3 4 5 6 1 2 3 4 5 1 2 3 1 1 2 1 2 3 4 5 6 7 1 2 3 1 2 1 2 3 4 5 6 7 8 9 1 1 1 2 1 2 1 2 3 4 5 6 1 2

More information

2004 2005 2 2 1G01P038-0 1 2 1.1.............................. 2 1.2......................... 2 1.3......................... 3 2 4 2.1............................ 4 2.2....................... 4 2.3.......................

More information

JA2008

JA2008 A1 1 10 vs 3 2 1 3 2 0 3 2 10 2 0 0 2 1 0 3 A2 3 11 vs 0 4 4 0 0 0 0 0 3 6 0 1 4 x 11 A3 5 4 vs 5 6 5 1 0 0 3 0 4 6 0 0 1 0 4 5 A4 7 11 vs 2 8 8 2 0 0 0 0 2 7 2 7 0 2 x 11 A5 9 5 vs 3 10 9 4 0 1 0 0 5

More information

エクセルソフト株式会社 WinDriver PCI 5! WinDriver 1. DriverWizard 2. DriverWizard WinDriver 1. Windows 98/Me NT/2000/XP Windows CE/CE.NET Windows Server 2003 Lin

エクセルソフト株式会社 WinDriver PCI 5! WinDriver 1. DriverWizard 2. DriverWizard WinDriver 1. Windows 98/Me NT/2000/XP Windows CE/CE.NET Windows Server 2003 Lin 5! WinDriver 1. DriverWizard 2. DriverWizard WinDriver 1. Windows 98/Me NT/2000/XP Windows CE/CE.NET Windows Server 2003 Linux Solaris VxWorks Web http://www.xlsoft.com/jp/products/windriver/ 2. WinDriver

More information

DVTS Consumer DV Camera IEEE1394 Cable Internet Consumer DV Deck IEEE1394 Cable DV Internet PC Internet DV PC

DVTS Consumer DV Camera IEEE1394 Cable Internet Consumer DV Deck IEEE1394 Cable DV Internet PC Internet DV PC DVTS Digital Video Transport System Akimichi@sfc.wide.ad.jp DVTS Consumer DV Camera IEEE1394 Cable Internet Consumer DV Deck IEEE1394 Cable DV Internet PC Internet DV PC DVTS Consumer DV Camera IEEE1394

More information

Microsoft PowerPoint - handout08.ppt

Microsoft PowerPoint - handout08.ppt 応用プログラミング第 8 回 ~ プログラミングの応用画像処理入門 1~ 本日の内容 1. 画像処理入門 ~ 画像を知る ~ 1. CCD カメラの仕組み 2. グレースケール画像 3. カラー画像 4. 画像ファイルのフォーマット 5. 画像の入出力 2. 課題 3 電気通信大学電子工学専攻 Intelligent Electronic Systems roup 長井隆行 FILE 構造体とは?(

More information

Microsoft PowerPoint - kougi8.ppt

Microsoft PowerPoint - kougi8.ppt C プログラミング演習 第 8 回構造体とレコードデータファイル 1 例題 1. バイナリファイル形式のファイル からのデータ読み込み 次のような名簿ファイル ( バイナリファイル形式 ) を読み込んで, 画面に表示するプログラムを作る name Ken Bill Mike age 20 32 35 address NewYork HongKong Paris 名簿ファイル 2 #include "stdafx.h"

More information

web07.dvi

web07.dvi 93 7 MATLAB Octave MATLAB Octave MAT MATLAB Octave copyright c 2004 Tatsuya Kitamura / All rights reserved. 94 7 7.1 UNIX Windows pwd Print Working Directory >> pwd ans = /home/kitamura/matlab pwd cd Change

More information

スライド タイトルなし

スライド タイトルなし ファイル入出力 (2) これまでのおさらい ( 入出力 ) これまでの入出力は 入力 scanf 出力 printf キーボードと画面 ( 端末 ) scanf/printf は 書式つき入出力 フォーマットを指定する 標準入出力を対象とする 何もしなければ 標準入出力は キーボードと画面 ストリームという考え方 ストリーム (stream) = データの列 キーボードから打つ文字列 画面に出力される文字列

More information

Microsoft Word - no15.docx

Microsoft Word - no15.docx 7. ファイルいままでは プログラムを実行したとき その結果を画面で確認していました 簡単なものならそれでもいいのですか 複雑な結果は画面で見るだけでなく ファイルに保存できればよいでしょう ここでは このファイルについて説明します 使う関数のプロトタイプは次のとおりです FILE *fopen(const char *filename, const char *mode); ファイルを読み書きできるようにする

More information

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

,…I…y…„†[…e…B…fi…O…V…X…e…•‡Ì…J†[…l…‰fi®“ì‡Ì›Â”‰›»pdfauthor OS 1 1 4 1.1........................................... 4 1.2........................................... 4 2 5 2.1..................................... 5 2.2 OS................................... 5 3 7

More information

ikuo/enshu/keisanki/ GUI(Graphica

ikuo/enshu/keisanki/ GUI(Graphica 2008 (mizuuchi@i.u-tokyo.ac.jp) http://www.jsk.t.u-tokyo.ac.jp/ http://www.jsk.t.u-tokyo.ac.jp/ ikuo/enshu/keisanki/ 2008 5 16 6 23 1 2 1 GUI(Graphical User Interface) 2 2.1 CD USB ( LSI ) (hardware abstraction)

More information

(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

(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 (Version: 2017/4/18) Intel CPU (kashi@waseda.jp) 1 Intel CPU( AMD CPU) 64bit SIMD Inline Assemler Windows Visual C++ Linux gcc 2 FPU SSE2 Intel CPU double 8087 FPU (floating point number processing unit)

More information

Microsoft Word - Cプログラミング演習(10)

Microsoft Word - Cプログラミング演習(10) 第 10 回 (6/25) 3. ファイルとその応用 (3) ファイルの更新 シーケンシャルファイルの更新 シーケンシャルファイルでは, 各レコードが可変長で連続して格納されており, その中の特定のレコードを変更することができない そこで一般的には, マスタファイルからデータを取り出し, 更新処理を行ったあとに新マスタファイルに書き込む 注 ) マスタファイル : 主ファイル, 基本ファイルと呼ばれるファイルで内容は比較的固定的であり,

More information

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

エラー処理・分割コンパイル・コマンドライン引数 L10(2017-12-05 Tue) : Time-stamp: 2017-12-17 Sun 11:59 JST hig. recv/send http://hig3.net ( ) L10 (2017) 1 / 21 IP I swallow.math.ryukoku.ac.jp:13 = 133.83.83.6:13 = : IP ( = ) (well-known ports), :. :,.

More information

プログラミング方法論 II 第 14,15 回 ( 担当 : 鈴木伸夫 ) 問題 17. x 座標と y 座標をメンバに持つ構造体 Point を作成せよ 但し座標 は double 型とする typedef struct{ (a) x; (b) y; } Point; 問題 18. 問題 17 の

プログラミング方法論 II 第 14,15 回 ( 担当 : 鈴木伸夫 ) 問題 17. x 座標と y 座標をメンバに持つ構造体 Point を作成せよ 但し座標 は double 型とする typedef struct{ (a) x; (b) y; } Point; 問題 18. 問題 17 の プログラミング方法論 II 第 14,15 回 ( 担当 : 鈴木伸夫 ) 問題 17. x 座標と y 座標をメンバに持つ構造体 Point を作成せよ 但し座標 は double 型とする typedef struct{ (a) x; (b) y; Point; 問題 18. 問題 17 の Point を用いて 2 点の座標を入力するとその 2 点間の距 離を表示するプログラムを作成せよ 平方根は

More information

数値計算

数値計算 プログラム作成から実行まで 数値計算 垣谷公徳 17 号館 3 階電子メール : kimi@ee.ous.ac.jp Source program hello.c printf("hello\n"); コンパイラ Library libc.a 0011_printf000101001 1101_getc00011100011 1011_scanf1110010100 コンパイル Object module

More information

いきなりですが du で 数 えてみた Glibc Version 2.0.1 2.0.6 2.1.3 2.2.5 2.3.6 2.4 2.5.1 2.6.1 2.7 Date 97/02/04 97/12/29 00/02/25 02/01/22 05/11/04 06/03/06 07/08/0

いきなりですが du で 数 えてみた Glibc Version 2.0.1 2.0.6 2.1.3 2.2.5 2.3.6 2.4 2.5.1 2.6.1 2.7 Date 97/02/04 97/12/29 00/02/25 02/01/22 05/11/04 06/03/06 07/08/0 Linux kernel の glibc 依 存 症 しらい たかし OSC2008 関 西 2008/07/19 いきなりですが du で 数 えてみた Glibc Version 2.0.1 2.0.6 2.1.3 2.2.5 2.3.6 2.4 2.5.1 2.6.1 2.7 Date 97/02/04 97/12/29 00/02/25 02/01/22 05/11/04 06/03/06

More information

64bit SSE2 SSE2 FPU Visual C++ 64bit Inline Assembler 4 FPU SSE2 4.1 FPU Control Word FPU 16bit R R R IC RC(2) PC(2) R R PM UM OM ZM DM IM R: reserved

64bit SSE2 SSE2 FPU Visual C++ 64bit Inline Assembler 4 FPU SSE2 4.1 FPU Control Word FPU 16bit R R R IC RC(2) PC(2) R R PM UM OM ZM DM IM R: reserved (Version: 2013/5/16) Intel CPU (kashi@waseda.jp) 1 Intel CPU( AMD CPU) 64bit SIMD Inline Assemler Windows Visual C++ Linux gcc 2 FPU SSE2 Intel CPU double 8087 FPU (floating point number processing unit)

More information

(2 Linux Mozilla [ ] [ ] [ ] [ ] URL 2 qkc, nkc ~/.cshrc (emacs 2 set path=($path /usr/meiji/pub/linux/bin tcsh b

(2 Linux Mozilla [ ] [ ] [ ] [ ] URL   2 qkc, nkc ~/.cshrc (emacs 2 set path=($path /usr/meiji/pub/linux/bin tcsh b II 5 (1 2005 5 26 http://www.math.meiji.ac.jp/~mk/syori2-2005/ UNIX (Linux Linux 1 : 2005 http://www.math.meiji.ac.jp/~mk/syori2-2005/jouhousyori2-2005-00/node2. html ( (Linux 1 2 ( ( http://www.meiji.ac.jp/mind/tool/internet-license/

More information

note.dvi

note.dvi 1 1 1.1,.,,.,.,, CPU LSI.,.,,, Nintendo64, PlayStation 1, 2.,,,,. 1.1.1,.,.,.,.,..,.,....... 1,, Nintendo64. PlayStation SONY Computer Entertainment. 2., CPU PlayStation2 SONY Computer Entertainment, Pentium3

More information

WinDriver PCI Quick Start Guide

WinDriver PCI Quick Start Guide WinDriver PCI/PCI Express/PCMCIA 5! WinDriver (1) DriverWizard (2) DriverWizard WinDriver (1) Windows 98/Me/2000/XP/Server 2003/Vista Windows CE.NET Windows Embedded CE v6.00 Windows Mobile 5.0/6.0 Linux

More information

注意 2013 年くらいに調べた話なので 変化していることもあるかもしれません 2

注意 2013 年くらいに調べた話なので 変化していることもあるかもしれません 2 Unix domain socket API の ポータビリティ問題 田中哲産業技術総合研究所情報技術研究部門 2016-07-02 1 注意 2013 年くらいに調べた話なので 変化していることもあるかもしれません 2 趣旨 Unix domain socket をさまざまな環境でテス トした とてもとても多様な振る舞いが観測できた そもそも API が腐っている API をデザインする人はそうならないように気をつけましょう

More information

Taro-ファイル処理(公開版).jtd

Taro-ファイル処理(公開版).jtd ファイル処理 0. 目次 1. はじめに 2. ファイル内容の表示 3. ファイル内容の複写 3. 1 文字単位 3. 2 行単位 4. 書式付き入出力 5. 文字配列への入出力 6. 課題 6. 1 課題 1 ( ファイル圧縮 復元 ) - 1 - 1. はじめに ファイル処理プログラムの形は次のようになる #include main() { FILE *fp1,*fp2; ファイルポインタの宣言

More information

untitled

untitled 186 17 100160250 1 10.1 55 2 18.5 6.9 100 38 17 3.2 17 8.4 45 3.9 53 1.6 22 7.3 100 2.3 31 3.4 47 OR OR 3 1.20.76 63.4 2.16 4 38,937101,118 17 17 17 5 1,765 1,424 854 794 108 839 628 173 389 339 57 6 18613

More information

untitled

untitled 1. 3 14 2. 1 12 9 7.1 3. 5 10 17 8 5500 4. 6 11 5. 1 12 101977 1 21 45.31982.9.4 79.71996 / 1997 89.21983 41.01902 6. 7 5 10 2004 30 16.8 37.5 3.3 2004 10.0 7.5 37.0 2004 8. 2 7 9. 6 11 46 37 25 55 10.

More information

TEX American Mathmastical Society WINDOWS Microsoft Corporation Adobe Illustrator Acrobat Adobe Systems Incorporated TM L A TEX 2ε(pL A TEX 2ε) L A TE

TEX American Mathmastical Society WINDOWS Microsoft Corporation Adobe Illustrator Acrobat Adobe Systems Incorporated TM L A TEX 2ε(pL A TEX 2ε) L A TE Expanded AMeDAS Weather Data Program DVD 2013 ColorMap Color Map Drawing Tool & GmConv Gray-Map Converting Tool for ColorMap (enc. Extended Set 2) Software Users Manual Version 1.0: May, 2013 Meteorological

More information

/

/ / 1 UNIX AWK( ) 1.1 AWK AWK AWK A.V.Aho P.J.Weinberger B.W.Kernighan 3 UNIX AWK GNU AWK 1 1.2 1 mkdir ~/data data ( ) cd data 1 98 MS DOS FD 1 2 AWK 2.1 AWK 1 2 1 byte.data 1 byte.data 900 0 750 11 810

More information

¥¤¥ó¥¿¡¼¥Í¥Ã¥È·×¬¤È¥Ç¡¼¥¿²òÀÏ Âè2²ó

¥¤¥ó¥¿¡¼¥Í¥Ã¥È·×¬¤È¥Ç¡¼¥¿²òÀÏ Âè2²ó 2 2015 4 20 1 (4/13) : ruby 2 / 49 2 ( ) : gnuplot 3 / 49 1 1 2014 6 IIJ / 4 / 49 1 ( ) / 5 / 49 ( ) 6 / 49 (summary statistics) : (mean) (median) (mode) : (range) (variance) (standard deviation) 7 / 49

More information

- - http://168iroha.net 018 10 14 i 1 1 1.1.................................................... 1 1.................................................... 7.1................................................

More information