1 / 3

Homework # 4 (1/3)

Homework # 4 (1/3). Compile & Makefile. 다음을 수행한 후 , 화면 ( 혹은 파일 ) 을 출력하여 제출한다 . 1. 다음 순서에 따라 수행하여 파일 ps_result 를 만든다 . 1 ) 10 만초를 쉬는 명령을 background job 으로 수행한다 . (sleep 100000 ) 2) 20 만초를 쉬는 명령을 foreground job 으로 수행한다 . (sleep 200000) 3) 20 만초 쉬는 명령을 background job 으로 전환한다 .

cheche
Download Presentation

Homework # 4 (1/3)

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. Homework #4 (1/3) Compile & Makefile • 다음을 수행한 후, 화면(혹은 파일)을 출력하여 제출한다. 1. 다음 순서에 따라 수행하여 파일 ps_result를 만든다. 1) 10만초를 쉬는 명령을 background job으로 수행한다. (sleep 100000) 2) 20만초를 쉬는 명령을 foreground job으로 수행한다. (sleep 200000) 3) 20만초 쉬는 명령을 background job으로 전환한다. 4) 현재의 프로세스 상태를 ps_result에 받는다. (ps및 redirection) 5) 10만초 쉬는 명령을 종료시킨다. (kill) 6)현재의 프로세스 상태를 ps_result에 append한다. (ps및 redirection) 7) 20만초 쉬는 명령을 종료시킨다. (kill) 8) 현재의 프로세스 상태를 ps_result에 append한다. (ps및 redirection)

  2. Homework #4 (2/3) Compile & Makefile 2. 다음 순서에 따라 수행하고, 그 과정의 화면을 캡쳐한다. 1) /tmp디렉토리에서 다음 파일을 자신의 디렉토리로 복사한다. /tmp/HW04/div_multi.c 2) 다운로드한div_multi.c파일을 컴파일하여div_multi1실행 파일을 만든다. 3) 상기 div_multi.c파일을최적화 컴파일하여div_multi2실행 파일을 만든다. (주의: 옵션 –O3 사용) 4) diff 명령어를 사용하여 div_multi1과 div_multi2가 다름을 확인한다. 5) 상기 div_multi1과 div_multi2의 수행 시간을 다음과 같이 측정한다. $ /usr/bin/time div_multi1 $ /usr/bin/time div_multi2

  3. write_only read_n_write read_only rnw2.o rnw1.o writeA.o writeB.o readA.o readB.o rnw.h read.h write.h rnw2.c writeA.c writeB.c rnw1.c readA.c readB.c Homework #4 (3/3) Compile & Makefile 3. 다음과 같은 파일 dependency가 있을 때의 Makefile을 작성한다. • Due Date: 10월 30일(수)

More Related