대학공부/운영체제 4

4. Threads & Concurrency

OverviewThread: a light-weight processCPU 사용의 기본 단위이며 thread ID, a program counter(PC), a register set, stack으로 구성같은 프로세스에 속한 스레드는 code section, data section, other OS resources를 공유하나의 애플리케이션은 여러 스레드를 제어하여 독립된 프로세스로 구현될 수 있음웹 서버는 이미지를 표시하는 스레드와 네트워크에서 데이터를 받는 스레드를 가질 수 있음하나의 애플리케이션은 여러 개의 비슷한 태스크를 수행서버가 요청을 수신할 때마다 단일 프로세스를 생성 -> 많은 시간과 자원을 소모웹 서버 프로세스가 멀티스레드 방식이라면 서버는 클라이언트 요청을 듣기 위한 별도의 스레드를 생..

3. Processes

Process Concept운영체제가 실행하는 프로그램 종류Batch system - jobsTime-shared systems - user programs or tasksProcess: 실행 중인 프로그램상태 정보는 program counter의 값과 레지스터의 내용으로 표현됨Text Section: 실행가능한 코드Data Section: 전역 변수Heap Section: 프로그램 실행 동안 동적으로 할당된 메모리Stack Section: 함수 호출 시 임시 데이터 저장소(매개변수, 지역변수, 반환 주소)Program: 디스크에 저장된 passive entity (실행가능한 파일)Process: 실행가능한 파일이 메모리에 로드된 active entity  Process State프로세스 실행 동안 상태..

2. OS structures

Operating System ServicesUser interface: GUI, CLI, Touch-screen interfaceProgram execution: 프로그램을 실행하기 위해서는 메모리에 로드해야 함I/O operations: 실행 프로그램이 I/O를 요구할 수 있음File-system manipulation: 프로그램은 파일이나 폴더를 읽고, 쓰고, 만들고, 삭제하고, 조회하고, 허가 관리를 함Communnicatins: 실행 중인 프로세스간 발생 - shared memory, message passing을 통해 이루어짐Resource allocation: 동시에 여러 사용자나 작업이 실행될 때 자원이 할당되어야 함Logging: 프로그램의 컴퓨터 자원 사용을 추적Protection an..

Chapter 1. Introduction

운영체제(Operating System): user와 computer hardware의 중재자. 역할: Resource allocator, Controll program 목적: user program 수행, user problem을 쉽게 해결, computer system을 사용하기 편리하게, computer hw를 효율적으로 사용 computer system = Hardware + OS + Application programs + users kernel - 항상 실행 중인 프로그램으로 운영체제의 핵심이 됨 system programs - kernel이 아니면서 os와 관련된 프로그램 application programs - os와 관련이 없는 프로그램 Bootstrap program : 전원을 켤 때 ..