Chap04(Signals and Sessions).PDF

Size: px
Start display at page:

Download "Chap04(Signals and Sessions).PDF"

Transcription

1 Signals and Session Management Hyun-Ju Park

2 (Signal)? Introduction (1) mechanism events : asynchronous events - interrupt signal from users : synchronous events - exceptions (accessing an illegal address) primitive mechanism an integer value which specifies the type of events Signals and Session Management 1

3 History Introduction (2) Original System V signal unreliable and defective 4.2BSD reliable, robust signal SVR3 System V reliable signal (4.2BSD incompatible) POSIX BSD SVR3 reliable signal Solaris, AIX, HP-UX, 4.4BSD, Digital UNIX UNIX POSIX compliant signal Signals and Session Management 2

4 Issues Introduction (3)? ( ),???? Signals and Session Management 3

5 (generation) (delivery) Signal? Original system V defined 15 signals 4BSD and SVR4 define 32 signals (some variants support more than 32 signals) POSIX signal symbolic name 102, 4-1 Signals and Session Management 4

6 (1), function signal handler default action Signals and Session Management 5

7 (2) 5 default actions for signals abort : terminate the process after generating a core dump exit : terminates the process without generating a core dump ignore : ignores the signal stop : suspends the process continue : resumes the process, if suspended( or else, ignores the signal) User defined function(signal handler) SIGKILL SIGSTOP ignore, block, signal handler 102, 4-1 Signals and Session Management 6

8 (3) issig(), issig() issig() TRUE, psig() psig(): sendsig() Signals and Session Management 7

9 (4) Signal delivered Execute normal code Signal handler runs Resume normal execution Signals and Session Management 8

10 (1) Major sources of signals (exceptions) (terminal interrupts) (job control) (quotas) (notifications) (alarms) Signals and Session Management 9

11 (2) kill sigsend Ctrl-C foreground process csh ksh foreground background process Signals and Session Management 10

12 (3) CPU Signals and Session Management 11

13 (1) Asynchronous events Ctrl-C foreground process SIGINT, (issig()) Signals and Session Management 12

14 (2) Synchronous events : exception, issig() Signals and Session Management 13

15 Sleep and Signals What happens sleeping process receives a signal? Two categories of sleep uninterruptible sleep sleep : mark the signal as pending interruptible sleep : issig() Signals and Session Management 14

16 Signals in SVR4 (1) Superset of the functionality of SVR3 and BSD signals sigprocmask(int how, const sigset_t * setp, sigset_t *osetp); how: SIG_BLOCK, SIG_UNBLOCK, SIG_SETMASK setp: new mask osetp: old mask if not nonnull pointer sigaltstack(stack, old_stack); sigsuspend(const sigset_t* sigmask); unblocking pause signal atomic operation sigpending(sigset_t* setp); block or pending signal check sigsendset(procset_t* procset, sig); process group sig Signals and Session Management 15

17 Signals in SVR4 (2) sigaction(int signo, const struct sigaction* act, struct sigaction oact); struct sigaction { } void (*sa_handler) (); /* addr of signal handler, or SIG_IGN, or SIG_DFL*/ sigset_t sa_mask; /* additional signals to block */ int sa_flags; /* signal options */ sa_mask signo act signo Signals and Session Management 16

18 Signals in SVR4 (3) SVR4 signal implementation BSD u area : contains information required to properly invoke the signal handlers, u_signal[ ]: vector of signal handlers for each signal u_sigmask[ ]: signal masks associated with each handler u_sigaltstack: pointer to the alternate signal stack u_sigonstack: mask of signals to handle on the alternate stack u_oldsig: set of handlers that must exhibit the old, unreliable behavior proc structure : contains fields related to generation and posting of signals p_cursig: current signal being handled p_sig: pending signal mask p_hold: blocked signal mask p_ignore: ignored signal mask Signals and Session Management 17

19 #include <signal.h> #include <stdio.h> #include <string.h> #include <sys/types.h> #include <unistd.h> void sigusr1_handler (int signal_number) { printf( Ctrl-C!!\n ); printf( --> \n ); exit(1); } int main (void) { struct sigaction sa; memset (&sa, 0, sizeof (sa)); sa.sa_handler =&sigint_handler; sigaction (SIGINT,&sa,NULL); while (1) printf( * ); printf ( \n ); return 0; } Signals and Session Management 18

20 UNIX, Signals and Session Management 19

21 (1) (Process groups) ID process group ID event PID ID, /dev/tty Signals and Session Management 20

22 (2) tty t_pgrp SIGINT, SIGQUIT fg (SIGCONT) Ctrl-Z (SIGTSTP) bg Signals and Session Management 21

23 SVR3 Process group is the same as a terminal login session P P P P P Process Foreground Process Proces group Login session Signals and Session Management 22

24 SVR4 Introduces a session structure Session = a collection of process groups P P P P P P Session Object P P Process Foreground Process Proces group Login session Signals and Session Management 23

제1장 Unix란 무엇인가?

제1장  Unix란 무엇인가? 1 시그널 2 11.1 시그널 시그널 시그널은예기치않은사건이발생할때이를알리는소프트웨어인터럽트이다. 시그널발생예 SIGFPE 부동소수점오류 SIGPWR 정전 SIGALRM 알람시계울림 SIGCHLD 자식프로세스종료 SIGINT 키보드로부터종료요청 (Ctrl-C) SIGSTP 키보드로부터정지요청 (Ctrl-Z) 3 주요시그널 시그널이름 의미 기본처리 SIGABRT

More information

Microsoft PowerPoint - 10_Signal

Microsoft PowerPoint - 10_Signal Operating System Laboratory 시그널 - IPC - 시그널의종류 - 시그널구현함수 IPC 프로세스간통신 (Inter-Process Communication) 실행중인프로세스간에데이터를주고받는기법 IPC 에는매우많은방법이있다! File Pipe/Named pipe Socket Shared memory Message passing Remote

More information

<4D F736F F F696E74202D BDC3B1D7B3CEB0FA20BDC3B1D7B3CE20C3B3B8AE2E707074>

<4D F736F F F696E74202D BDC3B1D7B3CEB0FA20BDC3B1D7B3CE20C3B3B8AE2E707074> 10 장시그널과시그널처리 시그널과시그널처리 - sigemptyset, sigfillset - sigaddset, sigdelset, sigismember - sigaction - sigprocmask - kill, raise - alarm - pause 1 1. 서론 시그널의종류 이름설명 DA SIGABRT abort() 를호출할때발생 SIGALRM 설정된알람시간이경과한겨우발생

More information

본 강의에 들어가기 전

본 강의에 들어가기 전 유닉스프로그래밍및실습 9 장. 시그널 1. 시그널개념 시그널생명주기 시그널이발생한다. 커널이해당시그널을쌓아둔다.( 동일한시그널이오는경우하나만 ) 가능한시점에서커널이적절하게처리한다 커널의처리방법 시그널무시 아무런동작을하지않는다 절대무시할수없는시그널 SIGKILL SIGSTOP 시그널을붙잡아처리 현재코드경로를따라가는실행을중단하고, 시그널마다등록된함수로점프 기본동작

More information

1장. 유닉스 시스템 프로그래밍 개요

1장.  유닉스 시스템 프로그래밍 개요 Unix 프로그래밍및실습 7 장. 시그널 - 과제보충 응용과제 1 부모프로세스는반복해서메뉴를출력하고사용자로부터주문을받아자식프로세스에게주문내용을알린다. (SIGUSR1) ( 일단주문을받으면음식이완료되기전까지 SIGUSR1 을제외한다른시그널은모두무시 ) timer 자식프로세스는주문을받으면조리를시작한다. ( 일단조리를시작하면음식이완성되기전까지 SIGALARM 을제외한다른시그널은모두무시

More information

2009년 상반기 사업계획

2009년 상반기 사업계획 시그널 IT CookBook, 유닉스시스템프로그래밍 학습목표 시그널의기본개념을이해한다. 시그널을보내는방법을이해한다. 시그널을받아서처리하는기본적인방법을이해한다. 시그널집합의개념과사용방법을이해한다. sigaction 함수를사용해시그널을처리하는방법을이해한다. 알람시그널의처리방법을이해한다. 시그널관련기타함수들의사용방법을이해한다. 2/38 목차 시그널의개념 시그널의종류

More information

Microsoft PowerPoint - ch07_시그널 [호환 모드]

Microsoft PowerPoint - ch07_시그널 [호환 모드] 학습목표 시그널의기본개념을이해한다. 시그널을보내는방법을이해한다. 시그널을받아서처리하는기본적인방법을이해한다. 시그널집합의개념과사용방법을이해한다. sigaction 함수를사용해시그널을처리하는방법을이해한다. 알람시그널의처리방법을이해한다. 시그널관련기타함수들의사용방법을이해한다. 시그널 IT CookBook, 유닉스시스템프로그래밍 2/38 목차 시그널의개념 시그널의종류

More information

6주차.key

6주차.key 6, Process concept A program in execution Program code PCB (process control block) Program counter, registers, etc. Stack Heap Data section => global variable Process in memory Process state New Running

More information

좀비프로세스 2

좀비프로세스 2 Signal & Inter-Process Communication Department of Computer Engineering Kyung Hee University. Choong Seon Hong 1 좀비프로세스 2 좀비프로세스 (zombie process) 좀비프로세스란프로세스종료후메모리상에서사라지지않는프로세스 좀비프로세스의생성이유. 자식프로세스는부모프로세스에게실행결과에대한값을반환해야한다.

More information

/chroot/lib/ /chroot/etc/

/chroot/lib/ /chroot/etc/ 구축 환경 VirtualBox - Fedora 15 (kernel : 2.6.40.4-5.fc15.i686.PAE) 작동 원리 chroot유저 ssh 접속 -> 접속유저의 홈디렉토리 밑.ssh의 rc 파일 실행 -> daemonstart실행 -> daemon 작동 -> 접속 유저만의 Jail 디렉토리 생성 -> 접속 유저의.bashrc 의 chroot 명령어

More information

슬라이드 1

슬라이드 1 Task 통신및동기화 : 시그널 (Signal) Chapter #10 Cooperating Processes Signal 개요 Signal 처리 Signal 전송 타이머처리 강의목차 Unix System Programming 2 Cooperating Processes (1) Independent process cannot affect or be affected

More information

System Programming Lab

System Programming Lab System Programming Lab Week 4: Shell Schedule for your own shell 1 st shell 기본기능 fork / exec Background Processing/ Sequential Execution ls, find, grep 2 nd Environment variables/ Shell variables built-in

More information

Microsoft PowerPoint - chap9 [호환 모드]

Microsoft PowerPoint - chap9 [호환 모드] 제 9 장프로세스관계 숙대창병모 1 Contents 1. Logins 2. Process Groups 3. Sessions 4. Controlling Terminal 5. Job Control 숙대창병모 2 로그인 숙대창병모 3 터미널로그인 /etc/ttys: 1 line per terminal device getty: opens terminal device

More information

Chap06(Interprocess Communication).PDF

Chap06(Interprocess Communication).PDF Interprocess Communication 2002 2 Hyun-Ju Park Introduction (interprocess communication; IPC) IPC data transfer sharing data event notification resource sharing process control Interprocess Communication

More information

강의10

강의10 Computer Programming gdb and awk 12 th Lecture 김현철컴퓨터공학부서울대학교 순서 C Compiler and Linker 보충 Static vs Shared Libraries ( 계속 ) gdb awk Q&A Shared vs Static Libraries ( 계속 ) Advantage of Using Libraries Reduced

More information

ABC 11장

ABC 11장 12 장고급응용 0 수행중인프로그램 프로세스 모든프로세스는유일한프로세스식별번호 (PID) 를가짐 유닉스에서는 ps 명령을사용하여프로세스목록을볼수있음 12-1 프로세스 $ ps -aux USER PID %CPU %MEM SZ RSS TT STAT START TIME COMMAND blufox 17725 34.0 1.6 146 105 i2 R 15:13 0:00

More information

Microsoft PowerPoint - SP6장-시그널.ppt [호환 모드]

Microsoft PowerPoint - SP6장-시그널.ppt [호환 모드] UNIX System Programming Ki-Hyun, JUNG Email : kingjung@paran.com 구성 1 장 : 기본적인개념들과기초적인용어들 2 장 : 파일을다루는시스템호출 primitives 3 장 : 파일에대한문맥상의특성 4 장 : 유닉스디렉토리개념 5 장 : 유닉스프로세스의기본적인성질과제어 6 장 : 프로세스간통신 7 장 : 유용한유닉스프로세스간통신기법

More information

K&R2 Reference Manual 번역본

K&R2 Reference Manual 번역본 typewriter structunion struct union if-else if if else if if else if if if if else else ; auto register static extern typedef void char short int long float double signed unsigned const volatile { } struct

More information

The Pocket Guide to TCP/IP Sockets: C Version

The Pocket Guide to  TCP/IP Sockets: C Version 인터넷프로토콜 6 장 중급소켓프로그래밍 (2) 목차 제 6 장중급소켓프로그래밍 6.1 소켓옵션 6.2 시그널 6.3 넌블로킹입 / 출력 6.4 멀티태스킹 6.5 멀티플렉싱 6.6 다수의수신자처리 2 시그널 (Signal) 시그널이란? 예상치않은이벤트발생에따른일종의소프트웨어인터럽트 Ex) ctrl + c, ctrl + z, 자식프로세스의종료 외부에서프로세스에게전달할수있는유일한통로

