Microsoft PowerPoint - StallingsOS6e-Chap06.ppt [호환 모드]

Size: px
Start display at page:

Download "Microsoft PowerPoint - StallingsOS6e-Chap06.ppt [호환 모드]"

Transcription

1 6 장병행성 : 교착상태와기아 6 장의강의목표 교착상태 (deadlock) 의원리를이해한다. 교착상태에자원할당그래프가어떻게이용되는지이해한다. 교착상태가발생하기위한필요. 충분조건을이해한다. 교착상태예방기법들을이해한다. 교착상태회피기법들을이해한다. 교착상태의발견과복구기법들을이해한다. 식사하는철학자문제를이해하고해결방법을이해한다. UNIX, LINUX, Solaris, Windows 운영체제에서제공하는병행성기법들을이해한다. 병행성 : 교착상태와기아 2

2 6.1 교착상태원리 6.2 교착상태예방 6.3 교착상태회피 6.4 교착상태발견 통합교착상태전략 6.6 식사하는철학자문제 6.7 유닉스병행성기법 6.8 리눅스커널병행성기법 목차 6.9 솔라리스스레드동기화프리미티브 윈도우즈병행성기법 병행성 : 교착상태와기아 교착상태원리 (deadlock principles) 교착상태예 /* DeadLock example.c */ #include <pthread.h> #include <stdio.h> #include <unistd.h> #include <stdlib.h> int a[4] = {150,100,200,50}; int b[4] = {1, 1, 2, 0}; // account // credit status 상호배제를위해 5 장에서배운기법을사용하면.. 이때발생하는문제는? void *func1() { int tmp1, tmp2; // deposit void *func2() { int tmp1, tmp2; // credit evaluation } // pre processing entercritical(a) t ca tmp1 = a[1]; tmp1 = tmp1 + 10; if (tmp1 > 200) { entercritical(b) tmp2 = b[1]; tmp2 += 1; b[1] = tmp2; exitcritical(b) } a[1] = tmp; exitcritical(a) // post processing } // pre processing entercritical(b) tmp2 = b[1]; if (tmp2 >= 2) { entercritical(a) tmp1 = a[1]; tmp1 = tmp1 * 0.05; 05 a[1] = tmp1; exitcritical(a) } exitcritical(b) // post processing 병행성 : 교착상태와기아 4

3 6.1 교착상태의원리 교착상태의정의 영속적인블록상태 2 개이상의프로세스들이공유자원에대한경쟁이나통신중에발생 사거리에서의교착상태예 병행성 : 교착상태와기아 교착상태의원리 결합진행다이어그램 다음과같이실행하는두프로세스 P 와 Q 가있다면, 둘다자원 A 와 B 에대해배타적사용을원하고있음 단, 자원사용기간은유한함. 병행성 : 교착상태와기아 6

4 6.1 교착상태의원리 결합진행다이어그램 ( 계속 ) 교착상태를쉽게이해하기위한결합진행다이어그램예 병행성 : 교착상태와기아 교착상태의원리결합진행다이어그램 : alternative 교착상태가발생하지않는예 병행성 : 교착상태와기아 8

5 6.1 교착상태의원리 재사용가능자원 (reusable) 프로세스가사용했다고없어지지는않는자원 사용후반납해야함. 예: 처리기, I/O channels, 주 / 보조메모리, 장치, 커널자료구조 ( 파일, 데이터베이스, 세마포어등 ) 프로세스가한자원을갖고있으면서다른자원을요구하면교착상태가발생할수있음 예 메모리할당 ( 가용메모리크기 = 200Kbytes) 디스크와테이프를이용한백업 P1 // 메모리할당 Request 80Kbytes Request 60Kbytes P2 Request 70Kbytes Request 80Kbytes 병행성 : 교착상태와기아 교착상태의원리 소모성자원 (consumable) 생성되었다가사용된후소멸되는자원 생산자와소비자프로세스 예 : 인터럽트, 시그널, 메시지, I/O 버퍼에있는정보 메시지수신이 blocking 방식으로이루어지면교착상태가발생할수있음 예 : 통신시발생하는교착상태 P1 // 통신 P2 Receive (P2) S d 2 1 Receive (P1) S d 1 2 Send (P2, M1) Send (P1, M2) 병행성 : 교착상태와기아 10

6 6.1 교착상태의원리 자원할당그래프 (Resource Allocation graph) 자원할당그래프예 병행성 : 교착상태와기아 교착상태의원리 자원할당그래프 (Resource Allocation graph) 교차로교착상태의 RAG 표현 Cycle 이발생하고있음 병행성 : 교착상태와기아 12

7 6.1 교착상태의원리 교착상태조건 교착상태가발생하기위한필요충분조건 4 가지 상호배제 (mutual exclusion) 점유대기 (hold and wait) 비선점 (no preemption) 환형대기 (circular wait) 교착상태가능 vs. 교착상태발생 병행성 : 교착상태와기아 교착상태예방 (deadlock prevention) 교착상태예방 교착상태가발생하기위한 4 가지필요충분조건중하나를설계단계에서배제하는기법 상호배제 운영체제에서반드시보장해주어야함. 점유대기 프로세스가필요한모든자원을한꺼번에요청 비선점 프로세스가새로운자원요청에실패하면기존의자원들을반납한후다시요청 or 운영체제가강제적으로자원을반납시킴 환형대기 자원할당순서 ( 자원유형 ) 를미리정해두면없앨수있음. 병행성 : 교착상태와기아 14

8 6.2 교착상태예방 교착상태예방의예 /* DeadLock example.c */ #include <pthread.h> #include <stdio.h> #include <unistd.h> #include <stdlib.h> int a[4] = {150,100,200,50}; int b[4] = {1, 1, 2, 0}; // account // credit status void *func1() { int tmp1, tmp2; // deposit void *func2() { int tmp1, tmp2; // credit evaluation } // pre processing entercritical(a) tmp1 = a[1]; tmp1 = tmp1 + 10; if (tmp1 > 200) { entercritical(b) tmp2 = b[1]; tmp2 += 1; b[1] = tmp2; exitcritical(b) } a[1] = tmp; exitcritical(a) // post processing } // pre processing entercritical(b) tmp2 = b[1]; if (tmp2 >= 2) { entercritical(a) tmp1 = a[1]; tmp1 = tmp1 * 0.05; a[1] = tmp1; exitcritical(a) } exitcritical(b) // post processing 병행성 : 교착상태와기아 교착상태회피 (deadlock avoidance) 예방과회피의차이점 교착상태예방은자원의사용과프로세스수행에비효율성을야기할수있다. 교착상태회피기법은교착상태발생을위한 4 가지조건중 1, 2, 3을허용 자원할당순서를미리정해놓지도않음 그대신, 자원을할당할때교착상태가발생가능한상황으로진행하지않도록고려한다. 프로세스시작시요구하는자원할당이교착상태를발생시킬가능성이있으면, 프로세스를시작시키지않는다. 수행중인프로세스가요구하는추가적인자원할당이교착상태를유발할수있으면거부한다. 병행성 : 교착상태와기아 16

