cpu

How many SHA256 hashes can a modern computer compute?

女生的网名这么多〃 提交于 2019-12-05 11:25:17
问题 I want to know the mathematical time required for cracking hashes based off different sets of characters. For example, using only 7 letter, US-ASCII alphabetic characters we know that there are 26 7 possible sequences that could be used. Knowing how many of these could be generated by a computer each minute would give me an idea of how long it would take to generate all possible hashes and crack a certain 7 character hash ( birthday attacks aside ). For example, taking the number above, if a

Why do cancelled Clojure futures continue using CPU?

倖福魔咒の 提交于 2019-12-05 10:25:31
问题 I have many examples of Java bytecode, all of which I'd like to execute from Clojure. Each sequence of bytecode may contain an infinite loop, in which case I'd like to stop running it after a couple of seconds. I've been looking at futures as a means of doing this. Having hunted around for a couple of implementations I've tried both this code: (deref (future (loop[a 1] (recur a)) :done!) 1000 :impatient!) ...and also the code at https://gist.github.com/3124000 In both cases, the loop appears

c# STILL returning wrong number of cores

邮差的信 提交于 2019-12-05 09:01:07
Ok, so I posted in In C# GetEnvironmentVariable("NUMBER_OF_PROCESSORS") returns the wrong number asking about how to get the correct number of cores in C#. Some helpful people directed me to a couple of questions where similar questions were asked but I have already tried those solutions. My question was then closed as being the same as another question, which is true, it is, but the solution given there didn't work. So I'm opening another one hoping that someone may be able to help realising that the other solutions DID NOT work. That question was How to find the Number of CPU Cores via .NET

How to achieve 100% cpu load with c# code [duplicate]

若如初见. 提交于 2019-12-05 07:03:44
问题 This question already has answers here : thread get 100% CPU very fast (5 answers) Closed last year . I have a task to get a piece of c# code to make my CPU go 100% consistently. I have tried infinite loops, big integer calculations, concatenation of numerous very long strings.... everything either goes to 100% for a few moments and then down to like 60% or doesn't go to 100% at all. Is there a simple piece of code that can achieve this? Also using Windows 10 回答1: You would want to implement

cpu_get_usage in php?

﹥>﹥吖頭↗ 提交于 2019-12-05 06:12:14
I have created a benchmark class that allows the user to insert for example $timer->checkpoint('1'); to check out some code for time,memory consumption and such.... and at the end of the code if she/he wants to test it she/he has to insert $result=$timer->result(); this gives out some data to public function result() like e.g. memory usage (using memory_get_peak_usage) and time consumption (microtime()). This all works just fine for me. But how can I use the combination of existing built-in php functions to get a value that can be considered a CPU consumption ? It has been quite easy to

many-core CPU's: Programming techniques to avoid disappointing scalability

醉酒当歌 提交于 2019-12-05 05:35:51
We've just bought a 32-core Opteron machine, and the speedups we get are a little disappointing: beyond about 24 threads we see no speedup at all (actually gets slower overall) and after about 6 threads it becomes significantly sub-linear. Our application is very thread-friendly: our job breaks down into about 170,000 little tasks which can each be executed separately, each taking 5-10 seconds. They all read from the same memory-mapped file of size about 4Gb. They make occasional writes to it, but it might be 10,000 reads to each write - we just write a little bit of data at the end of each of

RenderScript speedup 10x when forcing default CPU implementation

霸气de小男生 提交于 2019-12-05 04:27:11
问题 I have implemented a CNN in RenderScript, described in a previous question which spawned this one. Basically, when running adb shell setprop debug.rs.default-CPU-driver 1 there is a 10x speedup on both Nvidia Shield and Nexus 7. The average computation time goes from around 50ms to 5ms, the test app goes from around 50fps to 130 or more. There are two convolution algorithms: (1) moving kernel (2) im2col and GEMM from RenderScriptIntrinsicsBLAS. Both experience similar speedup. The question is

How do I find my CPU topology?

流过昼夜 提交于 2019-12-05 03:45:23
I am using Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz as I found out from cat /proc/cpuinfo . But I want to know exact hierarchy like how many sockets are there, and how many cores are there per socket and threads too, if supported. Any idea? you can use command lscpu this will give information for processor related info dmidecode -t processor Sebastian Kuzminsky lstopo from the hwloc package reports the info you want: Socket L#0 + L3 L#0 (6144KB) L2 L#0 (256KB) + L1 L#0 (32KB) + Core L#0 PU L#0 (P#0) PU L#1 (P#1) L2 L#1 (256KB) + L1 L#1 (32KB) + Core L#1 PU L#2 (P#2) PU L#3 (P#3) L2 L#2 (256KB)

How to monitor resources during slurm job?

南笙酒味 提交于 2019-12-05 01:31:45
问题 I'm running jobs on our university cluster (regular user, no admin rights), which uses the SLURM scheduling system and I'm interested in plotting the CPU and memory usage over time, i.e while the job is running. I know about sacct and sstat and I was thinking to include these commands in my submission script, e.g. something in the line of #!/bin/bash #SBATCH <options> # Running the actual job in background srun my_program input.in output.out & # While loop that records resources JobStatus="$

Why do we need to compile for different platforms (e.g. Windows/Linux)?

我的未来我决定 提交于 2019-12-05 01:13:16
问题 I've learned the basics about CPUs/ASM/C and don't understand why we need to compile C code differently for different OS targets. What the compiler does is create Assembler code that then gets assembled to binary machine code. The ASM code of course is different per CPU architecture (e.g. ARM) as the instruction set architecture is different. But as Linux and Windows run on the same CPU, the machine operations like MOVE/ADD/... should be identical. While I do know that there are OS-specific