Write-protection mechanisms