49
Listing 3-6. Locating persistent memory on Windows
PS C:\Users\Administrator> Get-PmemDisk
Number Size Health Atomicity Removable Physical device IDs Unsafe shutdowns
------ ---- ------ --------- --------- ------------------- ---------------2
249 GB Healthy None
True
{1}
36
PS C:\Users\Administrator> Get-Disk 2 | Get-Partition
PartitionNumber DriveLetter Offset Size
Type
---1
24576
15.98 MB
Reserved
2
D
16777216 248.98 GB
Basic
Managing persistent memory as files has several benefits:
• You can leverage the rich features of leading file systems for
organizing, managing, naming, and limiting access for user’s
persistent memory files and directories.
• You can apply the familiar file system permissions and access rights
management for protecting data stored in persistent memory and for
sharing persistent memory between multiple users.
• System administrators can use existing backup tools that rely on file
system revision-history tracking.
• You can build on existing memory mapping APIs as described earlier
and applications that currently use memory-mapped files and can
use direct persistent memory without modifications.
Once a file backed by persistent memory is created and opened, an application still
calls mmap() or MapViewOfFile() to get a pointer to the persistent media. The difference,
shown in Figure 3-5, is that the persistent memory-aware file system recognizes that
the file is on persistent memory and programs the memory management unit (MMU)
in the CPU to map the persistent memory directly into the application’s address space.
Neither a copy in kernel memory nor synchronizing to storage through I/O operations
is required. The application can use the pointer returned by mmap() or MapViewOfFile()
to operate on its data in place directly in the persistent memory. Since no kernel I/O
Chapter 3 Operating SyStem SuppOrt fOr perSiStent memOry
Listing 3-6. Locating persistent memory on Windows
PS C:\Users\Administrator> Get-PmemDisk
Number Size Health Atomicity Removable Physical device IDs Unsafe shutdowns
------ ---- ------ --------- --------- ------------------- ---------------2
249 GB Healthy None
True
{1}
36
PS C:\Users\Administrator> Get-Disk 2 | Get-Partition
PartitionNumber DriveLetter Offset Size
Type
---1
24576
15.98 MB
Reserved
2
D
16777216 248.98 GB
Basic
Managing persistent memory as files has several benefits:
• You can leverage the rich features of leading file systems for
organizing, managing, naming, and limiting access for user’s
persistent memory files and directories.
• You can apply the familiar file system permissions and access rights
management for protecting data stored in persistent memory and for
sharing persistent memory between multiple users.
• System administrators can use existing backup tools that rely on file
system revision-history tracking.
• You can build on existing memory mapping APIs as described earlier
and applications that currently use memory-mapped files and can
use direct persistent memory without modifications.
Once a file backed by persistent memory is created and opened, an application still
calls mmap() or MapViewOfFile() to get a pointer to the persistent media. The difference,
shown in Figure 3-5, is that the persistent memory-aware file system recognizes that
the file is on persistent memory and programs the memory management unit (MMU)
in the CPU to map the persistent memory directly into the application’s address space.
Neither a copy in kernel memory nor synchronizing to storage through I/O operations
is required. The application can use the pointer returned by mmap() or MapViewOfFile()
to operate on its data in place directly in the persistent memory. Since no kernel I/O
Chapter 3 Operating SyStem SuppOrt fOr perSiStent memOry
