* 해당 게시물은 경북대학교 컴퓨터학부 강의초빙교수, 배준현 교수님의 강의를 보고 작성되었음을 미리 알려드립니다. ( 개인적인 공부를 정리한 글입니다. )
> 주니온 TV Youtube Channel. https://www.youtube.com/channel/UCOcPzXDWSrnaKXse9XOPiog
> 주니온 TV Inflearn page. https://www.inflearn.com/users/@joonion
사람이 컴퓨터를 사용하면 많은 경우에서 I/O 작업이 주작업이 된다.
[ ] Memory-Mapped I/O
- The controller has one or more registers for data and control signals.
data-in register: is read by the host to get input.
data-out register: is written by the host to send output.
status register: contains bits that can be read by the host.
control register: can be written by the host to start a command or to change the mode of a device.
[★] Three types of I/O
- polling: or busy-waiting:
reading the status register repeatedly until the busy bit becomes clear.
레지스터리 정보에서 Data in이 될 때 까지 계속해서 기다리는 방식.
- interrupt:
CPU has a wire called the interrupt-request line.
If CPU detects an interrupt, it jumps to an ISR(interrupt service routine) to handle an interrupt.
The addresses of ISRs is specified in the interrupt vector table.
CPU가 interrupt를 확인하여, Interrupt service routine을 사용해서 처리한다.
- DMA: Direct Memory Access:
used to avoid programmed I/O (one byte at a time).
useful for handling large data transfer.
아주 큰 데이터의 경우 직접적으로 메모리에 접근한다.
[ ] Blocking I/O .vs. Non-blocking I/O
- Blocking I/O: a thread is suspended.
moved from running queue to waiting queue.
thread가 유예되고 waiting으로 간다.
- Non-blocking I/O: does not halt the execution of the thread.
e.g., receiving keyboard or mouse input in word processor.
returns as much as available.
바로 return해서 처리한다.
- Asynchronous system call: the thread continues to execute its code.
실행을 계속해 나가다 인터럽트가 걸리면 그때 처리한다.
[ ] File System
- consists of two distinct parts
a collection of files, each storing related data
a directory structure, which organizes all the files in the system.
- Access Methods
sequential access: Information in the file is processed in order, one record after the other.
- direct accees(Random Access File): relative access: A file is made up of fixed-length logical records that allow programs to read and write records rapidly in no particular order.
- The file system itself is generally composed of many different levels.
[ ] Allocation Method.
파일을 효율적이고 빠르게 할당해야 한다.
- Contiguous Allocation > 연속적으로 파일을 할당한다.
이 방법은 Paging과 마찬가지로 external fragment가 발생한다.
- Linked Allocation.
이 방법의 단점은 영상 시청을 예로 알 수 있다. 동영상을 뛰어넘어 본다면 계속해서 Linked list를 하나씩 탐색하면서 지나가야 한다.
- FAT
이 방법은 Linked list를 쓰는데 조금 더 효율적으로 쓰기 위해 고안된 기술이다.
Linked list에 index를 넣어서 사용한다.
- Indexed Allocation
FTA의 문제에는 포함되지 않는다. 일반적으로 Linked list로 할당되었다는 가정에,
Bad sector 가 발생한다면 다음 List 를 찾아 갈 수 없게 된다. 이를 방지하기 위해 한 블락에 모든 인덱스를 저장한다.
'Computing > Operating System' 카테고리의 다른 글
17 > Storage Management (0) | 2021.11.15 |
---|---|
16 > Page Replacement (0) | 2021.11.15 |
14 > Paging, Swaping (0) | 2021.11.15 |
13 > Main Memory (0) | 2021.11.15 |
12 > 동기화(4) (0) | 2021.11.15 |