Skip to main content

Questions tagged [io]

Input/Output of data to/from a system. This usually implies file storage or network communication, but may also mean interaction with a user through a user interface.

Filter by
Sorted by
Tagged with
4 votes
2 answers
267 views

I am developing a python package that needs to be able to read/write from/to multiple formats. E.g. foo format and bar format. I am trying to contain the functions relating to each format in a single ...
Luce's user avatar
  • 149
0 votes
2 answers
304 views

For, e.g. determining an amount of memory that is safe to allocate for processing file or device with this type of I/O loop: HANDLE hFile /* = file open with GENERIC_READ */; LARGE_INTEGER liSize; ...
Govind Parmar's user avatar
1 vote
1 answer
403 views

Reading the Proactor pattern paper, specifically this part: I/O Completion Ports in Windows NT: The Windows NT operating system implements the Proactor pattern. Various Asynchronous Operations such ...
codefast's user avatar
  • 179
4 votes
10 answers
4k views

I am trying to understand the difference between CPU Bound vs IO Bound process. ChatGPT suggested that multi-threading/parallel processing can help a CPU bound process; However, I think that having ...
Sahil's user avatar
  • 199
0 votes
1 answer
92 views

I am trying to build a file editor, and I wanted to build the UI using Flutter. However I wanted to implement IO operations (reading a file, applying changes, etc) in Rust. The reason I would like to ...
Fabrizio's user avatar
  • 115
3 votes
3 answers
944 views

I've studied how data transfer with secondary storage(HDD or SSD) works. Would you mind to check that my understanding is correct? File system block is basic read/write logical unit which is used in ...
obanadingyo's user avatar
2 votes
2 answers
262 views

I am reading Tanenbaum's Modern Operating Systems. I want to understand a particular concept regarding processes and blocking system calls, specifically with regards to I/O. I assume threads might ...
Stefan Rendevski's user avatar
0 votes
2 answers
1k views

I want to know how standard I/O channels are handled in more depth. Processes have their own stdout, stderr, stdin channels where they can read/write. As far as I know, these are stored as temporary ...
66Gramms's user avatar
  • 129
1 vote
1 answer
1k views

I'm studying asynchronous IO, concurrent models for IO and how things works on windows, linux and most used web frameworks. I'm struggling on understanding why single-threaded event loops like the one ...
Mattias Santoro's user avatar
0 votes
1 answer
349 views

I am building a storage engine software that allows concurrent data writing, now I have two different choices here: Method 1. Background Long-Running Thread Multiple user threads write to their own ...
WoooHaaaa's user avatar
  • 101
7 votes
3 answers
2k views

I couldn't find a similar enough thread, so i'm making a new one. My question is about reducing database writes. Context is that I have an application which increments a number in a database every ...
Epic Speedy's user avatar
3 votes
5 answers
810 views

I've often found myself with the need to develop tools that process large files over a network and perform an operation to every element in that file. An element may be an individual line or an object ...
pstatix's user avatar
  • 1,047
2 votes
1 answer
244 views

Are streams of binary data considered a form of bit banging? Does this definition change if the array is buffered? I am referring software which handles binary data on a general purpose CPU; for ...
Zhro's user avatar
  • 191
0 votes
1 answer
359 views

In the most abstract, platform agnostic way possible, can someone explain what actually determines the end of input/output a socket? Is this something the programming language itself typically handles ...
gabriel.hayes's user avatar
0 votes
2 answers
605 views

For example, if I want to write a daemon program in C# that uses anonymous pipes to communicate with programs written in another language, is this both possible and feasible? I ask because I intend ...
gabriel.hayes's user avatar
4 votes
1 answer
2k views

So, in C#, I understand the historical difference between the two vaguely; a Task is a newer concept and the highest level concurrency native C# offers. AsyncResult is a bit more ambiguous. For ...
gabriel.hayes's user avatar
1 vote
1 answer
141 views

I'm an amateur programmer. I have a lot of interest in the inner workings of operating systems, a subject that I've been reading a lot about. What I've understood about kernels is that on most ...
S. Rotos's user avatar
  • 121
0 votes
1 answer
260 views

Background In much of the literature I've read online with respect to multi-layered architectures, many people describe how to create the simple application where: UI presents static model objects to ...
Nicholas Miller's user avatar
1 vote
0 answers
483 views

I have a small example that i run on a real device with 4+4 cores. ExecutorService service = Executors.newFixedThreadPool(4); for(int i =0 ; i<1000; i++){ Runnable task = new Runnable() { ...
Nick's user avatar
  • 117
4 votes
2 answers
5k views

In multi threaded java program, I initiate four concurrent threads with below details 1. Thread 1 writing file F1 2. Thread 2 writing file F2 3. Thread 3 reading file F3 4. Thread 4 reading ...
user3198603's user avatar
  • 1,896
2 votes
2 answers
1k views

Goal: 1) huge file read in chunks each 1 MB long, 2) each one gets compressed and written to an another output file. Note: I am limited to .Net 3.5 only. Is there a known pattern how to parallelize ...
Zazaeil's user avatar
  • 345
-7 votes
1 answer
244 views

I want to generate a test scene for a unit-test (big file parser). What will be faster, to have a test file and to perform I/O on it, or to generate a large memory buffer using some static parameters ...
Sanich's user avatar
  • 243