9 6.3 교착상태회피 시스템상태구분 안전상태 (safe state): 교착상태가발생하지않도록프로세스들에게자원을할당할수있는할당경로가존재 불안전상태 (unsafe state): 경로가없음 자원할당거부 (Resource Allocation Denial) 자원을할당할때교착상태가발생할가능성이있는지여부를동적으로판단 교착상태의가능성이없을때자원할당. 즉, 안전한상태를계속유지할수있을때에만자원할당 각프로세스들이필요한자원들을미리운영체제에게알려야함 프로세스시작거부 (Process Initialization Denial) 교착상태가발생할가능성이있으면프로세스시작거부 병행성 : 교착상태와기아 교착상태회피 Banker s Algorithm 안전상태판별과정 병행성 : 교착상태와기아 18

10 6.3 교착상태회피 Banker s Algorithm ( 계속 ) 병행성 : 교착상태와기아 교착상태회피 Banker s Algorithm ( 계속 ) 불안전상태판별예 자원할당거부 (Banker s algorithm) 프로세스시작거부 병행성 : 교착상태와기아 20

11 6.3 교착상태회피 Banker s Algorithm ( 계속 ) 은행원알고리즘구현예 병행성 : 교착상태와기아 교착상태회피 Banker s Algorithm ( 계속 ) 은행원알고리즘구현예 ( 계속 ) 병행성 : 교착상태와기아 22

12 6.4 교착상태발견 (deadlock detection) 교착상태발견알고리즘 1. 할당행렬 A에서행의값이모두 0인프로세스를우선표시한다. 2. 임시벡터 W 를만든다. 그리고현재사용가능한자원의개수 ( 결국가용벡터 V 의값 ) 를벡터W 의초기값으로설정한다. 3. 표시되지않은프로세스들중에서수행완료가능한것이있으면 ( 요청행렬 Q 에서특정행의값이모두 W 보다작은행에대응되는프로세스 ) 이프로세스를표시한다. 만일완료가능한프로세스가없으면알고리즘을종료한다. 4. 단계 3 의조건을만족하는행을 Q 에서찾으면, 할당행렬 A 에서그행에대응되는값을임시벡터 W 에더한다. 그리고 3 단계를다시수행한다. 병행성 : 교착상태와기아 교착상태발견 교착상태회복 (recovery) 알고리즘 1 교착상태관련모든프로세스종료 2 교착상태에연관된프로세스들을체크포인트시점으로롤백한후다시수행시킴 ( 교착상태가다시발생할가능성존재 ) 3 교착상태가없어질때까지교착상태에포함되어있는프로세스들하나씩종료 4 교착상태가없어질때까지교착상태에포함되어있는자원을하나씩빼앗음 5 종료 ( 또는선점될 ) 프로세스선택기준 지금까지사용한처리기시간이적은프로세스부터 지금까지생산한출력량이적은프로세스부터 이후남은수행시간이가장긴프로세스부터 할당받은자원이가장적은프로세스부터 우선순위가낮은프로세스부터 병행성 : 교착상태와기아 24

13 6.5 통합적인교착상태전략 교착상태예방, 회피, 발견 병행성 : 교착상태와기아 25 문제정의 6.6 식사하는철학자문제 철학자들은반드시포크 2개를사용해야함. 포크는여러철학자들에의해공유될수없음 (mutual exclusion) 어떤철학자도굶어죽어서는안된다. 교착상태도없어야하고, 굶어죽지도않아야한다. 병행성 : 교착상태와기아 26

14 6.6 식사하는철학자문제 세마포어를이용한해결방법 이방법에내재되어있는문제점은? 병행성 : 교착상태와기아 식사하는철학자문제세마포어를이용한다른해결방법 교착상태발생하지않는버전 한번에최대 4 명까지철학자가식탁에앉을수있게제한 병행성 : 교착상태와기아 28

15 6.6 식사하는철학자문제 모니터를이용한해결방법 병행성 : 교착상태와기아 29 유닉스병행성기법 프로세스간통신 (IPC: InterProcess Communication) 시그널 (Signal) 파이프 (Pipe) 메시지전달 (Message passing) 공유메모리 (Shared memory) 세마포어 (Semaphore) sending tasks T T T struct msqid_ds msg msg msg T T receiving tasks kernel stack heap data text shared memory kernel stack heap data text 병행성 : 교착상태와기아 30

16 유닉스병행성기법 시그널 인터럽트와유사점및차이점은? 병행성 : 교착상태와기아 31 유닉스병행성기법지원 원자적연산 리눅스병행성기법 Atomic operations execute without interruption/interference 스핀락 Only one thread at a time can acquire a spinlock. Any other thread will keep trying (spinning) until it can acquire the lock. 세마포어 Binary semaphores, counting semaphores, reader-writer semaphores 장벽 (barrier) To enforce the order in which instructions are executed 병행성 : 교착상태와기아 32

17 원자적연산 (atomic operation) 리눅스커널병행성기법 병행성 : 교착상태와기아 33 리눅스커널병행성기법 스핀락 (Spinlocks) 기본스핀락 (plain, irq, irqsave, bh), 읽기-쓰기스핀락 병행성 : 교착상태와기아 34

18 세마포어 (Semaphores) 기본세마포어 (up, down), 읽기-쓰기세마포어 리눅스커널병행성기법 병행성 : 교착상태와기아 35 장벽 (Barriers) 리눅스커널병행성기법 병행성 : 교착상태와기아 36

19 Solaris 스레드동기화프리미티브 상호배제 (mutex) 락 A mutex is used to ensure only one thread at a time can access the resource protected by the mutex. The thread that locks the mutex must be the one that unlocks it 세마포어 (semaphore) Solaris provides classic counting semaphores. 읽기 - 쓰기락 (readers/writers lock) The readers/writer lock allows multiple threads to have simultaneous read-only access to an object protected by the lock. 조건변수 (conditional variables) A condition variable is used to wait until a particular condition is true. Condition variables must be used with a mutex lock 병행성 : 교착상태와기아 37 구조 솔라리스스레드동기화프리미티브 병행성 : 교착상태와기아 38

