Giter Site home page Giter Site logo

os_homwork's Introduction

bob_os

/------------------------------------------------------------------------ 7월 21일 메모리 맵 입출력(Memory-mapped I/O, MMIO)은 CPU가 입출력 장치에 접근할 때, 입출력과 메모리의 주소 공간을 분리하지 않고 하나의 메모리 공간에 취급하여 배치(mapping)하는 방식이다. 하나의 프로세스가 메모리 맵 입출력을 수행한다는 것은 곧 해당 프로세스 앞으로 입출력 작업 수행에 필요한 메모리 공간이 할당되어야 함을 의미한다. 때문에 메모리 맵 입출력을 수행할 때의 그 크기는 프로세스에게 허락되는 메모리 공간의 최대 크기에 영향을 받는다. 64bit 윈도우 운영체제 환경의 메모리 영역에서 하나의 프로세스에게 허락된 유저 영역의 크기는 최대 4Gbyte이다. 그러니 해당 환경에서 MMIO를 수행하는 데에 허락된 메모리의 최대 크기는 4Gbyte를 넘지 못한다. 예를 들어 MMIO를 통해 어떤 파일을 복사하고자 할 때 그 파일의 크기가 4GByte의 대용량인 경우 이를 한 번에 수행한다면 오류가 발생한다. 그 이유는 파일의 복사를 위해 파일의 크기인 4GByte 만큼의 메모리 공간이 프로세스에게 할당되어야 하는데, 운영체제는 이를 허락하지 않기 때문이다. 그러니 이러한 작업은 분할하여 반복 작업을 수행해야 한다. 또한 메모리 맵 입출력을 하는 데에 있어 필요한 함수들은 공통적으로 메모리 매핑을 위한 Offset 값을 요구한다. 4Gbyte 이상 크기를 갖는 파일의 경우, 함수에 전달할 Offset 값을 위해 파일 내 4기가를 넘는 높은 주소를 표현하고자 할 때 32bit 크기의 정수 자료형으로는 표현이 불가능하다. 그러니 LARGE_INTEGER와 같은 64bit를 표현하는 데에 필요한 공용체를 이용하여야 한다. --------------------------------------------------------------------------------------------------------/

os_homwork's People

Contributors

hamtorihacker avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.