Computing/Operating System

18. I/O Systems

i독 2021. 11. 15. 02:30

 

* 해당 게시물은 경북대학교 컴퓨터학부 강의초빙교수, 배준현 교수님의 강의를 보고 작성되었음을 미리 알려드립니다. ( 개인적인 공부를 정리한 글입니다. )

 

> 주니온 TV Youtube Channel.  https://www.youtube.com/channel/UCOcPzXDWSrnaKXse9XOPiog

 

주니온TV 아무거나연구소

TMI Lab. 아무거나 연구소의 유튜브 TMI 지식나눔 채널 컴퓨팅 사고력을 키워 주고 코딩 지능을 길러 주는 자세히 보면 유익한 코딩 채널 주니온TV@Youtube 주니온 박사: 현) 경북대학교 컴퓨터학부 초

www.youtube.com

 

> 주니온 TV Inflearn page.  https://www.inflearn.com/users/@joonion

 

주니온님의 소개 - 인프런 | 온라인 강의 플랫폼

인프런 지식공유자 주니온님의 소개 페이지 입니다. - 지식공유자 소개 | 인프런...

www.inflearn.com


사람이 컴퓨터를 사용하면 많은 경우에서 I/O 작업이 주작업이 된다.

 

Figure 12.1 A typical PC bus arch i tecture.

 

[  ] 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.

 

Figure 12.2 Device I/O port locations on PCs (partial).

[] 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.

아주 데이터의 경우 직접적으로 메모리에 접근한다.

 

Figure 12.3 Interrupt-driven I/O cycle.
Figure 12.6 Steps in a DMA 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.

실행을 계속해 가다 인터럽트가 걸리면 그때 처리한.

Figure 12.9 Two I/O m e thods: (a) synchronous (b) asynchronous.

[  ] 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.

Figure 14.1 L a yered file system.

[  ] Allocation Method.

파일을 효율적이고 빠르게 할당해야 한다.

- Contiguous Allocation > 연속적으로 파일을 할당한다.

Figure 14.4 Contiguous allo c ation of disk space.

방법은 Paging 마찬가지로 external fragment 발생한다.

 

- Linked Allocation.

Figure 14.5 Li n ked allocation of disk space.

방법의 단점은 영상 시청을 예로 있다. 동영상을 뛰어넘어 본다면 계속해서 Linked list 하나씩 탐색하면서 지나가야 한다.

 

- FAT

방법은 Linked list 쓰는데 조금 효율적으로 쓰기 위해 고안된 기술이다.

Linked list index 넣어서 사용한다.

Figure 14.6 File Alloc a tion Table.

- Indexed Allocation

FTA 문제에는 포함되지 않는다. 일반적으로 Linked list 할당되었다는 가정에,

Bad sector 발생한다면 다음 List 찾아 없게 된다. 이를 방지하기 위해 블락에 모든 인덱스를 저장한다.

Figure 14.7 Indexed allocation of disk space.

'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