Questions tagged [systems-programming]

System programming is the activity of computer programming system software. The primary distinguishing characteristic of systems programming when compared to application programming is that application programming aims to produce software which provides services to the user, whereas systems programming aims to produce software which provides services to the computer hardware.

Wiki:

System programming is a kind of computer programming which is intended to design a system software. Systems programming is used to produce such softwares which provide services to the computer hardware. thus It requires a greater extent of hardware compatibility.

Implementing certain parts in operating system and networking requires systems programming, for example implementing Paging (Virtual Memory) or a device driver for an operating system. A System programming language like C, PL360, BLISS, D is usually used to for systems programming".

Usage:

The tag can be used for all system programming related problems. Stackoverflow is a question-answer website for programming related problems, for theoretical and other problems you can ask your system programming problems on https://www.superuser.com and https://programmers.stackexchange.com/

Read more:

408 questions
1
vote
1 answer

Node.JS deserialize floats at uneven offset

This question relates to my previous ones: Nodejs buffer bitwise slicing I transmit data through bluetooth LE to a node.js server. Here is the format of serialized data: top: 10 bit (unsigned integer) bottom: 10 bit (unsigned…
Dzung Nguyen
  • 3,794
  • 9
  • 48
  • 86
1
vote
1 answer

Why strange timing results appear in spite of binding a thread to a specific CPU-core?

I'm doing some experiments with low-latency programming. I want to eliminate context switching, and be able to reliably measure latency without affecting performance too much. To begin with, I wrote a program that requests time in loop 1M times and…
user2900180
1
vote
1 answer

How can I know the service name?

This code from Stevens et al., Advanced Programming in the Unix Environment, Figure 16.17 is a server program to provide system uptime: #include "apue.h" #include #include #include #include #define…
Sherwin
  • 847
  • 1
  • 6
  • 16
1
vote
0 answers

what does the "p" in "pselect" and "ppoll" meaning?

I haven read the man pages, but I still can't get the figure the prefix "p" in "pselect", and also "ppoll". So what is the "p" stand for in theses function?
valeque
  • 11
  • 1
1
vote
0 answers

How to use pthread_mutex_t and pthread_spinlock_t in the multi-process environment?

If I want to use pthread_mutex_t and pthread_spinlock_t in the multi-process environment, I have some questions below. Must I need to initialize the structure in the shared memory or use mmap()? If I initialize the structure in the shared-memory…
1
vote
2 answers

Sending structs through Unix domain sockets

I am using Unix domain sockets to do some interprocess communication in Linux. Upon connection, the client sends a struct using send to the server. This struct contains some information about the client including an identifier string at the end. The…
waffleman
  • 4,159
  • 10
  • 39
  • 63
1
vote
0 answers

Get the file-descriptor from dirent field d_name(filename)

Is there a way to obtain file-descriptors for the filenames obtained from dirent field d_name.
jarvis1729
  • 147
  • 2
  • 8
1
vote
0 answers

Is it possible to redirect Windows registry key for a process?

I have a legacy Windows application that reads values from specific registry key (and its subkeys). I'd like to change the key it reads, so when it opens e.g. HKEY_LOCAL_MACHINE\SOFTWARE\Something, it will be transparently redirected to…
Titan
  • 2,875
  • 5
  • 23
  • 34
1
vote
0 answers

AudioTrack to specific device via AudioFlinger

I'm doing some system programming on Android. I have AudioTrack object and need to specify on which device it should be played. How I can do that? In system/audio.h there is audio_device_t which can specify cases and flags of possible audio…
Steva
  • 231
  • 4
  • 16
1
vote
0 answers

opencv-webcam stream cannot be received by another process via named fifo

Hi i am trying to simulate a client-server program.Both are independent processes.The client listens for image data(mat.data) written on a named fifo by the server (which reads image frames from a webcam and writes them one by one on the…
userXktape
  • 227
  • 3
  • 5
  • 15
1
vote
4 answers

Segfault during a sprintf()

So, I am currently working on System programming for my Unix OS class. All that this program should do is read a binary file and output the lines to a CSV file. I feel like i'm almost done but for some reason I keep getting a segfault. To…
1
vote
0 answers

How to change network for newly started network process

I would like to change network, but only for newly started process. My idea is to modify somehow /proc filesystem for newly created process. How to do it in linux? Example code in ruby script.rb conn = Tcp.dial('123.123.123.4', 3306) and my wrapper…
Sławosz
  • 11,187
  • 15
  • 73
  • 106
1
vote
0 answers

Encrypt a memory page frame using C code

I am a bit new to systems programming.This is my setup : I have a test application running inside a vm which is running through qemu that issues a system call (with virtual address and size as parameters) to the os. So, when we issue this system…
SRKV
  • 151
  • 1
  • 2
  • 8
1
vote
1 answer

Are Negative Zero And Positive Zero Denormalized?

My professor went over a practice final exam question where we're working with IEEE floating point format. The Binary is a 5 bit representation where in one of the cases we worked with Minus Zero. Each representation has 1 sign bit, 3 exponent bits,…
Rafi
  • 1,902
  • 3
  • 24
  • 46
1
vote
0 answers

Using zsh file globbing in another application

Zsh has amazing file globbing. I want to use it in another application. I dug around the zsh code a bit and found the function zglob: https://github.com/zsh-users/zsh/blob/c96606cc0617b85d3bf0784d0bf1ecd71e44cbd7/Src/glob.c#L1152-L1158 This looks…
marpaia
  • 39
  • 5