20 윈도우즈커널병행성기법 객체아키텍처의일부분으로동기화기법제공 Executive 디스패처객체 ( 대기함수 (Wait functions) 사용 ) 임계영역 (Critical Section) Slim 읽기 - 쓰기락 조건변수병행성 : 교착상태와기아 39 윈도우즈커널병행성기법 대기함수 (Wait functions) The wait functions allow a thread to block its own execution. The wait functions do not return until the specified criteria have been met. 임계영역 Similar mechanism to mutex (except that critical sections can be used only by the threads of a single process. ) If the system is a multiprocessor, the code will attempt to acquire a spin-lock. Slim 읽기- 쓰기락 Windows Vista added a user mode reader-writer. Slim as it normally only requires allocation of a single pointer-sized i piece of memory. Condition Variable Windows Vista also added condition variables. Used with either critical sections or SRW locks 병행성 : 교착상태와기아 40

21 윈도우즈리눅스비교 병행성 : 교착상태와기아 41 윈도우즈리눅스비교 병행성 : 교착상태와기아 42

22 교착상태원리 교착상태 4 가지조건 자원할당그래프 교착상태해결 예방 (Prevention) 회피 (Avoidance) 발견 (Detection) 식사하는철학자문제 사례연구 요약 유닉스, 리눅스커널, 솔라리스, 윈도우즈 병행성 : 교착상태와기아 43

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

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

Microsoft PowerPoint - StallingsOS6e-Chap05.pptx

Microsoft PowerPoint - StallingsOS6e-Chap05.pptx 5 장병행성 : 상호배제와동기화 5 장의강의목표 병행성 (concurrency) 의원리와주요용어를이해한다. 경쟁상태 (race condition) 의문제점에대해이해한다. 상호배제 (mutual exclusion), 교착상태 (deadlock), 기아상태 (starvation) 의 3 가지제어문제를이해한다. 상호배제를보장하기위한하드웨어적접근방법을이해한다. 세마포어를이용한상호배제기법을이해한다.

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

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

Abstract View of System Components

Abstract View of System Components 운영체제실습 - Synchronization - Real-Time Computing and Communications Lab. Hanyang University jtlim@rtcc.hanyang.ac.kr dhchoi@rtcc.hanyang.ac.kr beespjh@gmail.com Introduction 조교소개 이름 : 임정택 Tel : 010-4780

More information

Microsoft PowerPoint - o6.pptx

Microsoft PowerPoint - o6.pptx Dining-Philosophers Problem 세마포사용 6.8 모니터 (Monitors) Semaphore chopstick[5] = {1,1,1,1,1 ; // initially all values are 1 Philosopher i while (true) { P(chopStick[i]); // get left chopstick P(chopStick[(i+1)

More information

Microsoft PowerPoint - o6.pptx

Microsoft PowerPoint - o6.pptx Dining-Philosophers Problem 세마포사용 Semaphore chopstick[5] = {1,1,1,1,1} ; // initially all values are 1 Philosopher i while (true) { P(chopStick[i]); // get left chopstick P(chopStick[(i+1) % 5]); // get

More information

No Slide Title

No Slide Title Chapter 7: Deadlocks, Hanbat National Univ. Computer Eng. Dept. Y.J.Kim 2010 Chapter 7: Deadlocks The Deadlock Problem System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention

More information

입학사정관제도

입학사정관제도 운영체제 강의노트 교재 : 운영체제 ( 개정판 ) 출판사 : 한빛미디어 (2010 년 11 월발행 ) 저자 : 구현회 소프트웨어학과원성현교수 1 4 장 병행프로세스와 상호배제 소프트웨어학과원성현교수 2 1. 병행프로세스 병행프로세스의과제 병행성 동시에 2 개이상의프로세스가실행되는성질 다중프로세싱시스템, 분산처리시스템에서주로발생 다중프로세싱시스템은프로세서의효율성을증대시킴

More information

사용자수준의스레드 : 사용자의라이브러리에의해운영, 속도는빠르나, 구현이복잡하다. 커널수준의스레드 : 운영체제커널에의해운영, 속도는느리나, 구현이단순하다. 스케줄링 (Scheduling) 1) 스케줄링의정의 프로세스가생성되어실행될때필요한시스템의여러자원을해당프로세스에게할당

사용자수준의스레드 : 사용자의라이브러리에의해운영, 속도는빠르나, 구현이복잡하다. 커널수준의스레드 : 운영체제커널에의해운영, 속도는느리나, 구현이단순하다. 스케줄링 (Scheduling) 1) 스케줄링의정의 프로세스가생성되어실행될때필요한시스템의여러자원을해당프로세스에게할당 프로세스 (Process) 1) 프로세스의개념 프로세서에의해처리되어지는사용자프로그램및시스템프로그램을의미한다. 현재실행중인프로그램이며 Job(=Task) 이라고도한다. PCB를가지는프로그램으로비동기적인행위를일으키는주체이며실제주기억장치에저장된프로그램이다. 운영체제가관리하는실행단위이며프로시저 ( 프로그램내의하위프로그램 ) 가활동중인것을의미한다. 2) 프로세스의상태전이과정

More information

임베디드시스템설계강의자료 6 system call 2/2 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과

임베디드시스템설계강의자료 6 system call 2/2 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과 임베디드시스템설계강의자료 6 system call 2/2 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과 System call table and linkage v Ref. http://www.ibm.com/developerworks/linux/library/l-system-calls/ - 2 - Young-Jin Kim SYSCALL_DEFINE 함수

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

Microsoft PowerPoint os7.ppt [호환 모드]

Microsoft PowerPoint os7.ppt [호환 모드] 7 장교착상태 (Deadlocks) Questions of the day 1. 아래의예는안전한가? ( 예 ) 12 MT 최대수요 현재할당 사용가능 P0 10 5 3 (2) P1 4 2 P2 9 2 (3) 2. 그림 7.6( 자료 p22) 상황에서 R2 를어느프로세스에할당해야할까요? 그이유는? 3. 교재 p293 7.5.3.3 Banker s Algorithm

More information

Microsoft PowerPoint - 알고리즘_5주차_1차시.pptx

Microsoft PowerPoint - 알고리즘_5주차_1차시.pptx Basic Idea of External Sorting run 1 run 2 run 3 run 4 run 5 run 6 750 records 750 records 750 records 750 records 750 records 750 records run 1 run 2 run 3 1500 records 1500 records 1500 records run 1

More information

Chapter #01 Subject

Chapter #01  Subject Device Driver March 24, 2004 Kim, ki-hyeon 목차 1. 인터럽트처리복습 1. 인터럽트복습 입력검출방법 인터럽트방식, 폴링 (polling) 방식 인터럽트서비스등록함수 ( 커널에등록 ) int request_irq(unsigned int irq, void(*handler)(int,void*,struct pt_regs*), unsigned