14 votes
6 answers
9k views

I'm implementing a metadata parser of image files from all formats. I want to write tests for it. One trivial way to do so is to have test image files of all formats as a resources for the tests, and ...
Sanich's user avatar
  • 243
7 votes
2 answers
1k views

Looking at a range of cross-platform languages, libraries and GUI toolkits, I often notice a conspicuous absence of support for asynchronous file I/O. This seems like too much of a common factor to be ...
detly's user avatar
  • 1,615
2 votes
1 answer
580 views

I've been reading about how memory-mapped I/O actually works and I cannot understand how the system assigns an address or address space to a specific device. Let's say I had two devices that I wanted ...
DylanG's user avatar
  • 135
1 vote
2 answers
9k views

I am working on a server application that should handle many requests. There is one thread per each request and each request has a Database operation. Creating connection for each request and doing ...
M.mhr's user avatar
  • 113
7 votes
3 answers
8k views

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, ...
Christopher's user avatar
  • 2,049
11 votes
1 answer
16k views

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. ...
Christopher's user avatar
  • 2,049
2 votes
1 answer
296 views

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 ...
Christopher's user avatar
  • 2,049
1 vote
3 answers
1k views

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....
John's user avatar
  • 247
4 votes
1 answer
6k views

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 the ...
John's user avatar
  • 247
1 vote
1 answer
341 views

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:...
John's user avatar
  • 247
3 votes
3 answers
8k views

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: ...
John's user avatar
  • 247
5 votes
3 answers
2k views

I am working on a C library (SlipRock) for interprocess communication. The library currently exposes a simple, blocking API. This is easy to use, makes misuse (relatively) difficult (this is C after ...
Demi's user avatar
  • 826
10 votes
2 answers
10k views

I've been puzzling over a good implementation for this for a while. I have a program that does a long-running I/O operation (downloading a file) and a long-running CPU operation (parsing its contents)...
ndm13's user avatar
  • 229
1 vote
0 answers
191 views

I have a binary file that I want to parse. The file is broken up into records that are 1024 bytes each. The high level steps needed are: Read 1024 bytes at a time from the file. Parse each 1024-byte "...
Dan's user avatar
  • 127
12 votes
7 answers
2k views

It seems like a chicken and egg problem. You can make a write function write to some data store, but never know you saved it properly without a tested read function. You can make a read function ...
user2738698's user avatar
0 votes
1 answer
245 views

High-level languages often expose stream-based I/O abstraction to the programmer, where blocking or non-blocking streams offer select/read/write operations. (AFAIK, message-based I/O seems is usually ...
max's user avatar
  • 1,115
3 votes
4 answers
749 views

I'm writing a Websocket implementation in Java, and I've set it up so that it basically just wraps an InputStream and OutputStream, and has public methods for both sending and receiving. While input ...
codebreaker's user avatar
  • 1,764
3 votes
1 answer
281 views

I'm designing and application that spawns another processes to handle some specialized work. The application and the process it spawns will communicate through standard input and standard output (and ...
Rico Kahler's user avatar
4 votes
1 answer
419 views

My question: When you've got a complex converter like, that takes chunks or large result sets out of a database, converts it into a line by line file/resource in the end, should one either design it ...
Superlokkus's user avatar
4 votes
1 answer
46k views

I have got a text file called "vholders.txt". I am making multiple threads as you can see here ,those threads work with their own given data and at last they write their own output to the vholders....
user avatar
29 votes
2 answers
13k views

I just noticed that the universal newline feature of file operations seems to be on its way out. The documentation for Python 3.5 open's mode parameter indicates that it's deprecated: 'U' ...
jpmc26's user avatar
  • 5,578
4 votes
2 answers
598 views

Let's say we have this interface: public interface OutputChannel extends Closeable { public void writeOutput(String output); } Then there are several classes which implement this interface and ...
Cinnam's user avatar
  • 143
31 votes
6 answers
26k views

It's always been known that Disk operations are slow and we know the reasons why they are slow. So the question here is why do we have to wait for I/O or why is there such a thing as IOWait, etc.? I ...
Arturas M's user avatar
  • 571
14 votes
2 answers
1k views

I was watching this talk about implementing Async IO in Rust and Carl mentions two potential models. Readiness and Completion. Readiness Model: you tell the kernel you want to read from a socket do ...
kjs3's user avatar
  • 241
3 votes
1 answer
134 views

I am having a difficult time determining where my IO logic should reside within my application. In this application there are multiple IO devices both USB and serial. I currently have the idea to ...
KDecker's user avatar
  • 185
2 votes
2 answers
3k views

I'm trying to switch my brain from Node.js/Objective-C iOS programming to C++ programming, and it's a little bit taxing. Node.js and Objective-C with iOS do not have a run loop that I am supposed to ...
Mikey A. Leonetti's user avatar
14 votes
3 answers
22k views

As I understand, when a file is being written, the process writing to the file obtains an exclusive lock. So other processes cannot access this file for read. With the above knowledge, I'm unable ...
Sorter's user avatar
  • 393
9 votes
1 answer
2k views

I'm experimenting a little with creating a socket server, in PHP. In doing so I'm trying to abstract away the kinds of sockets I think I'll be needing, that I've tentitively named: ListenSocket — the '...
Decent Dabbler's user avatar