> For the complete documentation index, see [llms.txt](https://krjaeh0.gitbook.io/j-log/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://krjaeh0.gitbook.io/j-log/programming/cs_basics/os_memory/concurrency-and-synchronization/concurrentprocessoverview.md).

# ConcurrentProcessOverview

## 병행 프로세스(Concurrent Process) 란?

* 여러 개의 프로세스가 실제로 병렬로 실행되거나, 시간 분할을 통해 교차 실행되는 것을 의미

## 병행 프로세스를 사용하는 이유

{% stepper %}
{% step %}

### 자원 활용 극대화

CPU, I/O 같은 자원을 유휴 상태로 두지 않고 최대한 활용.
{% endstep %}

{% step %}

### 응답성 향상

사용자와의 상호작용이 빠르다.
{% endstep %}

{% step %}

### 구조적 프로그램 설계

독립적인 모듈화 가능하다.
{% endstep %}

{% step %}

### 멀티코어 환경 최적화

진짜 병렬 실행이 가능하다.
{% endstep %}
{% endstepper %}

## 프로세스 간 관계

<table><thead><tr><th width="100">유형</th><th>설명</th></tr></thead><tbody><tr><td>독립적</td><td>서로 상호작용하지 않음. 자원을 공유하지 않음.</td></tr><tr><td>협력적</td><td>자원을 공유하거나 데이터를 교환함. 동기화가 필요함.</td></tr></tbody></table>

## 핵심 개념

### 1. 상호 배제 (Mutual Exclusion)

* 두 개 이상의 프로세스가 동시에 공유 자원(Critical Section)을 접근하지 못하도록 하는 원칙

### 2. 동기화 (Synchronization)

* 프로세스 간 시행 순서를 조절

### 3. 교착상태 (Deadlock)

* 여러 프로세스가 서로 자원을 기다리다가 아무도 진행하지 못하는 상태

### 4. 문맥 교환 (Context Switching)

* 운영체제가 CPU 제어를 한 프로세스에서 다른 프로세스로 전환하는 과정
* 병행성을 흉내내는 기법 중 하나.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://krjaeh0.gitbook.io/j-log/programming/cs_basics/os_memory/concurrency-and-synchronization/concurrentprocessoverview.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
