কম্পিউটার

উইন্ডোজ স্যান্ডবক্স ব্যবহার করে কীভাবে নিরাপদে সিপিইউ সময় দান করবেন

এই পৃথিবীতে, কম্পিউটিং শক্তি অলৌকিক ঘটনা ঘটায়। কম্পিউটিং শক্তি আমাদের চারপাশে আবর্তিত সমস্যা সমাধানে একটি প্রধান ভূমিকা পালন করতে পারে। এটি একটি কারণ, সমগ্র প্রযুক্তি শিল্প (মাইক্রোসফ্ট সহ) কোয়ান্টাম কম্পিউটিং-এ বিনিয়োগ করা হয়েছে যা এই সমস্যাগুলি সমাধান করার জন্য একটি কম্পিউটারকে আরও দক্ষ করে তুলতে সাহায্য করবে। ফোল্ডিং হোম একটি বিতরণ করা কম্পিউটিং প্রকল্প যা প্রোটিন গতিবিদ্যার আণবিক গতিবিদ্যা সিমুলেশন সম্পাদন করে।

মাইক্রোসফ্ট একটি বিস্তারিত নির্দেশিকা পোস্ট করেছে যার দ্বারা যে কেউ তাদের কম্পিউটারের সংস্থানগুলি প্রকল্পে দান করতে পারে। Windows Sandbox-এর সাথে কিভাবে নিরাপদে CPU সময় দান করা যায় সে সম্পর্কে আমরা কথা বলব এই নির্দেশিকাতে৷

উইন্ডোজ স্যান্ডবক্স ব্যবহার করে কীভাবে নিরাপদে সিপিইউ সময় দান করবেন

উইন্ডোজ স্যান্ডবক্স ব্যবহার করে নিরাপদে CPU সময় দান করুন

আপনি শুরু করার আগে, আপনাকে নিশ্চিত করতে হবে যে আপনার কম্পিউটারে Windows স্যান্ডবক্স সক্ষম আছে৷

এখন, নোটপ্যাড খুলুন এবং এতে নিম্নলিখিত কোডটি অনুলিপি করুন এবং পেস্ট করুন:

#Requires -RunAsAdministrator

#For a custom username, add -username <your username> to the command execution
param([string]$username=‘wsandbox_anon‘)
$ProgressPreference = ‘SilentlyContinue‘ #Progress bar makes things way slower

# Ensure that virtualization is enabled in BIOS.
Write-Output ‘Verifying that virtualization is enabled in BIOS…‘
if ((Get-WmiObject Win32_ComputerSystem).HypervisorPresent -eq $false) {
Write-Output ‘ERROR: Please Enable Virtualization capabilities in your BIOS settings…‘
exit
}

# Determine if Windows Sandbox is enabled.
Write-Output ‘Checking to see if Windows Sandbox is installed…‘
If ((Get-WindowsOptionalFeature –FeatureName ‘Containers-DisposableClientVM‘ –Online).State -ne ‘Enabled‘) {
Write-Output ‘Windows Sandbox is not installed, attempting to install it (may require reboot)…‘
if ((Enable-WindowsOptionalFeature –FeatureName ‘Containers-DisposableClientVM‘ –All –Online –NoRestart).RestartNeeded) {
Write-Output ‘Please reboot to finish installing Windows Sandbox, then re-run this script…‘
exit
}
} else {
Write-Output ‘Windows Sandbox already installed.‘
}

# Download the latest version of FAH.
Write-Output ‘Checking for latest version of foldingathome…‘
$installer_url = ‘https://download.foldingathome.org/releases/public/release/fah-installer/windows-10-32bit/‘

# Use regex to get the latest version from the FAH website.
$version = ((Invoke-WebRequest –Uri $installer_url –UseBasicParsing).Links | Where-Object {$_.href -match ‘^v\d+([.]\d+)?‘} | ForEach-Object {[float]($_.href -replace ‘[^.\d]‘, ‘‘)} | Measure-Object –Max).Maximum
$installer = “$($installer_url)v$($version)/latest.exe“
$installer_size =(Invoke-WebRequest $installer –Method Head –UseBasicParsing).Headers.‘Content-Length‘
Write-Output “Using FAH v$version.“

# Check if the installer is present, download otherwise.
$working_dir = “$env:USERPROFILE\fah_conf“
$install_fname = ‘folding_installer.exe‘
If (!(test-path “$working_dir\$install_fname“) -or (Get-ChildItem “$working_dir\$install_fname“).Length -ne $installer_size ) {
Remove-Item “$working_dir\$install_fname“ –Force –ErrorAction SilentlyContinue
Write-Output “Downloading latest folding executable: $working_dir\$install_fname“
Write-Output “Saving to $working_dir\$install_fname…“
New-Item –ItemType Directory –Force –Path $working_dir | Out-Null
Invoke-WebRequest –Uri $installer –OutFile “$working_dir\$install_fname“
}

