Basic CS-Operating System [TCS Placement]: Sample Questions 32 - 32 of 35

Get unlimited access to the best preparation resource for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 32

Operating System
Edit

Describe in Detail

Essay▾

Explain memory-mapped files

Explanation

  • Memory-mapped files (MMFs) allow contents of a file to be mapped to logical address of an application.
  • Enable processes running on the same machine to share data with each other.
  • The MemoryMappedFile. CreateFromFile () method is used to obtain a MemoryMappedFile object that represents a persisted memory-mapped file from a file on disk.
  • These files are included in the System. IO. MemoryMappedFiles namespace containing four classes and three enumerations for accessing and securing mappings.
  • There are two types of memory-mapped files:
    • Persisted memory-mapped files
      • Associated with a source file on a disk.
      • When the last process has finished working with the file, the data is saved to the source file on the disk.
      • Suitable for working with extremely large source files.
    • Non-persisted memory-mapped files
  • Not associated with a file on a disk.
  • When the last process has finished working with the file, the data is lost and the file is reclaimed by garbage collection.
  • Suitable for creating shared memory for inter-process communications (IPC) .
Given the Image is Define the Memory Mapped Files

Developed by: