1 / 5

파일크기 – 1MB (256K of integer) device file – 4, 8 stripe size – 64B & 256B 발표시 포함될 내용

파일크기 – 1MB (256K of integer) device file – 4, 8 stripe size – 64B & 256B 발표시 포함될 내용 네 가지 경우 생성된 device file 들의 snapshot ( 화면 내용 ) 알고리즘 요약 주어진 scenario 에 대한 시간 측정 값 보고서는 발표로 대치함 점수 * 미완성 (20 점 ), 실행이 안됨 (50 점 ), error(70 점 ), 완성 (100 점 ). 발표순서 ( 팀별 15 분까지 ) 1) ppt

nowles
Download Presentation

파일크기 – 1MB (256K of integer) device file – 4, 8 stripe size – 64B & 256B 발표시 포함될 내용

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. 파일크기 – 1MB (256K of integer) • device file – 4, 8 • stripe size – 64B & 256B • 발표시 포함될 내용 • 네 가지 경우 생성된 device file들의 snapshot (화면 내용) • 알고리즘 요약 • 주어진 scenario에 대한 시간 측정 값 • 보고서는 발표로 대치함 • 점수 • * 미완성 (20점), 실행이 안됨(50점), error(70점), 완성(100점)

  2. 발표순서 (팀별 15분까지) • 1) ppt • 2) od -i 로 네가지 경우의 device file들을 설명 • (4 & 64B, 4 & 256B, 8 & 64B, 8 & 256B) • 3) io_test.c 실행 • 4) od –i로 실행 결과 바뀐 device file들을 보여줌

  3. io_test.c • #ifdef TIMES • start_time = dclock(); • #end if • unix_open ( 8 & 64B); • unix_seek (32*sizeof(int)); • wbuf = (int *)malloc(96*sizeof(int)); • wbuf[0] ~ wbuf[15] = 1000 ~ 1015; wbuf[16] ~ wbuf[31] = 2000 ~ 2015; wbuf[32] ~ wbuf[47] = 3000 ~ 3015; • wbuf[48]~ wbuf[63] = 4000 ~ 4015; wbuf[64] ~ wbuf[79] = 5000 ~ 5015; wbuf[80] ~ wbuf[95] = 6000 ~ 6015; • unix_write(wbuf, 96*sizeof(int)); • unix_close; • unix_open; • unix_seek (32* sizeof(int)); • rbuf = (int *)malloc(96*sizeof(int)); • unix_read(rbuf, 96*sizeof(int)); • unix_close; • #ifdef TIMES • end_time = dclock() – start_time; • #endif • display rbuf using for loop; • display end_time;

  4. 세마포 • p(sem), wait(sem) • v(sem), signal(sem) • invariant • (세마포의 초기값 + v 연산횟수 – 완료된 p 연산횟수) >= 0 • int semget(key_t key, int nsems, int permflags) • int semclt (int semid, int sem_num, int command, union semun ctl_arg); • union semun { • int val; • struct semid_ds *buf; • ushort *array; • }

  5. 세마포 • int semop(int semid, struct sembuf *op_array, size_t num_ops); • sem_op에 관한 p281~p282 내용 숙지할 것 • (예제) p283 (test1.c) • (실습) 부모가 A에서 Z까지 화면출력하고 자식이 a에서 z까지 화면 출력 • 하는 program을 semaphore를 쓰는 경우와 쓰지 않는 경우로 나누어서 비교 • (sample2.c 수정)

More Related