hardware

Know how fast a Hard Drive is in Delphi

送分小仙女□ 提交于 2019-11-30 07:21:11
I am writing a diagnosis program (like everest, but simpler) and I need to know how fast a HardDrive is. I wanna know things such as: 1 - Bytes per second (read) 2 - Bytes per second (write) 3 - S.M.A.R.T data I guess I can use WMI to query such thing, but i have no idea how. It does not matter if I need to buy a component or get a opensource one. I also know that Windows Perfmoon is able to do that, but I cannot use it. Rafael to obtain the S.M.A.R.T data you can use the WMI or the Windows API. using the WMI the WMI classes to obtain S.M.A.R.T data are MSStorageDriver_ATAPISmartData

Do I need to write my own host side USB driver for a CDC device

こ雲淡風輕ζ 提交于 2019-11-30 07:20:16
This may not be considered to be directly programming related but I am at a loss to know where else to ask. I have tried looking at a variety of websites but so far Google has not been my friend. I am having trouble finding out whether I need to write my own device driver for the various windows/linux/mac platforms that the device I am developing may be connected to, or whether the functionality is provided by the standard drivers. My device is a USB CDC (communications device) that appears as a COM: port. It also includes a battery charger that will, once the device has been enumerated

True (not pseudo) random number generators. What's out there? [closed]

淺唱寂寞╮ 提交于 2019-11-30 07:08:04
I am looking for affordable solutions that generate true random numbers. I have found LavaRnd , which is a cryptographically sound random number generator. Does anybody has experience in this field and/or knows about other solutions? PS: IMHO the SO question True random number generator did not really cover this EDIT : My curiosity is more of academic nature. I don't want to know about PRNGs that are good enough for practical applications. I know they exist and that they will do. Of course, generating true random numbers will require hardware devices. That's why I tagged this with hardware .

How much time does it take to fetch one word from memory?

烈酒焚心 提交于 2019-11-30 06:58:52
Taking Peter Norvig's advice , I am pondering on the question: How much time does it take to fetch one word from memory, with and without a cache miss? (Assume standard hardware and architecture. To simplify calculations assume 1Ghz clock) Seems like Norvig answers this himself : execute typical instruction 1/1,000,000,000 sec = 1 nanosec fetch from L1 cache memory 0.5 nanosec branch misprediction 5 nanosec fetch from L2 cache memory 7 nanosec Mutex lock/unlock 25 nanosec fetch from main memory 100 nanosec send 2K bytes over 1Gbps network 20,000 nanosec read 1MB sequentially from memory 250

Android - turn off hardware key lights

◇◆丶佛笑我妖孽 提交于 2019-11-30 06:49:13
问题 Inside my app, I need a way to turn off the lights on the standard Android phone keys (Home, Menu, Back, and Search) - how can I do this programmatically? 回答1: According to this page, the hardware key backlights can be controlled by writing to a specific file in the filesystem with superuser privileges (i.e. phone must be "rooted"): Q: How can I control the keyboard backlight? A: The keyboard backlight can be controlled via /sys/class/leds/keyboard-backlight/brightness. It appears that it's a

Do multi-core CPUs share the MMU and page tables?

偶尔善良 提交于 2019-11-30 06:30:05
问题 On a single core computer, one thread is executing at a time. On each context switch the scheduler checks if the new thread to schedule is in the same process than the previous one. If so, nothing needs to be done regarding the MMU (pages table). In the other case, the pages table needs to be updated with the new process pages table. I am wondering how things happen on a multi-core computer. I guess there is a dedicated MMU on each core, and if two threads of the same process are running

Is the Intel Xeon Phi usable without a costly Intel Compiler?

≯℡__Kan透↙ 提交于 2019-11-30 06:29:26
Does the Intel Xeon Phi coprocessor , to be usable as parallel platform, require a license of the Intel Composer XE compiler, or are there alternative compilers? There are a few options I can list here to use/get the Intel compiler...gcc, as you know, is not equipped to vectorize code for this platform. There is a non-commercial license of the Intel compiler for Linux* that provides the same Intel Xeon Phi coprocessor enabled Intel Development tools as a commercial/eval/academic license assuming the requesting individual fulfills the licensing requirements. http://software.intel.com/en-us/non

Best way to generate a machine fingerprint?

放肆的年华 提交于 2019-11-30 05:38:23
问题 I need to generate a unique string that will differ from machine to machine -- a "device fingerprint". What are... possible approaches for custom implementations? (I've got a few ideas, but I figure you guys probably have BETTER ones) existing solutions? (both commercial / non commercial are acceptable) 回答1: Device fingerprinting is a complex topic if you want to cover the many edge cases (e.g. hardware upgrades, OS upgrades, etc.) and if you are worried about people expending energy to

Understanding word alignment

让人想犯罪 __ 提交于 2019-11-30 05:02:36
I understand what it means to access memory such that it is aligned but I don’t understand why this is necessary. For instance, why can I access a single byte from an address 0x…1 but I cannot access a half word (two bytes) from the same address. Again, I understand that if you have an address A and an object of size s that the access is aligned if A mod s = 0 . But I just don’t understand why this is important at the hardware level. Hardware is complex; this is a simplified explanation. A typical modern computer might have a 32-bit data bus. This means that any fetch that the CPU needs to do

Piracy protection using USB based hardware solution

心已入冬 提交于 2019-11-30 04:49:27
问题 i want to protect my Java product by using some USB-based authentication and password management solution like you can buy it here: aladdin This mean that you have to connect a USB stick with a special software on it, before you can start your application. I would like to here some experience of users which have used hardware like this. Is this as safe as it sounds? General: How much money you would spend to protect a software which would sell 100 times? I will obfuscate my Java code and save