Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [hardware]

Computer hardware is the collection of physical elements that comprise a computer system.

1
vote
3answers
206 views

Why do disks write data in chunks of page size?

In my understanding, even if i want to overwrite a byte in middle of a file, OS and/or disk will read the content of the size of page, modify one byte and then write the contents back. What is the ...
3
votes
1answer
66 views

Architecture for Large-Scale Matrix Multiplication: Distributed Architecture or One Strong Server

I've asked a question about Scaling Matrix Multiplication by CPU Cores on StackOverflow and it seems that merely adding more CPU cores to this problem won't reduce the time to do Matrix ...
3
votes
1answer
197 views

Are design principles of functional programming languages and current hardware (register-machines) contrary?

Functional languages seek to minimize accidental state (computationally-convenient but logically unnecessary data dependencies) by endorsing the most granularly modular, mathematically unambiguous ...
5
votes
2answers
210 views

Is wrapping a hardware resource using polymorphism going too far?

I am writing a simulation engine consisting of a number of components, each of which operates on a fixed set of shared buffers. In practice, the simulation will run entirely on the GPU. When ...
3
votes
3answers
1k views

What does “address space” means when talking about IO devices?

The following quote is from this page: While some CPU manufacturers implement a single address space in their chips, others decided that peripheral devices are different from memory and, ...
4
votes
1answer
1k views

How does the Base Address Registers (BARs) in a PCI card work?

I am trying to understand how the Base Address Registers (BARs) in a PCI card work, this is how I think they work: Each function in a PCI card have 6 BAR fields, and each BAR field is 32-bit in size. ...
0
votes
2answers
115 views

Does the PCI bus only consists of the devices in the PCI slots? [closed]

I am learning about the PCI bus, and there is something that I am not sure of. A motherboard have some PCI slots to put the PCI cards in: Now when we say that we have a PCI bus, do we mean that the ...
-1
votes
1answer
141 views

Supply Dev Boxes For Team

All of our developers are remote in our company, including myself. The vast majority of our work centers around Laravel on a LAMP stack. We have various devs, some that are just for coding, some are ...
17
votes
3answers
5k views

Why does Mike Pound measure his computer's computational ability by its graphics cards, and not its processors?

I was recently watching a great Computerphile video on passwords in which Mike Pound brags of his company's supercomputer having 4 graphics cards (Titan X's, to be exact). As a numerical simulation ...
2
votes
1answer
141 views

What does “data bus control” mean?

This video mentions the following: What does it mean for the DMA controller to be granted the data bus control, does that mean the CPU cannot use the bus to access memory and IO devices until the DMA ...
0
votes
2answers
517 views

