FAQ Database Discussion Community

NodeJS: understanding nonblocking / event queue / single thread

I'm new to Node and try to understand the non-blocking nature of node. In the image below I've created a high level diagram of the request. As I understand, all processes from a single user for a single app run on a single thread. What I would like to understand...

How to create Custom Paperclip Processor to retrive image dimensions Rails 4

I want to retrieved image upload dimensions before create as I attach the file. I got this via Extracting Image dimensions through model. But I want to dispatch through custom processor. What I tried is: Player.rb class Player < ActiveRecord::Base has_attached_file :avatar, processors: [:custom], :style => {:original => {}} .......

Is the processorid per core?

Can a processor whether a dual core or i3 or i5 or i7 have a processor id equals to number of core processor or number of logical processor? I am using win32_processor to get processorid. It returs a processorid but i am in stuck that whether it returns multiple processorid...

Processor Multi-threading

If a program or application does not contain any threads; does the operating system automatically divide the job/process into multiple threads? Example: if an application performs a simple task of completing random calculations and this specific application does not explicitly create its own threads to perform this calculation. Will the...

Error trying to read the IVT in windows 7 64 bits

I want to read the IVT in windows 7, 64 bits, I am not sure if it is possible, I have a code that is in the Rootkit Arsenal, which is the next one: int main(int argc, char** argv) { unsigned short csAddr; unsigned short ipAddr; short address; unsigned short...

Processor usage when using byte and short data types in Java

I read the following in Starting out with Java. from control structures through data structures - 3rd edition by Tony Gaddis on page 67: When values of the byte or short data types are used in arithmetic expressions, they are temporarily converted to int values. This is referring to Java....

Simulating 32 bit processor register - Compiler enough or 32 bit OS required?

I have an assignment to make some assembly code that I am supposed to run on a intel processor with a 32 bit register. The problem is that I don't have a 32 bit processor. My question: I am wondering if compiling as 32-bit application with -m32 in gcc is...

Is there any way to set processor affinity of a powershell script before execution?

There are lots of examples showing the use of Get-Process myprocess to change the processor affinity, and some examples using Get-WMIObject; but these won't work for my use. I want to set processor affinity of my script as it executes. Is there a way to declare processor affinity when calling...

Does it make sense to optimize data hazards if a processor supports out-of-order execution?

Is there still a possibility for programmers to optimize data hazards for processors that support full out-of-order executionn?

How many words can be in the address space?

Here is the problem I am working on The Problem: A high speed workstation has 64 bit words and 64 bit addresses with address resolution at the byte level. How many words can in be in the address space of the workstation? I defined the different terms in the problem...

What is the better number of threads running simultaneous for specific processor?

I have a computer with an 8-core processor, and I have a doubt about what's the max number of threads (software, don't thread of processor.) that my computer needs to use the max potencial of your 8-core. I'm creating 160 threads simultaneous, so each core of my processor will process...

Are cache-line-ping-pong and false sharing the same?

For my bachelor thesis I have to evaluate common problems on multicore systems. In some books I have read about false sharing and in other books about cache-line-ping-pong. The specific problems sound very familiar, so are these the same problems but given other names? Can someone give me names of...