More information

Synchronization

Synchronization Synchronization Command Execution 명령어수행과운영체제 UNIX: 프로그램이실행한프로세스가종료될때까지대기 Windows: 실행된모든프로세스는각자수행 Enter Loop Enter Loop Yes Another Command? No fork()code Exit Loop Yes Another Command? No Exit Loop CreateProcess()code

More information

Microsoft PowerPoint - o6.pptx

Microsoft PowerPoint - o6.pptx 목표 6 장. 프로세스동기화 임계구역 (Critical Region) 문제소개 이문제에대한해결책은공유데이터의일관성유지에사용가능 임계구역문제의하드웨어및소프트웨어해결책제시 전통적인프로세스동기화문제소개 프로세스동기화문제해결에사용되는도구조사 2 6.1 배경 생산자 - 소비자문제 공유데이터사용 협력프로세스 (Cooperating process) 다른프로세스의실행을영향을주거나받는프로세스

More information

chap 5: Trees

chap 5: Trees 5. Threaded Binary Tree 기본개념 n 개의노드를갖는이진트리에는 2n 개의링크가존재 2n 개의링크중에 n + 1 개의링크값은 null Null 링크를다른노드에대한포인터로대체 Threads Thread 의이용 ptr left_child = NULL 일경우, ptr left_child 를 ptr 의 inorder predecessor 를가리키도록변경

More information

C# Programming Guide - Types

C# Programming Guide - Types C# Programming Guide - Types 최도경 lifeisforu@wemade.com 이문서는 MSDN 의 Types 를요약하고보충한것입니다. http://msdn.microsoft.com/enus/library/ms173104(v=vs.100).aspx Types, Variables, and Values C# 은 type 에민감한언어이다. 모든

More information

좀비프로세스 2

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

More information

슬라이드 1

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

More information

Chap 6: Graphs

Chap 6: Graphs 5. 작업네트워크 (Activity Networks) 작업 (Activity) 부분프로젝트 (divide and conquer) 각각의작업들이완료되어야전체프로젝트가성공적으로완료 두가지종류의네트워크 Activity on Vertex (AOV) Networks Activity on Edge (AOE) Networks 6 장. 그래프 (Page 1) 5.1 AOV

More information

Chap 6: Graphs

