전체 글(121)
-
BOJ_15721_번데기
1 구분: 구현, 시뮬레이션 언어: Java 전략: 고정적인 부분(뻔 - 데기 - 뻔 - 데기)과 변화하는 부분(뻔(xN번) - 데기(xN번))을 분리 구해야 하는 것이 '뻔'인지 '데기'인지 잘 구분하여 개수를 세고, 도달하였는지 체크 도달 하였다면 전체 '뻔' 개수와 '데기' 개수를 더하여 총 몇 번 순선이 돌았는지 확인 전체 사람 수 만큼 나누고, 1을 뺌(사람의 번호가 0부터 시작) 2. 코드 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int t = scanner...
2021.12.07 -
IPC(Interprocess Communication)
Independent vs cooperating process Independent: 다른 프로세스에 영향을 끼치거나 영향을 받을 수 없음 Cooperating: 다른 프로세스 실행에 영향을 끼치거나 영향을 받을 수 있 - 장점: 정보공유 / 계산 속도 증가/ modularity/ 편리함 IPC(Interprocess Communication) IPC(Interprocess Communication) : 내부 프로세스 간의 협력, 커뮤니케이션 - cooperaing process가 필요한것 Shared Memory communication하기를 원하는 프로세스 간의 공유된 메모리 공간 system call을 부를 필요가 없음 속도가 빠름 생성 공간의 제한이 있음 OS가 아닌 users processes에..
2021.12.02 -
System Program
program 개발과 실행을 위한 환경 제공 OS가 제공하는 service의 대행 대부분의 OS에 대한 사용자의 관점은 system program에 의해 정의된다 System programming language를 통해 System을 쌓는 것 File Modification 파일을 생성하거나 수정하기 위한 에디터 파일의 특정 내용이나 글을 변경하기 위한 명령어 Programming Language Support Compiler, Debugger, Assembler, interpreters(가끔) Program Loading and Execution 실행 준비를 마친 프로그램은 메모리로 load되어야 함 loader, linkage editor, debugging system Communications 프..
2021.12.02 -
System Calls
System Calls OS에 의해 제공되는 Programming Interface 주로 하이 레벨(high-level)인 C나 C++로 작성 API(Application Programming Interface)를 통해 프로그램에 접근 #include ssize_t read(int fd, void *buf, size_t count) //return value, function name, parameters -Example of Standard API 가장 흔한 API: Win32, POSIX API, Java API System Call Implementation 숫자가 각 System Call과 연관 - system call interface는 이 숫자로 index system call interfaa..
2021.12.02 -
Operating System Service
OS는 프로그램과 사용자에게 프로그램과 서비스의 실행 환경을 제공 사용자에게 편리한 기능 제공 User Interface(UI) - CLI(Command-Line), GUI(Graphics User Interface), Batch Program Execution - 프로그램을 메모리에 넣기, 프로그램 실행, 프로그램 실행 종료 I/O operations - file이나 I/O장치 File-system manipulation - 파일 생성, 삭제, 읽기, 쓰기... Communication - 프로세스 사이의 통신, 다른 컴퓨터 간 통신, 메모리 공유나 메시지를 통해 정보 교환 Error detection - 가능한 에러를 인지, 각 에러에 맞는 조취를 해야 함 자원 분배를 통한 효율적인 실행을 보장 Re..
2021.12.02 -
Linux Tutorial - 기본 명령어
shell 사용자가 입력하는 명령어(commands)를 해석하고 그 실행을 관리 안쪽과 바깥쪽을 연결하는 껍데기 특징 kernel이라 불리는 OS의 내부와 의사소통함 유명한 shell: tcsh, csh, korn, bash 대소문자를 구분한다 - 명령어: 대부분 소문자/ 맨 끝 옵션: 대문자 Help 도움말 명령어 File System pwd(print working directory) - 현재 경로를 찾음 cd(change directory) - 특정 디렉토리로 변경을 함 - ~ 는 홈 디렉토리의 위치(물결) - .. 은 현재 디렉토리보다 한 단계 아래의 위치(쩜쩜) ls - 현재 디렉토리의 존재하는 파일 리스트 - l : 현재 디렉토리의 내용을 자세하게 - t : 수정 시간 순으로 정렬 - S : ..
2021.11.27