본문 바로가기
Embeded Development

Polling, Interrupt, DMA 방식

by VehicleMaster 2023. 12. 27.
반응형
SMALL

POLLING / INTERRUPT / DMA

 

POLLING Polling, or polled operation, in computer science, refers to actively sampling the status of an external device by a client program as a synchronous activity. Polling is most often used in terms of input/output (I/O), and is also referred to as polled I/O or software-driven I/O. [Wikipedia]

 

→ Processor와 연결된 주변장치를 주기적으로 감시 하는 방식 Task 방식에서 폴링방식으로 여러 장치를 확인할 경우 메인 일을 못하고 부하가 발생할수도 있음

 

ex) 벽돌을 쌓고있는데 정해진 시간의 주기로 어딘가에 전화를 검 (확인) 벽돌일외에 시멘트 바르고 공구리 치고 여러 상황이 겹칠때 일을 빠르게 해야하는데 빠쁜 와중에 전화를 검 (확인)

 

INTERRUPT Hardware interrupts are used by devices to communicate that they require attention from the operating system. Internally, hardware interrupts are implemented using electronic alerting signals that are sent to the processor from an external device, which is either a part of the computer itself, such as a disk controller, or an external peripheral. [Wikipedia]

 

→ Processor에서 메인일을 열심히 하고있을때 주변중치에서 이벤트적으로 무슨일이 일어날때 확인 하는 방식

 

ex) 벽돌을 쌓고있으면서 시멘트 바르고 공구리 치고 평소에 일처리를 거의다 해놓고 전화가 올때 여유롭게 받음 (이벤트)

 

DMA (Direct Memory Access) Direct memory access (DMA) is a feature of computer systems that allows certain hardware subsystems to access main system memory (RAM) independently of the central processing unit (CPU). [Wikipedia]

 

→ processor에서 연결된 주변장치를 주기적으로 감시 하는 방식 (polling)과 같으나 메인 처리를 따로하고 DMA controller 기능으로 주기적으로 감시하는 일을 모아서 정리해서 보고하는 형식 (Interrupt)

 

ex) 벽돌을 쌓고있으면서 시멘트 바르고 공구리 치고 평소일을 하며 주변 기능을 활용해서 'hey bixby call' 동시 일처리

반응형

댓글