1 / 6

Struct book{ } a;

Struct book{ } a;. Struct { } a;. Struct student{ }; typedef struct student student ; student mystudent ;. typedef struct { } software; software visual;. typedef union epoll_data { } epoll_data_t ;. Select 함수의 단점 전체 파일디스크립터가 나타나는 배열에 생성되어 검사의 대상이 되는

mills
Download Presentation

Struct book{ } a;

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Struct book{ } a; Struct { } a; Struct student{ }; typedefstruct student student; student mystudent; typedefstruct { } software; software visual; typedef union epoll_data{ } epoll_data_t;

  2. Select함수의 단점 전체 파일디스크립터가 나타나는 배열에 생성되어 검사의 대상이 되는 파일디스크립터만1로 표시하여 일일히 손으로 배열에 넣어 놓아야 함 변화가 있는 파일디스크립터 뿐 아니라 변화가 없는 파일디스크립터 까지 나타나 있는 배열을 받아서 일일히for문을 통해서 1로 표시된 변화가 생긴파일디스크립터가 무엇인지 찾아야 함 운영체제에 공통적으로 있는 select함수 운영체제별로커널에서select함수를 발전시킨 여러 함수들이 존재 Linux => epoll Windows => iocp 프로그램 OS 검사 대상 파일디스크립터 전체 파일디스크립터중에서 검사 대상 파일디스크립터만1로 표시되는 배열 변화가 생긴 파일디스립터만 표시된 배열

  3. 프로그램 OS structepoll_event 1 1 1 2 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 이벤트 : EPOLLIN 파일 디스크립트: 1 2. epoll_ctl 저장 1. epoll_create epoll인스턴스: 사건별로 나눠서 저장 숫자 : 파일 디스크립트 EPOLLIN structepoll_events[] 3. epoll_wait EPOLLOUT 저장

  4. 엣지트리거나 레벨 트리거는 둘 다 동시에 운영체제가 프로그램에게 소켓의 입력버퍼에 정보가 있음을 알려줌 레벨트리거는1 상태에 있는 동안 계속 운영체제에서 프로그램으로 소켓의 입려버퍼에 정보가 있음을 알려줌 레벨 트리거 1 엣지트리거는0 -> 1 상태로 변화되는 시기에만 운영체제에서 프로그램으로 소켓의 입력버퍼에 정보가 있음을 알려줌 엣지트리거 0 0 : 소켓의 입력버퍼에 아무 내용이 없는 상태 1 : 소켓의 입력버퍼에 내용이 들어 있는 상태

  5. 레벨트리거는여러 번의 epoll_wait함수를 이용하여 소켓의 입력버퍼에 내용이 남아 있는 소켓을 확인하여 그 한 소켓의 입력버퍼에 들어 있는 전체 내용을 읽어 들임 epoll_wait 입력 정보가 들어 있는 소켓 read함수

  6. 엣지는 한번의 epoll_wait함수사용으로 한 소켓의입력버퍼의 전체내용을 읽어 들어야 함 한번의 Epoll_wait함수로 입력정보가 들어있는 소켓을 알아내고 계속해서 read함수의 인자로 그 소켓을 이용하여 호출을 반복하여 그 소켓의 입력버퍼의 내용을 다 읽어 들임 epoll_wait 입력 정보가 들어 있는 소켓 read함수

More Related