본문 바로가기

Archived(CSE)/시스템 프로그래밍

(8)
Team project. 산성비(한컴타자연습) cover 게임 구현 참조1) https://m.blog.naver.com/PostView.nhn?blogId=lime94&logNo=220916520534&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F2) http://janghw.tistory.com/entry/%EC%8B%9C%EC%8A%A4%ED%85%9C-%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D-%ED%8C%80%ED%94%84%EB%A1%9C%EC%A0%9D%ED%8A%B8-4 설계 다음과 같은 헤더 파일과 curse 라이브러리, pthread 라이브러리, 그리고 다음과 같은 기본적인 틀의 함수들과 그 외에 추가적으로 모드를 적용할 함수들로 나뉘게 되었다. 먼저 우리가 출력할 단어들을 어..
Chap 8. Process Chap 8. ProcessProcesses and Programs Studying sh * process (동적) / program (정적)* kernel -> allocate program at memory* shell -> control process, run program * execvp(program name, arglist) -> run process* fork() -> 프로세스 하나 추가, wait(NULL) -> 대기하기* shell PR의 구조 - fork~execvp~wait
Chap 14. Threads : Concurrent Functions Chap 14. Threads : Concurrent Functions * Thread -> multiple concurrent function in one process * pthread_create( pthread_t, attr, function, argument )* pthread_join( pthread_t, return**)* pthread_mutex_lock, pthread_mutex_unlock -> 같은 변수 처리하기(전역변수) * 지역변수 나눠서 처리 후 add* process는 data 공간을 독립적으로 구성하여 갖고 있지만, thread는 data 공간을 공유한다.* process 당 thread는 1개 이상이 구성되어 동작된다.
Chap 7. Event-Driven Programming (Chap 6. signal - 동기/비동기, Signal(signum, SIG_IGN or SIG_DFL or function))\ Chap 7. Event-Driven Programming * Lcurses * sleep / alarm* Time - real / virtual(user) / profile(user+kennel)* struct Itimerval - value, interval -> 반복 알람* setitimer(time kind, itimerval, old itimerval)* multi signal * sigaction - struct sigaction.sa_handler - 함수 , sa_flag - 옵션, sa_mask * sigset_t - emptyset, addset -> s..
Team project. 산성비(한컴타자연습) cover 게임 구상 참조: 1) https://m.blog.naver.com/PostView.nhn?blogId=lime94&logNo=220916520534&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F2) http://janghw.tistory.com/entry/%EC%8B%9C%EC%8A%A4%ED%85%9C-%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D-%ED%8C%80%ED%94%84%EB%A1%9C%EC%A0%9D%ED%8A%B8-4 우리 조는 한컴 타자연습의 산성비 게임을 cover하여 게임을 제작하기로 하였다.이미 오픈 소스로 많이 배포되어 있기에 참고하여 제작하기로 하였는데 몇 가지 차별성을 두기로 하였다. 그리고 다음은 예상 실행 화..
Chap 11. Connecting to Processes Near and Far Servers and Sockets Chap 11. Connecting to Processes Near and Far Servers and Sockets * Unix - one Interface(FILE IO interface) -> disk, device, pipe, socket* Client -Server Processclient - interface / server - service supply* example) BC(client) - DC(server)* BC - DC * fdopen(fd, 모드), fopen(filename, 모드), popen(명령어, 모드) => FILE * 반환* popen() -> fp 값으로 fprintf fscanf 등 가능 * Socket server, client* socket Server - so..
Chap 10. I/O Redirection and Pipes Chap 10. I/O Redirection and Pipes * CLI Communication by I/O and PIPES * cmd $ Comm A B -> print difference1) A & !B2) B & !A3) A & B * The ">" operator can be used to treats files as variables of arbitrary size and structure( cmd > writeFile , cmd then we receive "THE LOWEST FD" * Shell $ CMD > FD then, if you write st..
Chap 9. A Programmable Shell Chap 9. A Programmable Shell . * Shell -> run as interpreter (an essential part of UNIX)* Shell run as two way ( sh ~~ / chmod +x )* smsh(fork - wait - execlp)* smsh2 - if~then~else~fi (controlCheck - smsh1)* smsh3 - variable(set- VLlist, = - VLstore, export)* smsh4 - envVar * smsh.ver1 * Shell control ( if ~ then ~ else ~ fi) * smsh.ver2 * variable ( local / env ) - set, assign, export, unset *..