Chap 6: Graphs AOV Network 의표현 임의의 vertex 가 predecessor 를갖는지조사 각 vertex 에대해 immediate predecessor 의수를나타내는 count field 저장 Vertex 와그에부속된모든 edge 들을삭제 AOV network 을인접리스트로표현 count link struct node { int vertex; struct node

More information

슬라이드 1

슬라이드 1 -Part3- 제 4 장동적메모리할당과가변인 자 학습목차 4.1 동적메모리할당 4.1 동적메모리할당 4.1 동적메모리할당 배울내용 1 프로세스의메모리공간 2 동적메모리할당의필요성 4.1 동적메모리할당 (1/6) 프로세스의메모리구조 코드영역 : 프로그램실행코드, 함수들이저장되는영역 스택영역 : 매개변수, 지역변수, 중괄호 ( 블록 ) 내부에정의된변수들이저장되는영역

More information

리눅스 프로세스 관리

리눅스 프로세스 관리 프로세스 (Process) Process 프로그램이나명령어를실행하면메모리에적재되어실제로실행되고있는상태를의미 이러한프로세스들은프로세스가시작하면서할당받는프로세스식별번호인 PID(Process ID), 해당프로세스를실행한부모프로세스를나타내는 PPID(Parent Process ID), UID 와 GID 정보를통해해당프로세스가어느사용자에속해있는지, 프로세스가파일에대해갖는권한및프로세스가실행된터미널,

More information

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

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

More information

설계란 무엇인가?

설계란 무엇인가? 금오공과대학교 C++ 프로그래밍 jhhwang@kumoh.ac.kr 컴퓨터공학과 황준하 6 강. 함수와배열, 포인터, 참조목차 함수와포인터 주소값의매개변수전달 주소의반환 함수와배열 배열의매개변수전달 함수와참조 참조에의한매개변수전달 참조의반환 프로그래밍연습 1 /15 6 강. 함수와배열, 포인터, 참조함수와포인터 C++ 매개변수전달방법 값에의한전달 : 변수값,

More information

Chap04(Signals and Sessions).PDF

Chap04(Signals and Sessions).PDF Signals and Session Management 2002 2 Hyun-Ju Park (Signal)? Introduction (1) mechanism events : asynchronous events - interrupt signal from users : synchronous events - exceptions (accessing an illegal

More information

임베디드시스템설계강의자료 6 system call 1/2 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과

임베디드시스템설계강의자료 6 system call 1/2 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과 임베디드시스템설계강의자료 6 system call 1/2 (2014 년도 1 학기 ) 김영진 아주대학교전자공학과 시스템호출개요 리눅스에서는사용자공간과커널공간을구분 사용자프로그램은사용자모드, 운영체제는커널모드에서수행 커널공간에대한접근은커널 ( 특권, priviledged) 모드에서가능 컴퓨팅자원 (CPU, memory, I/O 등 ) 을안전하게보호 커널수행을안전하게유지

More information

운영체제란? PC를구입하면 Windows XP, Windows 7, Linux, MS-DOS Mac OSX, ios 운영체제 : Operating System 운영체제가없는컴퓨터? 컴퓨터 : 프로세서와메모리 전원을켜면어떤일이? 휘발성메모리 - 야생마 프로그램을실행하려면

운영체제란? PC를구입하면 Windows XP, Windows 7, Linux, MS-DOS Mac OSX, ios 운영체제 : Operating System 운영체제가없는컴퓨터? 컴퓨터 : 프로세서와메모리 전원을켜면어떤일이? 휘발성메모리 - 야생마 프로그램을실행하려면 운영체제 Introduction 양희재교수 (hjyang@ks.ac.kr) / 경성대학교컴퓨터공학과 운영체제란? PC를구입하면 Windows XP, Windows 7, Linux, MS-DOS Mac OSX, ios 운영체제 : Operating System 운영체제가없는컴퓨터? 컴퓨터 : 프로세서와메모리 전원을켜면어떤일이? 휘발성메모리 - 야생마 프로그램을실행하려면?

More information

Microsoft Word - FunctionCall

Microsoft Word - FunctionCall Function all Mechanism /* Simple Program */ #define get_int() IN KEYOARD #define put_int(val) LD A val \ OUT MONITOR int add_two(int a, int b) { int tmp; tmp = a+b; return tmp; } local auto variable stack

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

Poison null byte Excuse the ads! We need some help to keep our site up. List 1 Conditions 2 Exploit plan 2.1 chunksize(p)!= prev_size (next_chunk(p) 3

Poison null byte Excuse the ads! We need some help to keep our site up. List 1 Conditions 2 Exploit plan 2.1 chunksize(p)!= prev_size (next_chunk(p) 3 Poison null byte Excuse the ads! We need some help to keep our site up. List 1 Conditions 2 Exploit plan 2.1 chunksize(p)!= prev_size (next_chunk(p) 3 Example 3.1 Files 3.2 Source code 3.3 Exploit flow

More information

Microsoft PowerPoint - o8.pptx

Microsoft PowerPoint - o8.pptx 메모리보호 (Memory Protection) 메모리보호를위해 page table entry에 protection bit와 valid bit 추가 Protection bits read-write / read-only / executable-only 정의 page 단위의 memory protection 제공 Valid bit (or valid-invalid bit)

More information

<4D F736F F F696E74202D20B8AEB4AABDBA20BFC0B7F920C3B3B8AEC7CFB1E22E BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20B8AEB4AABDBA20BFC0B7F920C3B3B8AEC7CFB1E22E BC8A3C8AF20B8F0B5E55D> 리눅스 오류처리하기 2007. 11. 28 안효창 라이브러리함수의오류번호얻기 errno 변수기능오류번호를저장한다. 기본형 extern int errno; 헤더파일 라이브러리함수호출에실패했을때함수예 정수값을반환하는함수 -1 반환 open 함수 포인터를반환하는함수 NULL 반환 fopen 함수 2 유닉스 / 리눅스 라이브러리함수의오류번호얻기 19-1

More information

[ 마이크로프로세서 1] 2 주차 3 차시. 포인터와구조체 2 주차 3 차시포인터와구조체 학습목표 1. C 언어에서가장어려운포인터와구조체를설명할수있다. 2. Call By Value 와 Call By Reference 를구분할수있다. 학습내용 1 : 함수 (Functi

[ 마이크로프로세서 1] 2 주차 3 차시. 포인터와구조체 2 주차 3 차시포인터와구조체 학습목표 1. C 언어에서가장어려운포인터와구조체를설명할수있다. 2. Call By Value 와 Call By Reference 를구분할수있다. 학습내용 1 : 함수 (Functi 2 주차 3 차시포인터와구조체 학습목표 1. C 언어에서가장어려운포인터와구조체를설명할수있다. 2. Call By Value 와 Call By Reference 를구분할수있다. 학습내용 1 : 함수 (Function) 1. 함수의개념 입력에대해적절한출력을발생시켜주는것 내가 ( 프로그래머 ) 작성한명령문을연산, 처리, 실행해주는부분 ( 모듈 ) 자체적으로실행되지않으며,

More information

제11장 프로세스와 쓰레드

제11장 프로세스와 쓰레드 제9장자바쓰레드 9.1 Thread 기초 (1/5) 프로그램 명령어들의연속 (a sequence of instruction) 프로세스 / Thread 실행중인프로그램 (program in execution) 프로세스생성과실행을위한함수들 자바 Thread 2 9.1 Thread 기초 (2/5) 프로세스단위작업의문제점 프로세스생성시오버헤드 컨텍스트스위치오버헤드

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

Microsoft PowerPoint APUE(Intro).ppt

Microsoft PowerPoint APUE(Intro).ppt 컴퓨터특강 () [Ch. 1 & Ch. 2] 2006 년봄학기 문양세강원대학교컴퓨터과학과 APUE 강의목적 UNIX 시스템프로그래밍 file, process, signal, network programming UNIX 시스템의체계적이해 시스템프로그래밍능력향상 Page 2 1 APUE 강의동기 UNIX 는인기있는운영체제 서버시스템 ( 웹서버, 데이터베이스서버

More information

11장 포인터

11장 포인터 누구나즐기는 C 언어콘서트 제 9 장포인터 이번장에서학습할내용 포인터이란? 변수의주소 포인터의선언 간접참조연산자 포인터연산 포인터와배열 포인터와함수 이번장에서는포인터의기초적인지식을학습한다. 포인터란? 포인터 (pointer): 주소를가지고있는변수 메모리의구조 변수는메모리에저장된다. 메모리는바이트단위로액세스된다. 첫번째바이트의주소는 0, 두번째바이트는 1, 변수와메모리

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 System Software Experiment 1 Lecture 5 - Array Spring 2019 Hwansoo Han (hhan@skku.edu) Advanced Research on Compilers and Systems, ARCS LAB Sungkyunkwan University http://arcs.skku.edu/ 1 배열 (Array) 동일한타입의데이터가여러개저장되어있는저장장소

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

11장 포인터

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

More information

<4D F736F F F696E74202D20322DBDC7BDC3B0A320BFEEBFB5C3BCC1A6>

<4D F736F F F696E74202D20322DBDC7BDC3B0A320BFEEBFB5C3BCC1A6> 컴퓨터시스템구성 2. 실시간운영체제 1 2 운영체제의주요기능 프로세스관리 (Process management) 메모리관리 (Memory management) 인터럽트핸들링 (Interrupt handling) 예외처리 (Exception handling) 프로세스동기화 (Process synchronization) 프로세스스케쥴링 (Process scheduling)

More information

쓰레드 (Thread) 양희재교수 / 경성대학교컴퓨터공학과

쓰레드 (Thread) 양희재교수 / 경성대학교컴퓨터공학과 쓰레드 (Thread) 양희재교수 (hjyang@ks.ac.kr) / 경성대학교컴퓨터공학과 Thread? 쓰레드 (Thread) 프로그램내부의흐름, 맥 class Test { public static void main(string[] args) { int n = 0; int m = 6; System.out.println(n+m); while (n < m) n++;

More information

<4D F736F F F696E74202D C465F4B6F F6E662DB8AEB4AABDBABFA1BCADC0C7BDC7BDC3B0A3C1F6BFF8>

<4D F736F F F696E74202D C465F4B6F F6E662DB8AEB4AABDBABFA1BCADC0C7BDC7BDC3B0A3C1F6BFF8> Korea Tech Conference 2005 년 5 월 14 일, 서울 2005 년 5 월 14 일 CE Linux Forum Korea Tech Conference 1 리눅스에서의실시간지원 정영준 / 임용관 2005 년 5 월 14 일 CE Linux Forum Korea Tech Conference 2 1. 개요 2. 스케줄러 목차 I. 고정스케줄링시간지원

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

Microsoft PowerPoint - polling.pptx

Microsoft PowerPoint - polling.pptx 지현석 (binish@home.cnu.ac.kr) http://binish.or.kr Index 이슈화된키보드해킹 최근키보드해킹이슈의배경지식 Interrupt VS polling What is polling? Polling pseudo code Polling 을이용한키로거분석 방어기법연구 이슈화된키보드해킹 키보드해킹은연일상한가! 주식, 펀드투자의시기?! 최근키보드해킹이슈의배경지식

More information

API 매뉴얼

API 매뉴얼 PCI-DIO12 API Programming (Rev 1.0) Windows, Windows2000, Windows NT and Windows XP are trademarks of Microsoft. We acknowledge that the trademarks or service names of all other organizations mentioned

More information

Microsoft PowerPoint - ch07 - 포인터 pm0415

Microsoft PowerPoint - ch07 - 포인터 pm0415 2015-1 프로그래밍언어 7. 포인터 (Pointer), 동적메모리할당 2015 년 4 월 4 일 교수김영탁 영남대학교공과대학정보통신공학과 (Tel : +82-53-810-2497; Fax : +82-53-810-4742 http://antl.yu.ac.kr/; E-mail : ytkim@yu.ac.kr) Outline 포인터 (pointer) 란? 간접참조연산자

More information

Microsoft PowerPoint - 04-UDP Programming.ppt

Microsoft PowerPoint - 04-UDP Programming.ppt Chapter 4. UDP Dongwon Jeong djeong@kunsan.ac.kr http://ist.kunsan.ac.kr/ Dept. of Informatics & Statistics 목차 UDP 1 1 UDP 개념 자바 UDP 프로그램작성 클라이언트와서버모두 DatagramSocket 클래스로생성 상호간통신은 DatagramPacket 클래스를이용하여

More information

Frama-C/JESSIS 사용법 소개

Frama-C/JESSIS 사용법 소개 Frama-C 프로그램검증시스템소개 박종현 @ POSTECH PL Frama-C? C 프로그램대상정적분석도구 플러그인구조 JESSIE Wp Aorai Frama-C 커널 2 ROSAEC 2011 동계워크샵 @ 통영 JESSIE? Frama-C 연역검증플러그인 프로그램분석 검증조건추출 증명 Hoare 논리에기초한프로그램검증도구 사용법 $ frama-c jessie

More information

3. 1 포인터란 3. 2 포인터변수의선언과사용 3. 3 다차원포인터변수의선언과사용 3. 4 주소의가감산 3. 5 함수포인터

3. 1 포인터란 3. 2 포인터변수의선언과사용 3. 3 다차원포인터변수의선언과사용 3. 4 주소의가감산 3. 5 함수포인터 - Part2-3 3. 1 포인터란 3. 2 포인터변수의선언과사용 3. 3 다차원포인터변수의선언과사용 3. 4 주소의가감산 3. 5 함수포인터 3.1 포인터란 ü ü ü. ü. ü. ü ( ) ? 3.1 ü. ü C ( ).? ü ü PART2-4 ü ( ) PART3-4 3.2 포인터변수의선언과사용 3.2 포인터 변수의 선언과 사용 (1/8) 포인터 변수의

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

강의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

A Dynamic Grid Services Deployment Mechanism for On-Demand Resource Provisioning

A Dynamic Grid Services Deployment Mechanism for On-Demand Resource Provisioning C Programming Practice (II) Contents 배열 문자와문자열 구조체 포인터와메모리관리 구조체 2/17 배열 (Array) (1/2) 배열 동일한자료형을가지고있으며같은이름으로참조되는변수들의집합 배열의크기는반드시상수이어야한다. type var_name[size]; 예 ) int myarray[5] 배열의원소는원소의번호를 0 부터시작하는색인을사용

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

Microsoft PowerPoint - 11_Thread

Microsoft PowerPoint - 11_Thread Linux 쓰레드 - 기본 - Pthread - 생성과소멸 - 동기화 - 공유변수 - 상호배제 기본? 경량프로세스 (lightweight process: LWP) 일반프로세스는생성시자신만의메모리영역을할당받는다 PCB, code, static, heap, stack 등 : PCB 와스택만별도로할당받고나머지는부모프로세스와공유 생성과전환 (context switch)

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

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 UNIX 및실습 14 장. 유닉스내부구조 1 학습목표 유닉스커널의기능과구조를이해한다. 파일시스템의내부구조를이해하고, inode 가무엇인지배운다. 프로세스가어떻게동작하는지이해한다. 메모리가사용되는방식을이해한다. 프로세스간통신방식에는어떤것이있는지이해한다. 입출력장치는어떻게동작하는지이해한다. 2 Section 01 유닉스커널의구조 커널의정의 프로세스관리와메모리관리,

More information

SS Term #3.doc

SS Term #3.doc Base Knowledge 1/42 Base Knowledge 2/42 Network Initialization 3/42 Network Initialization 4/42 Network Initialization 5/42 Network Initialization 6/42 Network Initialization 7/42 Network Initialization

More information

Microsoft Word - ExecutionStack

Microsoft Word - ExecutionStack Lecture 15: LM code from high level language /* Simple Program */ external int get_int(); external void put_int(); int sum; clear_sum() { sum=0; int step=2; main() { register int i; static int count; clear_sum();

More information

Microsoft PowerPoint - chap02-C프로그램시작하기.pptx

Microsoft PowerPoint - chap02-C프로그램시작하기.pptx #include int main(void) { int num; printf( Please enter an integer "); scanf("%d", &num); if ( num < 0 ) printf("is negative.\n"); printf("num = %d\n", num); return 0; } 1 학습목표 을 작성하면서 C 프로그램의

More information

<322EBCF8C8AF28BFACBDC0B9AEC1A6292E687770>

<322EBCF8C8AF28BFACBDC0B9AEC1A6292E687770> 연습문제해답 5 4 3 2 1 0 함수의반환값 =15 5 4 3 2 1 0 함수의반환값 =95 10 7 4 1-2 함수의반환값 =3 1 2 3 4 5 연습문제해답 1. C 언어에서의배열에대하여다음중맞는것은? (1) 3차원이상의배열은불가능하다. (2) 배열의이름은포인터와같은역할을한다. (3) 배열의인덱스는 1에서부터시작한다. (4) 선언한다음, 실행도중에배열의크기를변경하는것이가능하다.

More information

Microsoft PowerPoint - chap06-2pointer.ppt

Microsoft PowerPoint - chap06-2pointer.ppt 2010-1 학기프로그래밍입문 (1) chapter 06-2 참고자료 포인터 박종혁 Tel: 970-6702 Email: jhpark1@snut.ac.kr 한빛미디어 출처 : 뇌를자극하는 C프로그래밍, 한빛미디어 -1- 포인터의정의와사용 변수를선언하는것은메모리에기억공간을할당하는것이며할당된이후에는변수명으로그기억공간을사용한다. 할당된기억공간을사용하는방법에는변수명외에메모리의실제주소값을사용하는것이다.

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

학습목차 2.1 다차원배열이란 차원배열의주소와값의참조

학습목차 2.1 다차원배열이란 차원배열의주소와값의참조 - Part2- 제 2 장다차원배열이란무엇인가 학습목차 2.1 다차원배열이란 2. 2 2 차원배열의주소와값의참조 2.1 다차원배열이란 2.1 다차원배열이란 (1/14) 다차원배열 : 2 차원이상의배열을의미 1 차원배열과다차원배열의비교 1 차원배열 int array [12] 행 2 차원배열 int array [4][3] 행 열 3 차원배열 int array [2][2][3]

More information

PCServerMgmt7

PCServerMgmt7 Web Windows NT/2000 Server DP&NM Lab 1 Contents 2 Windows NT Service Provider Management Application Web UI 3 . PC,, Client/Server Network 4 (1),,, PC Mainframe PC Backbone Server TCP/IP DCS PLC Network

More information

PowerPoint 프레젠테이션

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

More information

ESP1ºÎ-04

ESP1ºÎ-04 Chapter 04 4.1..,..,.,.,.,. RTOS(Real-Time Operating System)., RTOS.. VxWorks(www.windriver.com), psos(www.windriver.com), VRTX(www.mento. com), QNX(www.qnx.com), OSE(www.ose.com), Nucleus(www.atinudclus.

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

2002년 2학기 자료구조

2002년 2학기 자료구조 자료구조 (Data Structures) Chapter 1 Basic Concepts Overview : Data (1) Data vs Information (2) Data Linear list( 선형리스트 ) - Sequential list : - Linked list : Nonlinear list( 비선형리스트 ) - Tree : - Graph : (3)

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

# Old State Mew State Trigger Actions 1 - TCP/IP NOT CONNECTED Initialization 2 TCP/IP NOT HSMS NOT TCP/IP Connect Succeeds: CONNECTED SELECTED 1. TCP/IP "accecpt" succeeds. Start T7 timeout 1. Cancel

More information

[Brochure] KOR_TunA

[Brochure] KOR_TunA LG CNS LG CNS APM (TunA) LG CNS APM (TunA) 어플리케이션의 성능 개선을 위한 직관적이고 심플한 APM 솔루션 APM 이란? Application Performance Management 란? 사용자 관점 그리고 비즈니스 관점에서 실제 서비스되고 있는 어플리케이션의 성능 관리 체계입니다. 이를 위해서는 신속한 장애 지점 파악 /

More information

Microsoft PowerPoint - ch10 - 이진트리, AVL 트리, 트리 응용 pm0600

Microsoft PowerPoint - ch10 - 이진트리, AVL 트리, 트리 응용 pm0600 균형이진탐색트리 -VL Tree delson, Velskii, Landis에의해 1962년에제안됨 VL trees are balanced n VL Tree is a binary search tree such that for every internal node v of T, the heights of the children of v can differ by at

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

JVM 메모리구조

JVM 메모리구조 조명이정도면괜찮조! 주제 JVM 메모리구조 설미라자료조사, 자료작성, PPT 작성, 보고서작성. 발표. 조장. 최지성자료조사, 자료작성, PPT 작성, 보고서작성. 발표. 조원 이용열자료조사, 자료작성, PPT 작성, 보고서작성. 이윤경 자료조사, 자료작성, PPT작성, 보고서작성. 이수은 자료조사, 자료작성, PPT작성, 보고서작성. 발표일 2013. 05.

More information

제1장 Unix란 무엇인가?

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

More information

Module 7: Process Synchronization

Module 7:  Process Synchronization Chapter 6: Process Synchronization ( 프로세스동기화 ), Hanbat National Univ. Computer Eng. Dept. Y.J.Kim 2010 Module 6: Synchronization( 동기화 ) Background( 배경 ) The Critical-Section Problem( 임계구역문제 ) Peterson

More information

KEY 디바이스 드라이버

KEY 디바이스 드라이버 KEY 디바이스드라이버 임베디드시스템소프트웨어 I (http://et.smu.ac.kr et.smu.ac.kr) 차례 GPIO 및 Control Registers KEY 하드웨어구성 KEY Driver 프로그램 key-driver.c 시험응용프로그램 key-app.c KEY 디바이스드라이버 11-2 GPIO(General-Purpose Purpose I/O)

More information

Operating System Lab 2

Operating System Lab 2 2019 Operating System Lab 2 LAB 2 SYNCHRONIZATION CHOI GUNHEE, CHOI JONG MOO [ Lab 2 Synchronization ] 운영체제수업을통해 Race Condition 의위험성및 Synchronization 의필요성에대해숙지하였다. 이를바탕으로본과제에서는 pthread 기반 mutex 를활용해 Race

More information

메시지큐를이용한 IPC 프로그램구현과제보고서 1. 과제의목적 1 리눅스가지원하는프로세스간통신방식중다수의프로세스사이에구조화된데이터블럭, 즉메시지를전달하는데주로사용되는메시지큐방식에대하여무엇인지, 어떻게사용하는지공부한다. 2 공부한내용을점검하기위해기작성된 epda 프로세스관

메시지큐를이용한 IPC 프로그램구현과제보고서 1. 과제의목적 1 리눅스가지원하는프로세스간통신방식중다수의프로세스사이에구조화된데이터블럭, 즉메시지를전달하는데주로사용되는메시지큐방식에대하여무엇인지, 어떻게사용하는지공부한다. 2 공부한내용을점검하기위해기작성된 epda 프로세스관 [ R E P O R T ] 정보통신공학전공 200301582 김성태 메시지큐를이용한 IPC 프로그램구현과제보고서 1. 과제의목적 1 리눅스가지원하는프로세스간통신방식중다수의프로세스사이에구조화된데이터블럭, 즉메시지를전달하는데주로사용되는메시지큐방식에대하여무엇인지, 어떻게사용하는지공부한다. 2 공부한내용을점검하기위해기작성된 epda 프로세스관리프로그램과 sms 메시지전송에뮬레이션프로그램을활용하여

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

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 공개 SW 솔루션설치 & 활용가이드 시스템 SW > 가상화 제대로배워보자 How to Use Open Source Software Open Source Software Installation & Application Guide CONTENTS 1. 개요 2. 기능요약 3. 실행환경 4. 설치및실행 5. 기능소개 6. 활용예제 7. FAQ 8. 용어정리 - 3-1.

More information

CompareAndSet(CAS) 함수는 address 주소의값이 oldvalue 인지비교해서같으면 newvalue 로 바꾼다. 소프트웨어 lock 을사용하는것이아니고, 하드웨어에서제공하는기능이므로더빠르고 간편하다. X86 에서는 _InterlockedCompareEx

CompareAndSet(CAS) 함수는 address 주소의값이 oldvalue 인지비교해서같으면 newvalue 로 바꾼다. 소프트웨어 lock 을사용하는것이아니고, 하드웨어에서제공하는기능이므로더빠르고 간편하다. X86 에서는 _InterlockedCompareEx NON-BLOCKING ALGORITHM Homepage: https://sites.google.com/site/doc4code/ Email: goldpotion@outlook.com 2011/10/23 멀티쓰레드환경에서알아두면유용한자료구조에대해소개해본다. HARDWARE PRIMITIVE 효율적인구현을위해, Hardware 에서제공하는기능을이용해야한다. 자주쓰는기능에대해

More information

Chap 6: Graphs

Chap 6: Graphs 그래프표현법 인접행렬 (Adjacency Matrix) 인접리스트 (Adjacency List) 인접다중리스트 (Adjacency Multilist) 6 장. 그래프 (Page ) 인접행렬 (Adjacency Matrix) n 개의 vertex 를갖는그래프 G 의인접행렬의구성 A[n][n] (u, v) E(G) 이면, A[u][v] = Otherwise, A[u][v]

More information

비트와바이트 비트와바이트 비트 (Bit) : 2진수값하나 (0 또는 1) 를저장할수있는최소메모리공간 1비트 2비트 3비트... n비트 2^1 = 2개 2^2 = 4개 2^3 = 8개... 2^n 개 1 바이트는 8 비트 2 2

비트와바이트 비트와바이트 비트 (Bit) : 2진수값하나 (0 또는 1) 를저장할수있는최소메모리공간 1비트 2비트 3비트... n비트 2^1 = 2개 2^2 = 4개 2^3 = 8개... 2^n 개 1 바이트는 8 비트 2 2 비트연산자 1 1 비트와바이트 비트와바이트 비트 (Bit) : 2진수값하나 (0 또는 1) 를저장할수있는최소메모리공간 1비트 2비트 3비트... n비트 2^1 = 2개 2^2 = 4개 2^3 = 8개... 2^n 개 1 바이트는 8 비트 2 2 진수법! 2, 10, 16, 8! 2 : 0~1 ( )! 10 : 0~9 ( )! 16 : 0~9, 9 a, b,

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

example code are examined in this stage The low pressure pressurizer reactor trip module of the Plant Protection System was programmed as subject for

example code are examined in this stage The low pressure pressurizer reactor trip module of the Plant Protection System was programmed as subject for 2003 Development of the Software Generation Method using Model Driven Software Engineering Tool,,,,, Hoon-Seon Chang, Jae-Cheon Jung, Jae-Hack Kim Hee-Hwan Han, Do-Yeon Kim, Young-Woo Chang Wang Sik, Moon

More information

untitled

untitled int i = 10; char c = 69; float f = 12.3; int i = 10; char c = 69; float f = 12.3; printf("i : %u\n", &i); // i printf("c : %u\n", &c); // c printf("f : %u\n", &f); // f return 0; i : 1245024 c : 1245015

More information

Chapter 4. LISTS

Chapter 4. LISTS 6. 동치관계 (Equivalence Relations) 동치관계 reflexive, symmetric, transitive 성질을만족 "equal to"(=) 관계는동치관계임. x = x x = y 이면 y = x x = y 이고 y = z 이면 x = z 동치관계를이용하여집합 S 를 동치클래스 로분할 동일한클래스내의원소 x, y 에대해서는 x y 관계성립

More information

구조체정의 자료형 (data types) 기본자료형 (primitive data types) : char, int, float 등과같이 C 언어에서제공하는자료형. 사용자정의자료형 (user-defined data types) : 다양한자료형을묶어서목적에따라새로운자료형을

구조체정의 자료형 (data types) 기본자료형 (primitive data types) : char, int, float 등과같이 C 언어에서제공하는자료형. 사용자정의자료형 (user-defined data types) : 다양한자료형을묶어서목적에따라새로운자료형을 (structures) 구조체정의 구조체선언및초기화 구조체배열 구조체포인터 구조체배열과포인터 구조체와함수 중첩된구조체 구조체동적할당 공용체 (union) 1 구조체정의 자료형 (data types) 기본자료형 (primitive data types) : char, int, float 등과같이 C 언어에서제공하는자료형. 사용자정의자료형 (user-defined

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

Microsoft PowerPoint - 30.ppt [호환 모드]

Microsoft PowerPoint - 30.ppt [호환 모드] 이중포트메모리의실제적인고장을고려한 Programmable Memory BIST 2010. 06. 29. 연세대학교전기전자공학과박영규, 박재석, 한태우, 강성호 hipyk@soc.yonsei.ac.kr Contents Introduction Proposed Programmable Memory BIST(PMBIST) Algorithm Instruction PMBIST

More information

목차 BUG offline replicator 에서유효하지않은로그를읽을경우비정상종료할수있다... 3 BUG 각 partition 이서로다른 tablespace 를가지고, column type 이 CLOB 이며, 해당 table 을 truncate

목차 BUG offline replicator 에서유효하지않은로그를읽을경우비정상종료할수있다... 3 BUG 각 partition 이서로다른 tablespace 를가지고, column type 이 CLOB 이며, 해당 table 을 truncate ALTIBASE HDB 6.1.1.5.6 Patch Notes 목차 BUG-39240 offline replicator 에서유효하지않은로그를읽을경우비정상종료할수있다... 3 BUG-41443 각 partition 이서로다른 tablespace 를가지고, column type 이 CLOB 이며, 해당 table 을 truncate 한뒤, hash partition

More information

002-022~41-기술2-충적지반

002-022~41-기술2-충적지반 Improvement cases of waterproofing and auxiliary construction methods in alluvium soil tunnel In the past, subway tunnel is mostly applied to rock tunnel in order to secure the safety. But, in recent years,

More information

고급 IPC 설비

고급 IPC 설비 고급프로세스갂통싞 #2 세마포어 네델란드의 E.W.Dijikstra 가프로세스동기화문제의해결방안으로제시 p( ) 또는 wait( ) if (sem!= 0) decrement sem by 1 else v( ) 또는 signal( ) wait until sem become non-zero, then decrement increment sem by one if (queue

More information