hard-drive

NASM: how to access ssd drive correctly?

。_饼干妹妹 提交于 2019-12-23 04:49:06
问题 I need to access SSD drive with NASM 16-bit code. When accessing regular hard drive, need to set registers AX, DX, CX to choose Cylinder/Track/Sector/Number of sectors ( AH - to choose read sector function, DL - to choose drive number, CH - to choose cylinder, DH - to choose side on disk, CL - to choose sector on track, AL - to choose number of sectors). However, I suppose SSD disk has some other structure, so how to access them correctly? 回答1: Assuming translation of fake geometry into LBA

Is it possible to get special Local Disk information from PHP?

前提是你 提交于 2019-12-22 13:30:55
问题 I am running my PHP code on my local computer,So ,I just want to know the PHP has any functions to get the local hard disk information.Such as the disk name , disk space,free space available .etc. Thank you very much!! 回答1: In addition, yes, it is possible to retrieve this information, because you can execute commands. There are a few PHP functions to retrieve information about the disk as well, check out the following links: disk_total_space( $directory ); disk_free_space( $directory );

Calculating hard drive throughput

泄露秘密 提交于 2019-12-22 10:25:35
问题 My app creates a 2GB file and needs to select the fastest drive on the system with enough space. I am trying to calculate throughput by creating the file, setting the length, then writing data to it sequentially as follows: FileInfo file = null; var drives = DriveInfo.GetDrives(); var stats = new List<DriveInfoStatistics>(); foreach (var drive in drives) { do { file = new FileInfo(Path.Combine(drive.RootDirectory.FullName, Guid.NewGuid().ToString("D") + ".tmp")); } while (file.Exists); try {

Accessing hard disk

帅比萌擦擦* 提交于 2019-12-21 06:27:08
问题 How does the CPU manage to address the distant memory locations on a several hundred giga bytes of hard disk with registers and data bus of 32 bits only. 回答1: RAM is directly mapped into the processor's address/data bus. Hard drives are not. They interface to a disk controller (IDE, SATA, SCSI, etc). The disk controller copies data to/from RAM in smaller blocks where the CPU works with it. There are various addressing schemes for Hard-disks as well, such as LBA, CHS etc, which themselves run

Howto get hardware information in Linux using C++

守給你的承諾、 提交于 2019-12-21 04:12:23
问题 I need to get specifications of hard disk on both Win and *nix machines. I used <hdreg.h> on Linux like this: static struct hd_driveid hd; int device; if ((device = open("/dev/sda", O_RDONLY | O_NONBLOCK)) < 0) { cerr << "ERROR: Cannot open device /dev/sda \n"; exit(1); } if (!ioctl(device, HDIO_GET_IDENTITY, &hd)) { cout << hd.model << endl; cout << hd.serial_no << endl; cout << hd.heads << endl; } I need hd_driveid to tell me some more information about disk. I want to know: Number of

How many threads for reading and writing to the hard disk?

帅比萌擦擦* 提交于 2019-12-21 04:11:13
问题 i am developing an application that gathers a list with all the files of the hard drive and also afterwards it does write files to the hard drive. I want to ask : what is the optimum number of concurrent threads that will do this task ? I mean how many threads should i have that read the hard drive without making the hard drive to get slow because so many threads are reading it concurrently. Thank you ! 回答1: At first, I say one! It actually depends whether the data to read need complex

Get hard disk size in Python

放肆的年华 提交于 2019-12-20 09:54:13
问题 I am trying to get the hard drive size and free space using Python (I am using Python 2.7 with macOS). I am trying with os.statvfs('/') , especially with the following code. Is it correct what I am doing? Which definition of the variable giga shall I use? import os def get_machine_storage(): result=os.statvfs('/') block_size=result.f_frsize total_blocks=result.f_blocks free_blocks=result.f_bfree # giga=1024*1024*1024 giga=1000*1000*1000 total_size=total_blocks*block_size/giga free_size=free

Hard disk id of SATA drives

孤街浪徒 提交于 2019-12-20 06:39:31
问题 I am using Hard disk ID for my software to check if the authentic user is using the software. For IDE type hard disk i get the id using the procedure GetIdeSerialNumber. but in case of SATA drives it gives the id as blank. Then in case of SATA drives i am using volume id as unique id. but volume id will change when system is formatted Now I want to know which hard drive i am using ,and how to get the hard disk id of SATA drive in delphi 7 ? EDIT: the software according to client

How do I use C# to get the Hard-disk serial number?

走远了吗. 提交于 2019-12-18 11:57:49
问题 How do i get the hard disk serial number without using dll and supported by VISTA 回答1: using System.Management; public string GetHDDSerial() { ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_PhysicalMedia"); foreach (ManagementObject wmi_HD in searcher.Get()) { // get the hardware serial no. if (wmi_HD["SerialNumber"] != null) return wmi_HD["SerialNumber"].ToString(); } return string.Empty; } 回答2: here is the code that work's for me :

using c# how can I extract information about the hard drives present on the local machine

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-18 05:06:12
问题 I'm looking to get data such as Size/Capacity, Serial No, Model No, Heads Sectors, Manufacturer and possibly SMART data. 回答1: You can use WMI Calls to access info about the hard disks. //Requires using System.Management; & System.Management.dll Reference ManagementObject disk = new ManagementObject("win32_logicaldisk.deviceid=\"c:\""); disk.Get(); Console.WriteLine("Logical Disk Size = " + disk["Size"] + " bytes"); Console.WriteLine("Logical Disk FreeSpace = " + disk["FreeSpace"] + "bytes");