Can unsigned and signed (two's complement) multiplication be performed on the same hardware? [closed]

I know they can for addition and subtraction, but I'm not quite sure if they can for multiplication.
2
votes
2answers
137 views

How is it possible to have limitless availability of threads while only having a finite number of physical processing units?

So I'm having trouble understanding the relationship between threads (software) and processor cores (hardware). Basically my understanding of a processor core is a unit that deals with commands and ...
5
votes
2answers
274 views

OO software design for interfacing hardware

My question is: How can I maximize encapsulation for wrapper-classes that interface with hardware. The hardware is connected to a PC through COM-Ports or USB ports and I am either reading/writing to ...
1
vote
1answer
68 views

Quick wireless transmission

I'm looking for a way to send a signal between a raspberry pi and a smart phone. What I want to do is hash a few basic bits of information about the phone to use as a UUID. I then want to transmit ...
51
votes
3answers
21k views

How does a single thread run on multiple cores?

I am trying to understand, at a high-level, how single threads run across multiple cores. Below is my best understanding. I do not believe it is correct though. Based on my reading of Hyper-threading,...
1
vote
3answers
637 views

Can the CPU manipulate the pins of an IO port directly?

Based on what I know so far, when you plug an IO device into an IO port (for example, when you plug a printer into a parallel port), the printer will be represented to the CPU as just another RAM chip....
0
votes
1answer
2k views

How data is accessed in Memory-Mapped I/O?

This is an example of Memory-Mapped I/O: So basically you access the device controller registers through memory. Now my question is, when you for example write to the memory location that maps to ...
0
votes
1answer
101 views

Can an IO device have some memory space or can it only have registers?

I am learning about IO devices, and so far I have only seen examples of IO devices that have registers and no memory space. For example, this is a printer that have three registers and no memory space:...
4
votes
3answers
2k views

Are “Control register” and “Status register” and “Data register” part of the device itself?

I am studying about Memory-Mapped I/O from here. I have read the following: From the CPU's perspective, an I/O device appears as a set of special-purpose registers, of three general types: ...
0
votes
1answer
125 views

Can a driver running in kernel mode access a port directly?

Based on what I know so far, if I want to create a driver, and want the driver to send data on some port (for example: serial/parallel/USB), my driver will communicate with the port driver, and the ...
0
votes
3answers
808 views

Why do device drivers in Linux need to run in kernel mode?

Say I have a device that is connected to the computer through a USB port, and I created an application to communicate with this device. In this application I used the USB driver to communicate with ...
0
votes
2answers
827 views

Does a serial port have a device driver?

I am learning about device drivers, and based on what I know so far, if your application wants to communicate with some device, it cannot communicate directly with the port that your device is ...
5
votes
2answers
303 views

What role did hardware improvements have in the development of modern languages (eg Python / Java)?

I'd like to ask about the history of programming languages - specifically, the role of hardware in language development over the past 20-30 years. I have been reading about the history of Python, and ...
-1
votes
1answer
1k views

How to get machine client information from web application?

I am writing a ticket system in PHP(with Laravel) for about 350 users and around 200 machines. I know that already are good solid solutions available, but I'm doing some very useful projects to learn, ...
2
votes
4answers
266 views

Is it possible for a computer system to have constant/zero CPU load?

For example, a simple program in a simulated environment that waits for user input seems to be doing no work, so I guess it uses CPU only for the time. I'd like to know if computer systems (that don'...
2
votes
1answer
142 views

Large Scale Machine Learning vs Traditional HPC Hardware

I've spent the last few days working with tensorflow for the first time as part of a natural language processing assignment for my degree. It's been interesting (fun isn't the right word) trying to ...
6
votes
3answers
355 views

Why running threaded algorithms with exact number of cores the machine has, is faster than anything else?

I made some basic multi-threading tests here, and noticed that the speed increase when using the exact is bigger than I expected. I assumed that speed would increase linearly until I hit the limit of ...
90
votes
11answers
17k views

What is meant by the phrase “Software can replace hardware”?

Studying beginners course on hardware/software interface and operating systems, often come up the topic of if it would be better to replace some hardware parts with software and vice-versa. I can't ...
-3
votes
2answers
1k views

Reprogramming a commercial bluetooth headset

I am prototyping a bluetooth headset. Wondering whether it is possible to buy an existing bluetooth headset, connect it to a computer and reprogram it (i.e. change the behaviour of the buttons etc.). ...
1
vote
1answer
929 views

Are some operation system (kernels) more efficient with hardware than others?

When comparing the Windows, macOS, and Linux kernel to each other, do some make better use of hardware in terms of cache efficiently, page lookups, or power consumption? I noticed this after ...
-3
votes
2answers
201 views

Why not logical gates?

I have one simple question I don't understand: Why are transistors so widely used in microprocessors and complex in some manners(semiconductors, Fermi level, PN junction, etc.),while logical gates are ...
11
votes
6answers
785 views

Is power-of-two bits per word “convenient”? If it is, why is that?

I find several sources claiming that power-of-two bits in a binary word (such as 8-bits per byte) is a "good thing" or "convenient". I find no source pointing out why. From What is the history of ...
10
votes
2answers
4k views

How exactly does a program talk to a device driver?

So I'm confused on how exactly we as the programmers talk to devices on the computer. Now I'm not talking the big ideas. I know that there are device drivers that sit atop the hardware so that ...
49
votes
4answers
10k views

Is there a good reason to run 32-bit software instead of 64-bit on 64-bit machines?

Is there any good reason to supply a 32-bit version along with a 64-bit version of any software targeted at modern desktop machines, running modern 64-bit operating systems on 64-bit hardware? It ...
7
votes
5answers
4k views

How can Jeff Dean's “latency numbers every programmer should know” be accurate in the context of varying hardware implementations?

I'm referring this chart of latency numbers, attributed to Jeff Dean at Google. The thing I don't understand is, do these numbers not vary from one set of hardware to the next? How can these be ...
5
votes
4answers
3k views

Avoiding hangs when calling a native API

Background We have a piece of programmable hardware here at work that we integrate into almost all of our systems. This piece of hardware came with a native Windows DLL (for which we do not have the ...
2
votes
1answer
190 views

In a polled interface, is it okay for an object representing hardware to start a task responsible for the polling?

I am a hardware/test engineer currently writing a C# application for a device that does not have any event/interrupt mechanisms. Because of this I am forced to poll the device's internal control ...
2
votes
1answer
149 views

Hardware under MIT license?

I have some VHDL design that I plan to release as open source. I like MIT License for its simplicity and would like to use it for my code. However, I am not sure if it is OK to use it with hardware ...
3
votes
3answers
536 views

How to maintain modularity in C?

I am writing C code with multiple modules like LCD display, flash memory, and GSM module etc. The project consists of thousands of lines of code, in different files. The behavior of the system can be ...
2
votes
3answers
143 views

Data padding for different hardware support?

Some hardware cannot read non-aligned data. For example Bitmap images are aligned to 4-bytes from the header and with each scan line in order to maintain device independence. For example you can ...
1
vote
5answers
305 views

Making an automotive system more 'modular' in terms of software?

I am working on an automotive project that we are supposed to make more modular. I am a software specialist and I have very little knowledge of automotive hardware. I don't have any requirements or ...
5
votes
1answer
725 views

Designing interfaces to hardware

I am writing a library in C++ that is used by customers to interface with hardware. There are many different devices that I need to support. For the sake of simplicity, assume I have 2 Widgets, ...
2
votes
2answers
1k views

Hardware accelerated text processing

Graphics processing units (GPUs) are very common and allow for efficient, parallel processing of floating point numbers. PPUs (Physics Processing Units) used to be a buzzword several years ago but ...
3
votes
2answers
321 views

Cross device testing for web development

Currently, I do not have a fixed process for cross device testing other than randomly asking the people around my co-working space to test my site on whatever device they have on-hand. This is quite a ...
1
vote
0answers
75 views

Is conversion from C/C++ to Verilog/VHDL for FPGA a derivative work? [duplicate]

Say I have a C/C++ software licensed under GPL that gets converted into hardware design. By this conversion I mean that the exact functionality of the original software is being programmed into an ...
-5
votes
2answers
189 views

How do you learn a language without actual tools? [closed]

I will bring a concrete case here. I have a project involving Sketch and Arduino. Since I was they only guy willing in the group, I had to take the Sketch part. The problem is that our informatics ...
0
votes
3answers
167 views

How do web servers deal with issues that arise when a machine has been on for a long time?

It seems to be accepted that computers that have been powered on for a long time and have any sort of complex software (ie and OS) running on them they tend to develop random errors and problems. ...
0
votes
1answer
2k views

How can I test my camera-dependent android app on most devices? [duplicate]

We are developing an app for taking photos faster. We do this by actually taking videos instead of photos and processing the individual images in the video on the fly and combine them to create a high-...
3
votes
6answers
2k views

What are memory addresses? [closed]

I have more or less 0 knowledge in low-level topics, so forgive my possible ignorance. I know that in languages such as C, pointers hold 'memory addresses', i.e. strings (or binary data?) written in ...
0
votes
2answers
159 views

How do we add software to a machine? [duplicate]

When we build a new machine, how do we add software to that machine? I know we have assemblers and compilers that convert the high-level code into machine code for it to understand. But having ...