# Create the FAH configuration file with the Windows Sandbox FAH team #251561.
Write-Output ‘Creating init command…‘
$conf_file = ‘fah_sandbox_conf.xml‘
Write-Output “Saved [email protected] configuration file to $working_dir\$conf_file“
New-Item –Force –Path “$working_dir\$conf_file“ –ItemType File
Set-Content –Path “$working_dir\$conf_file“ –Value @”
<config>
<user v=’$username‘/>
<team v=’251561’/>
<core-priority v=’low’/>
<power v=’full’ />
<priority v=’realtime’/>
<smp v=’true’/>
<gpu v=’true’/>
<open-web-control v=’true’/>
</config>
“@

<#
Create the script that runs at logon. This script:
1. Starts the installer
2. Creates a volatile working directory
3. Copies the config into the working directory
4. Sets the firewall policies to let FAH run
5. Starts the FAH client
#>
Write-Output ‘Creating init command…‘
$logon_cmd = “$working_dir\init.cmd“
$wdg_install_dir = ‘C:\users\wdagutilityaccount\desktop\fah_conf‘
$wdg_working_dir = ‘C:\users\wdagutilityaccount\desktop\fah_working_dir‘
Write-Output “Saved logon script to $logon_cmd, this will be run upon starting Sandbox.“
New-Item –Force –Path $logon_cmd –ItemType File
Set-Content –Path $logon_cmd –Value @”
start $wdg_install_dir\$install_fname /S
goto WAITLOOP

:WAITLOOP
if exist “C:\Program Files (x86)\FAHClient\FAHClient.exe” goto INSTALLCOMPLETE
ping -n 6 127.0.0.1 > nul
goto WAITLOOP

:INSTALLCOMPLETE
mkdir $wdg_working_dir
cd $wdg_working_dir
echo \”Copying config file to $wdg_working_dir\”
copy $wdg_install_dir\$conf_file $wdg_working_dir
netsh advfirewall firewall Add rule name=”FAHClient” program=”C:\Program Files (x86)\FAHClient\FAHClient.exe” action=allow dir=out
netsh advfirewall firewall Add rule name=”FAHClient” program=”C:\Program Files (x86)\FAHClient\FAHClient.exe” action=allow dir=in
start C:\”Program Files (x86)”\FAHClient\FAHClient.exe –config $wdg_working_dir\$conf_file
“@

# Create the Sandbox configuration file with the new working dir & LogonCommand.
$sandbox_conf = “$working_dir\fah_sandbox.wsb“
Write-Output “Creating sandbox configuration file to $sandbox_conf“
New-Item –Force –Path $sandbox_conf –ItemType File
Set-Content –Path $sandbox_conf –Value @”
<Configuration>
<VGpu>Enable</VGpu>
<MappedFolders>
<MappedFolder>
<HostFolder>$working_dir</HostFolder>
<ReadOnly>true</ReadOnly>
</MappedFolder>
</MappedFolders>
<LogonCommand>
<Command>$wdg_install_dir\init.cmd</Command>
</LogonCommand>
</Configuration>
“@

# For convenience, start the Sandbox.
Write-Output ‘Starting sandbox…‘
Start-Process ‘C:\WINDOWS\system32\WindowsSandbox.exe‘ –ArgumentList $sandbox_conf

বিকল্পভাবে, আপনি Microsoft-এর GitHub সংগ্রহস্থল থেকে এটি ডাউনলোড করতে পারেন।

উইন্ডোজ স্যান্ডবক্স ব্যবহার করে কীভাবে নিরাপদে সিপিইউ সময় দান করবেন

একবার হয়ে গেলে, এটি শুধুমাত্র Windows PowerShell দিয়ে চালান এবং এটি একটি Windows স্যান্ডবক্স পরিবেশ শুরু করবে যা বিতরণকৃত কম্পিউটিং প্রকল্পে আপনার কম্পিউটারের সংস্থানগুলি দান করবে৷

অল দ্য বেস্ট!

উইন্ডোজ স্যান্ডবক্স ব্যবহার করে কীভাবে নিরাপদে সিপিইউ সময় দান করবেন
  1. Windows 10 এ PowerShell ব্যবহার করে কিভাবে একটি ফাইল ডাউনলোড করবেন

  2. Windows 8.1 এ 100% CPU ব্যবহার করে Svchost.exe কিভাবে বন্ধ করবেন

  3. Windows 8.1 এ 100% CPU ব্যবহার করে Svchost.exe কিভাবে বন্ধ করবেন

  4. উইন্ডোজ 11 এ কীভাবে সময় সিঙ্ক করবেন