More information

(Asynchronous Mode) ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 -

(Asynchronous Mode) ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 - (Asynchronous Mode) - - - ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 - UART (Univ ers al As y nchronous Receiver / T rans mitter) 8250A 8250A { COM1(3F8H). - Line Control Register

More information

untitled

untitled - -, (insert) (delete) - - (insert) (delete) (top ) - - (insert) (rear) (delete) (front) A A B top A B C top push(a) push(b) push(c) A B top pop() top A B D push(d) top #define MAX_STACK_SIZE 100 int

More information

untitled

untitled Step Motor Device Driver Embedded System Lab. II Step Motor Step Motor Step Motor source Embedded System Lab. II 2 open loop, : : Pulse, 1 Pulse,, -, 1 +5%, step Step Motor (2),, Embedded System Lab. II

More information

untitled

untitled Embedded System Lab. II Embedded System Lab. II 2 RTOS Hard Real-Time vs Soft Real-Time RTOS Real-Time, Real-Time RTOS General purpose system OS H/W RTOS H/W task Hard Real-Time Real-Time System, Hard

More information

10주차.key

10주차.key 10, Process synchronization (concurrently) ( ) => critical section ( ) / =>, A, B / Race condition int counter; Process A { counter++; } Process B { counter ;.. } counter++ register1 = counter register1

More information

슬라이드 1

슬라이드 1 / 유닉스시스템개요 / 파일 / 프로세스 01 File Descriptor file file descriptor file type unix 에서의파일은단지바이트들의나열임 operating system 은파일에어떤포맷도부과하지않음 파일의내용은바이트단위로주소를줄수있음 file descriptor 는 0 이나양수임 file 은 open 이나 creat 로 file

More information

Something that can be seen, touched or otherwise sensed

Something that can be seen, touched or otherwise sensed Something that can be seen, touched or otherwise sensed Things about an object Weight Height Material Things an object does Pen writes Book stores words Water have Fresh water Rivers Oceans have

More information

untitled

untitled if( ) ; if( sales > 2000 ) bonus = 200; if( score >= 60 ) printf(".\n"); if( height >= 130 && age >= 10 ) printf(".\n"); if ( temperature < 0 ) printf(".\n"); // printf(" %.\n \n", temperature); // if(

More information

13주-14주proc.PDF

13주-14주proc.PDF 12 : Pro*C/C++ 1 2 Embeded SQL 3 PRO *C 31 C/C++ PRO *C NOT! NOT AND && AND OR OR EQUAL == = SQL,,, Embeded SQL SQL 32 Pro*C C SQL Pro*C C, C Pro*C, C C 321, C char : char[n] : n int, short, long : float

More information

chap7.key

chap7.key 1 7 C 2 7.1 C (System Calls) Unix UNIX man Section 2 C. C (Library Functions) C 1975 Dennis Ritchie ANSI C Standard Library 3 (system call). 4 C?... 5 C (text file), C. (binary file). 6 C 1. : fopen( )

More information

61 62 63 64 234 235 p r i n t f ( % 5 d :, i+1); g e t s ( s t u d e n t _ n a m e [ i ] ) ; if (student_name[i][0] == \ 0 ) i = MAX; p r i n t f (\ n :\ n ); 6 1 for (i = 0; student_name[i][0]!= \ 0&&

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 2... ( ). ( ). @ vs. logic data method variable behavior attribute method field Flow (Type), ( ) member @ () : C program Method A ( ) Method B ( ) Method C () program : Java, C++, C# data @ Program

More information

untitled

untitled 1 hamks@dongguk.ac.kr (goal) (abstraction), (modularity), (interface) (efficient) (robust) C Unix C Unix (operating system) (network) (compiler) (machine architecture) 1 2 3 4 5 6 7 8 9 10 ANSI C Systems

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Web server porting 2 Jo, Heeseung Web 을이용한 LED 제어 Web 을이용한 LED 제어프로그램 web 에서데이터를전송받아타겟보드의 LED 를조작하는프로그램을작성하기위해다음과같은소스파일을생성 2 Web 을이용한 LED 제어 LED 제어프로그램작성 8bitled.html 파일을작성 root@ubuntu:/working/web# vi

More information

À©µµ³×Æ®¿÷ÇÁ·Î±×·¡¹Ö4Àå_ÃÖÁ¾

À©µµ³×Æ®¿÷ÇÁ·Î±×·¡¹Ö4Àå_ÃÖÁ¾ P a 02 r t Chapter 4 TCP Chapter 5 Chapter 6 UDP Chapter 7 Chapter 8 GUI C h a p t e r 04 TCP 1 3 1 2 3 TCP TCP TCP [ 4 2] listen connect send accept recv send recv [ 4 1] PC Internet Explorer HTTP HTTP

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 KeyPad Device Control - Device driver Jo, Heeseung HBE-SM5-S4210 에는 16 개의 Tack Switch 를사용하여 4 행 4 열의 Keypad 가장착 4x4 Keypad 2 KeyPad 를제어하기위하여 FPGA 내부에 KeyPad controller 가구현 KeyPad controller 16bit 로구성된

More information

0. 표지에이름과학번을적으시오. (6) 1. 변수 x, y 가 integer type 이라가정하고다음빈칸에 x 와 y 의계산결과값을적으시오. (5) x = (3 + 7) * 6; x = 60 x = (12 + 6) / 2 * 3; x = 27 x = 3 * (8 / 4

0. 표지에이름과학번을적으시오. (6) 1. 변수 x, y 가 integer type 이라가정하고다음빈칸에 x 와 y 의계산결과값을적으시오. (5) x = (3 + 7) * 6; x = 60 x = (12 + 6) / 2 * 3; x = 27 x = 3 * (8 / 4 Introduction to software design 2012-1 Final 2012.06.13 16:00-18:00 Student ID: Name: - 1 - 0. 표지에이름과학번을적으시오. (6) 1. 변수 x, y 가 integer type 이라가정하고다음빈칸에 x 와 y 의계산결과값을적으시오. (5) x = (3 + 7) * 6; x = 60 x

More information

프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어

프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어 개나리 연구소 C 언어 노트 (tyback.egloos.com) 프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어먹고 하더라구요. 그래서,

More information

컴파일러

컴파일러 YACC 응용예 Desktop Calculator 7/23 Lex 입력 수식문법을위한 lex 입력 : calc.l %{ #include calc.tab.h" %} %% [0-9]+ return(number) [ \t] \n return(0) \+ return('+') \* return('*'). { printf("'%c': illegal character\n",

More information

Figure 5.01

Figure 5.01 Chapter 4: Threads Yoon-Joong Kim Hanbat National University, Computer Engineering Department Chapter 4: Multithreaded Programming Overview Multithreading Models Thread Libraries Threading Issues Operating

More information

SIGPLwinterschool2012

SIGPLwinterschool2012 1994 1992 2001 2008 2002 Semantics Engineering with PLT Redex Matthias Felleisen, Robert Bruce Findler and Matthew Flatt 2009 Text David A. Schmidt EXPRESSION E ::= N ( E1 O E2 ) OPERATOR O ::=

More information

1

1 1 1....6 1.1...6 2. Java Architecture...7 2.1 2SDK(Software Development Kit)...8 2.2 JRE(Java Runtime Environment)...9 2.3 (Java Virtual Machine, JVM)...10 2.4 JVM...11 2.5 (runtime)jvm...12 2.5.1 2.5.2

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 UNIX 및실습 8 장. 프로세스와사용자명령 익히기 1 학습목표 유닉스에서프로세스가무엇인지그개념을이해한다. 프로세스와관련된명령의사용방법을익힌다. 포그라운드처리와백그라운드처리의차이를이해한다. 사용자정보를보는명령의사용방법을익힌다. 2 Section 01 프로세스란 프로세스 (process) 현재시스템에서실행중인프로그램 프로세스는고유번호를가진다. Process ID

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 4 (Object) (Class) (Instance) (Method) (Constructor) Memory 1 UML 1 @ & 1 (Real World) (Software World) @ &.. () () @ & 2 (Real World) (Software World) OOA/ Modeling Abstraction Instantiation

More information

(Exposure) Exposure (Exposure Assesment) EMF Unknown to mechanism Health Effect (Effect) Unknown to mechanism Behavior pattern (Micro- Environment) Re

(Exposure) Exposure (Exposure Assesment) EMF Unknown to mechanism Health Effect (Effect) Unknown to mechanism Behavior pattern (Micro- Environment) Re EMF Health Effect 2003 10 20 21-29 2-10 - - ( ) area spot measurement - - 1 (Exposure) Exposure (Exposure Assesment) EMF Unknown to mechanism Health Effect (Effect) Unknown to mechanism Behavior pattern

More information

Microsoft Word - ASG AT90CAN128 모듈.doc

Microsoft Word - ASG AT90CAN128 모듈.doc ASG AT90128 Project 3 rd Team Author Cho Chang yeon Date 2006-07-31 Contents 1 Introduction... 3 2 Schematic Revision... 4 3 Library... 5 3.1 1: 1 Communication... 5 iprinceps - 2-2006/07/31

More information

5.스택(강의자료).key

5.스택(강의자료).key CHP 5: https://www.youtube.com/watch?v=ns-r91557ds ? (stack): (LIFO:Last-In First-Out):. D C B C B C B C B (element) C (top) B (bottom) (DT) : n element : create() ::=. is_empty(s) ::=. is_full(s) ::=.

More information

ecorp-프로젝트제안서작성실무(양식3)

ecorp-프로젝트제안서작성실무(양식3) (BSC: Balanced ScoreCard) ( ) (Value Chain) (Firm Infrastructure) (Support Activities) (Human Resource Management) (Technology Development) (Primary Activities) (Procurement) (Inbound (Outbound (Marketing

More information

chap10.PDF

chap10.PDF 10 C++ Hello!! C C C++ C++ C++ 2 C++ 1980 Bell Bjarne Stroustrup C++ C C++ C, C++ C C 3 C C++ (prototype) (type checking) C C++ : C++ 4 C C++ (prototype) (type checking) [ 10-1] #include extern

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Network Programming Jo, Heeseung Network 실습 네트워크프로그래밍 멀리떨어져있는호스트들이서로데이터를주고받을수있도록프로그램을구현하는것 파일과는달리데이터를주고받을대상이멀리떨어져있기때문에소프트웨어차원에서호스트들간에연결을해주는장치가필요 이러한기능을해주는장치로소켓이라는인터페이스를많이사용 소켓프로그래밍이란용어와네트워크프로그래밍이랑용어가같은의미로사용

More information

untitled

untitled Push... 2 Push... 4 Push... 5 Push... 13 Push... 15 1 FORCS Co., LTD A Leader of Enterprise e-business Solution Push (Daemon ), Push Push Observer. Push., Observer. Session. Thread Thread. Observer ID.

More information

03장.스택.key

03장.스택.key ---------------- DATA STRUCTURES USING C ---------------- 03CHAPTER 1 ? (stack): (LIFO:Last-In First-Out) 2 : top : ( index -1 ),,, 3 : ( ) ( ) -> ->. ->.... 4 Stack ADT : (LIFO) : init():. is_empty():

More information

untitled

untitled while do-while for break continue while( ) ; #include 0 i int main(void) int meter; int i = 0; while(i < 3) meter = i * 1609; printf("%d %d \n", i, meter); i++; return 0; i i< 3 () 0 (1)

More information

Microsoft PowerPoint - 09-Pipe

Microsoft PowerPoint - 09-Pipe 9. 파이프 상명대학교소프트웨어학부 파이프 시그널은이상한사건이나오류를처리하는데는이용하지만, 한프로세스로부터다른프로세스로대량의정보를전송하는데는부적합하다. 파이프 한프로세스를다른관련된프로세스에연결시켜주는단방향의통신채널 2 pipe() Usage #include int pipe(int filedes[2]); 3 < ex_1.c > #include

More information

C++-¿Ïº®Çؼ³10Àå

C++-¿Ïº®Çؼ³10Àå C C++. (preprocessor directives), C C++ C/C++... C++, C. C++ C. C C++. C,, C++, C++., C++.,.. #define #elif #else #error #if #itdef #ifndef #include #line #pragma #undef #.,.,. #include #include

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 UNIX 및실습 8 장. 프로세스와사용자 명령익히기 1 학습목표 유닉스에서프로세스가무엇인지그개념을이해한다. 프로세스와관련된유닉스명령의사용방법을익힌다. 포그라운드처리와백그라운드처리의차이를이해한다. 사용자정보를보는명령의사용방법을익힌다. 2 01. 프로세스의개념과종류 프로세스 (process) 현재시스템에서실행중인프로그램 프로세스는고유번호를가진다. Process

More information

제1장 Unix란 무엇인가?

제1장  Unix란 무엇인가? 1 12 장파이프 2 12.1 파이프 파이프원리 $ who sort 파이프 3 물을보내는수도파이프와비슷 한프로세스는쓰기용파일디스크립터를이용하여파이프에데이터를보내고 ( 쓰고 ) 다른프로세스는읽기용파일디스크립터를이용하여그파이프에서데이터를받는다 ( 읽는다 ). 한방향 (one way) 통신 파이프생성 파이프는두개의파일디스크립터를갖는다. 하나는쓰기용이고다른하나는읽기용이다.

More information

MAX+plus II Getting Started - 무작정따라하기

MAX+plus II Getting Started - 무작정따라하기 무작정 따라하기 2001 10 4 / Version 20-2 0 MAX+plus II Digital, Schematic Capture MAX+plus II, IC, CPLD FPGA (Logic) ALTERA PLD FLEX10K Series EPF10K10QC208-4 MAX+plus II Project, Schematic, Design Compilation,

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 오픈소스소프트웨어개발입문 (CP33992) Linux 명령어사용법 - 계속 부산대학교공과대학정보컴퓨터공학부 파일비교 cmp diff 두파일의동일성을검사하여, 차이가생기는첫번째바이트를보여줌 두파일을비교하여한파일을다른파일로전환하는편집변경을행할때에필요한동작목록을보여줌 2 [ 실습 ] 파일비교 : diff (1) $ vi Hello1.c #include

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 3 if, if else, if else if, switch case for, while, do while break, continue : System.in, args, JOptionPane for (,, ) @ vs. logic data method variable Data Data Flow (Type), ( ) @ Member field

More information

C 프로그래밍 언어 입문 C 프로그래밍 언어 입문 김명호저 숭실대학교 출판국 머리말..... C, C++, Java, Fortran, Python, Ruby,.. C. C 1972. 40 C.. C. 1999 C99. C99. C. C. C., kmh ssu.ac.kr.. ,. 2013 12 Contents 1장 프로그래밍 시작 1.1 C 10 1.2 12

More information

SRC PLUS 제어기 MANUAL

SRC PLUS 제어기 MANUAL ,,,, DE FIN E I N T R E A L L O C E N D SU B E N D S U B M O TIO

More information

Mobile Service > IAP > Android SDK [ ] IAP SDK TOAST SDK. IAP SDK. Android Studio IDE Android SDK Version (API Level 10). Name Reference V

Mobile Service > IAP > Android SDK [ ] IAP SDK TOAST SDK. IAP SDK. Android Studio IDE Android SDK Version (API Level 10). Name Reference V Mobile Service > IAP > Android SDK IAP SDK TOAST SDK. IAP SDK. Android Studio IDE 2.3.3 Android SDK Version 2.3.3 (API Level 10). Name Reference Version License okhttp http://square.github.io/okhttp/ 1.5.4

More information

Microsoft PowerPoint - Lecture_Note_7.ppt [Compatibility Mode]

Microsoft PowerPoint - Lecture_Note_7.ppt [Compatibility Mode] Unix Process Department of Computer Engineering Kyung Hee University. Choong Seon Hong 1 유닉스기반다중서버구현방법 클라이언트들이동시에접속할수있는서버 서비스를동시에처리할수있는서버프로세스생성을통한멀티태스킹 (Multitasking) 서버의구현 select 함수에의한멀티플렉싱 (Multiplexing)

More information

본 강의에 들어가기 전

본 강의에 들어가기 전 C 기초특강 종합과제 과제내용 구조체를이용하여교과목이름과코드를파일로부터입력받아관리 구조체를이용하여학생들의이름, 학번과이수한교과목의코드와점수를파일로부터입력 학생개인별총점, 평균계산 교과목별이수학생수, 총점및평균을계산 결과를파일에저장하는프로그램을작성 2 Makefile OBJS = score_main.o score_input.o score_calc.o score_print.o

More information

int main(void) int a; int b; a=3; b=a+5; printf("a : %d \n", a); printf("b : %d \n", b); a b 3 a a+5 b &a(12ff60) &b(12ff54) 3 a 8 b printf(" a : %x \

int main(void) int a; int b; a=3; b=a+5; printf(a : %d \n, a); printf(b : %d \n, b); a b 3 a a+5 b &a(12ff60) &b(12ff54) 3 a 8 b printf( a : %x \ ? 1 int main(void) int a; int b; a=3; b=a+5; printf("a : %d \n", a); printf("b : %d \n", b); a b 3 a a+5 b &a(12ff60) &b(12ff54) 3 a 8 b printf(" a : %x \n", &a); printf(" b : %x \n", &b); * : 12ff60,

More information

C프로-3장c03逞풚

C프로-3장c03逞풚 C h a p t e r 03 C++ 3 1 9 4 3 break continue 2 110 if if else if else switch 1 if if if 3 1 1 if 2 2 3 if if 1 2 111 01 #include 02 using namespace std; 03 void main( ) 04 { 05 int x; 06 07

More information

02 C h a p t e r Java

02 C h a p t e r Java 02 C h a p t e r Java Bioinformatics in J a va,, 2 1,,,, C++, Python, (Java),,, (http://wwwbiojavaorg),, 13, 3D GUI,,, (Java programming language) (Sun Microsystems) 1995 1990 (green project) TV 22 CHAPTER

More information

歯7장.PDF

歯7장.PDF 7 Hello!! C 2 . 3 ([] ) < > [ ]; int array[10]; < > [ ][ ]; int array [3] [5]; 4 < > [ ]={ x1,,x10} ( ); (,). ({}). : int array[10]={1,2,3,4,5,6,7,8,9,10}; (" "). : char array[7]="turbo-c"; 5 int array[2][3]={{1,2},{3,4},{5,6}};

More information

chap7.PDF

chap7.PDF 7 Hello!! C 2 . 3 ([] ) < > [ ]; int array[10]; < > [ ][ ]; int array [3] [5]; 4 < > [ ]={ x1,,x10} ( ); (,). ({}). : int array[10]={1,2,3,4,5,6,7,8,9,10}; (" "). : char array[7]="turbo-c"; 5 int array[2][3]={{1,2},{3,4},{5,6}};

More information

<30362E20C6EDC1FD2DB0EDBFB5B4EBB4D420BCF6C1A42E687770>

<30362E20C6EDC1FD2DB0EDBFB5B4EBB4D420BCF6C1A42E687770> 327 Journal of The Korea Institute of Information Security & Cryptology ISSN 1598-3986(Print) VOL.24, NO.2, Apr. 2014 ISSN 2288-2715(Online) http://dx.doi.org/10.13089/jkiisc.2014.24.2.327 개인정보 DB 암호화

More information

歯sql_tuning2

歯sql_tuning2 SQL Tuning (2) SQL SQL SQL Tuning ROW(1) ROW(2) ROW(n) update ROW(2) at time 1 & Uncommitted update ROW(2) at time 2 SQLDBA> @ UTLLOCKT WAITING_SESSION TYPE MODE_REQUESTED MODE_HELD LOCK_ID1

More information

OCaml

OCaml OCaml 2009.. (khheo@ropas.snu.ac.kr) 1 ML 2 ML OCaml INRIA, France SML Bell lab. & Princeton, USA nml SNU/KAIST, KOREA 3 4 (let) (* ex1.ml *) let a = 10 let add x y = x + y (* ex2.ml *) let sumofsquare

More information

Line (A) å j a k= i k #define max(a, b) (((a) >= (b))? (a) : (b)) long MaxSubseqSum0(int A[], unsigned Left, unsigned Right) { int Center, i; long Max

Line (A) å j a k= i k #define max(a, b) (((a) >= (b))? (a) : (b)) long MaxSubseqSum0(int A[], unsigned Left, unsigned Right) { int Center, i; long Max 알고리즘설계와분석 (CSE3081-2반 ) 중간고사 (2013년 10월24일 ( 목 ) 오전 10시30분 ) 담당교수 : 서강대학교컴퓨터공학과임인성수강학년 : 2학년문제 : 총 8쪽 12문제 ========================================= < 주의 > 답안지에답을쓴후제출할것. 만약공간이부족하면답안지의뒷면을이용하고반드시답을쓰는칸에답안지의어느쪽의뒷면에답을기술하였는지명시할것.

More information

MPLAB C18 C

MPLAB C18 C MPLAB C18 C MPLAB C18 MPLAB C18 C MPLAB C18 C #define START, c:\mcc18 errorlevel{0 1} char isascii(char ch); list[list_optioin,list_option] OK, Cancel , MPLAB IDE User s Guide MPLAB C18 C

More information

Microsoft PowerPoint - ch09 - 연결형리스트, Stack, Queue와 응용 pm0100

Microsoft PowerPoint - ch09 - 연결형리스트, Stack, Queue와 응용 pm0100 2015-1 프로그래밍언어 9. 연결형리스트, Stack, Queue 2015 년 5 월 4 일 교수김영탁 영남대학교공과대학정보통신공학과 (Tel : +82-53-810-2497; Fax : +82-53-810-4742 http://antl.yu.ac.kr/; E-mail : ytkim@yu.ac.kr) 연결리스트 (Linked List) 연결리스트연산 Stack

More information

3. 다음장에나오는 sigprocmask 함수의설명을참고하여다음프로그램의출력물과그출력물이화면이표시되는시점을예측하세요. ( 힌트 : 각줄이표시되는시점은다음 4 가지중하나. (1) 프로그램수행직후, (2) kill 명령실행직후, (3) 15 #include <signal.

3. 다음장에나오는 sigprocmask 함수의설명을참고하여다음프로그램의출력물과그출력물이화면이표시되는시점을예측하세요. ( 힌트 : 각줄이표시되는시점은다음 4 가지중하나. (1) 프로그램수행직후, (2) kill 명령실행직후, (3) 15 #include <signal. 학번 : 이름 : 1. 다음가정하에서아래프로그램의출력물을예측하세요. 가정 : 부모프로세스의 process id=20100, 자식프로세스의 process id=20101. int glob = 31; /* external variable in initialized data */ char buf[] = "a write to stdout\n"; int main(void)

More information

11장 포인터

11장 포인터 Dynamic Memory and Linked List 1 동적할당메모리의개념 프로그램이메모리를할당받는방법 정적 (static) 동적 (dynamic) 정적메모리할당 프로그램이시작되기전에미리정해진크기의메모리를할당받는것 메모리의크기는프로그램이시작하기전에결정 int i, j; int buffer[80]; char name[] = data structure"; 처음에결정된크기보다더큰입력이들어온다면처리하지못함

More information

제1장 Unix란 무엇인가?

제1장  Unix란 무엇인가? 1 소켓 2 1 소켓 클라이언트 - 서버모델 네트워크응용프로그램 클리이언트 - 서버모델을기반으로동작한다. 클라이언트 - 서버모델 하나의서버프로세스와여러개의클라이언트로구성된다. 서버는어떤자원을관리하고클라이언트를위해자원관련서비스를제공한다. 3 소켓의종류 소켓 네트워크에대한사용자수준의인터페이스를제공 소켓은양방향통신방법으로클라이언트 - 서버모델을기반으로프로세스사이의통신에매우적합하다.

More information

Index Process Specification Data Dictionary

Index Process Specification Data Dictionary Index Process Specification Data Dictionary File Card Tag T-Money Control I n p u t/o u t p u t Card Tag save D e s c r i p t i o n 리더기위치, In/Out/No_Out. File Name customer file write/ company file write

More information

DE1-SoC Board

DE1-SoC Board 실습 1 개발환경 DE1-SoC Board Design Tools - Installation Download & Install Quartus Prime Lite Edition http://www.altera.com/ Quartus Prime (includes Nios II EDS) Nios II Embedded Design Suite (EDS) is automatically

More information

Connection 8 22 UniSQLConnection / / 9 3 UniSQL OID SET

Connection 8 22 UniSQLConnection / / 9 3 UniSQL OID SET 135-080 679-4 13 02-3430-1200 1 2 11 2 12 2 2 8 21 Connection 8 22 UniSQLConnection 8 23 8 24 / / 9 3 UniSQL 11 31 OID 11 311 11 312 14 313 16 314 17 32 SET 19 321 20 322 23 323 24 33 GLO 26 331 GLO 26

More information

Deok9_Exploit Technique

Deok9_Exploit Technique Exploit Technique CodeEngn Co-Administrator!!! and Team Sur3x5F Member Nick : Deok9 E-mail : DDeok9@gmail.com HomePage : http://deok9.sur3x5f.org Twitter :@DDeok9 > 1. Shell Code 2. Security

More information

No Slide Title

No Slide Title Copyright, 2001 Multimedia Lab., CH 3. COM object (In-process server) Eun-sung Lee twoss@mmlab.net Multimedia Lab. Dept. of Electrical and Computer Eng. University of Seoul Seoul, Korea 0. Contents 1.

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Text-LCD Device Control - Device driver Jo, Heeseung M3 모듈에장착되어있는 Tedxt LCD 장치를제어하는 App 을개발 TextLCD 는영문자와숫자일본어, 특수문자를표현하는데사용되는디바이스 HBE-SM5-S4210 의 TextLCD 는 16 문자 *2 라인을 Display 할수있으며, 이 TextLCD 를제어하기위하여

More information

Microsoft PowerPoint - Chapter_04.pptx

Microsoft PowerPoint - Chapter_04.pptx 프로그래밍 1 1 Chapter 4. Constant and Basic Data Types April, 2016 Dept. of software Dankook University http://embedded.dankook.ac.kr/~baeksj 이장의강의목표 2 기본자료형문자표현방식과문자자료형상수자료형변환 기본자료형 (1/8) 3 변수 (Variables)

More information

1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 #define _CRT_SECURE_NO_WARNINGS #include #include main() { char ch; printf(" 문자 1개를입력하시오 : "); scanf("%c", &ch); if (isalpha(ch))

More information

<C1A63130C0E5C7C1B7CEBCBCBDBA2E687770>

<C1A63130C0E5C7C1B7CEBCBCBDBA2E687770> 제 10 장프로세스프로그래밍 프로세스시작 / 종료 자식프로세스생성 프로세스내에서새로운프로그램실행 시그널 시스템부팅 10.1 프로그램시작및종료 Unix 에서프로그램은어떻게실행이시작되고종료될까? 프로그램은 10.3 절에서살펴볼 exec 시스템호출에의해실행된다. 이호출은실행될프로그램의시작루틴에게명령줄인수 (command-line arguments) 와환경변수 (environment

More information

PRO1_09E [읽기 전용]

PRO1_09E [읽기 전용] Siemens AG 1999 All rights reserved File: PRO1_09E1 Information and - ( ) 2 3 4 5 Monitor/Modify Variables" 6 7 8 9 10 11 CPU 12 Stop 13 (Forcing) 14 (1) 15 (2) 16 : 17 : Stop 18 : 19 : (Forcing) 20 :

More information

Chapter_06

Chapter_06 프로그래밍 1 1 Chapter 6. Functions and Program Structure April, 2016 Dept. of software Dankook University http://embedded.dankook.ac.kr/~baeksj 이장의강의목표 2 문자의입력방법을이해한다. 중첩된 if문을이해한다. while 반복문의사용법을익힌다. do 반복문의사용법을익힌다.

More information

T100MD+

T100MD+ User s Manual 100% ) ( x b a a + 1 RX+ TX+ DTR GND TX+ RX+ DTR GND RX+ TX+ DTR GND DSR RX+ TX+ DTR GND DSR [ DCE TYPE ] [ DCE TYPE ] RS232 Format Baud 1 T100MD+

More information

chap8.PDF

chap8.PDF 8 Hello!! C 2 3 4 struct - {...... }; struct jum{ int x_axis; int y_axis; }; struct - {...... } - ; struct jum{ int x_axis; int y_axis; }point1, *point2; 5 struct {....... } - ; struct{ int x_axis; int

More information

민속지_이건욱T 최종

민속지_이건욱T 최종 441 450 458 466 474 477 480 This book examines the research conducted on urban ethnography by the National Folk Museum of Korea. Although most people in Korea

More information

<B1A4B0EDC8ABBAB8C7D0BAB8392D345F33C2F75F313032362E687770>

<B1A4B0EDC8ABBAB8C7D0BAB8392D345F33C2F75F313032362E687770> 광고에 나타난 가족가치관의 변화 : 97년부터 26년까지의 텔레비전 광고 내용분석* 2) 정기현 한신대학교 광고홍보학과 교수 가족주의적 가치관을 사회통합의 핵심 중의 핵심으로 올려놓았던 전통이 현대사회에서 아직 영향력을 미치는 점을 감안할 때, 한국에서의 가족변동은 사회전반의 변동으로 직결된다고 해도 크게 틀리지 않을 것이다. 97년부터 26년까지 텔레비전에서

More information

원고스타일 정의

원고스타일 정의 논문접수일 : 2015.01.05 심사일 : 2015.01.13 게재확정일 : 2015.01.26 유니컨셉 디자인을 활용한 보행환경 개선방안 연구 A Study on Improvement of Pedestrian Environment on to Uniconcept Design 주저자 : 김동호 디지털서울문화예술대학교 인테리어실용미술학과 교수 Kim dong-ho

More information

4임금연구겨울-지상토론

4임금연구겨울-지상토론 지상토론 기업의 합리적 임금관리전략을 통한 위기극복 방안 박준성 교수 지난 1998년 외환위기시에도 임금연구 에서 경 주제발표 김강식 교수(한국항공대) 토 론 자 : 장상수 전무(삼성경제연구소) 최영미 이사(한국HP) 제위기시 임금관리 방향에 대해 논의(본지 1998년 봄호 참조)를 한 적이 있는 것으로 알고 있습니다만 10년전과 비교해 봤을 때 우리 노동시장은

More information

이번장에서학습할내용 동적메모리란? malloc() 와 calloc() 연결리스트 파일을이용하면보다많은데이터를유용하고지속적으로사용및관리할수있습니다. 2

이번장에서학습할내용 동적메모리란? malloc() 와 calloc() 연결리스트 파일을이용하면보다많은데이터를유용하고지속적으로사용및관리할수있습니다. 2 제 17 장동적메모리와연결리스트 유준범 (JUNBEOM YOO) Ver. 2.0 jbyoo@konkuk.ac.kr http://dslab.konkuk.ac.kr 본강의자료는생능출판사의 PPT 강의자료 를기반으로제작되었습니다. 이번장에서학습할내용 동적메모리란? malloc() 와 calloc() 연결리스트 파일을이용하면보다많은데이터를유용하고지속적으로사용및관리할수있습니다.

More information

slide2

slide2 Program P ::= CL CommandList CL ::= C C ; CL Command C ::= L = E while E : CL end print L Expression E ::= N ( E + E ) L &L LefthandSide L ::= I *L Variable I ::= Numeral N ::=

More information

<32382DC3BBB0A2C0E5BED6C0DA2E687770>

<32382DC3BBB0A2C0E5BED6C0DA2E687770> 논문접수일 : 2014.12.20 심사일 : 2015.01.06 게재확정일 : 2015.01.27 청각 장애자들을 위한 보급형 휴대폰 액세서리 디자인 프로토타입 개발 Development Prototype of Low-end Mobile Phone Accessory Design for Hearing-impaired Person 주저자 : 윤수인 서경대학교 예술대학

More information