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
0
votes
0 answers

Shift without the sign

I transmit data through bluetooth to a nodejs buffer. I need to get the first 23 bits, append 9 least significant bits of 0, and parse it as an IEEE 32-bit floating points. The following code use the buffer 0x5F80, which should return the correct…
Dzung Nguyen
  • 3,794
  • 9
  • 48
  • 86
0
votes
1 answer

Parse float from serialized data

I have a buffer in NodeJS, and it received serialized data from a bluetooth device. The serialized data is IEEE single floating-point representation, where the offset is at 21th bit. accX = data.readUInt32LE(2); accX = accX >> 4; In C, I could do a…
Dzung Nguyen
  • 3,794
  • 9
  • 48
  • 86
0
votes
1 answer

How to detect issue occurs in watchdog daemon in Linux(Debian) before watchdog reboot the OS

I am working on an application project on Debian Linux which involves software watchdog to monitors other services by PID file created by services. I am following the steps from http://linux.die.net/man/5/watchdog.conf and installed it by apt-get…
0
votes
1 answer

Applescript in OS X (macOS) and low level C (Objective-C alternative

Hello I know that I can use something like Applescript to control different aspects of operating systems like keyboard inputs: osascript -e 'tell application "System Events" to key code 45' or mouse clicks: osascript -e 'tell app "System Events"…
Michał Ziobro
  • 10,759
  • 11
  • 88
  • 143
0
votes
1 answer

Webcam stream from parent process to child process

I want to send a stream of video frames using a webcam from a parent process to child process through a named pipe.The parent displays the sent frames while the child displays the received frames.I am using openCV 2.4.12 for accessing and displaying…
userXktape
  • 227
  • 3
  • 5
  • 15
0
votes
1 answer

setrlimit in Ruby

I am trying to limit the execution time of a ruby process using the following code: trap("XCPU") do abort "Max Time exceeded" end Process.setrlimit(:CPU, 5) loop do end The process does end but the trap code does not run (I just get 'killed'…
Omar Khan
  • 412
  • 2
  • 12
0
votes
1 answer

Error with stray ‘\342’ stray ‘\210’ stray ‘\222’ in C program in Linux system call

I am trying to do an example on a poll system call from Robert Love's book Linux system programming, 2nd edition (page 60-61). I copy pasted the example code in Code::Blocks on Ubuntu 14.04 (Trusty Tahr) and tried compiling it, but I get errors…
userXktape
  • 227
  • 3
  • 5
  • 15
0
votes
0 answers

How to write an assembly without using any of the existing programming languages

I wrote an assembly for my own assembly language in C++. I'm very interesting in how is it possible to write assembly without any existing languages? For example, how the first assembly was written?
0
votes
1 answer

C can't read from fifo (named pipe)

I create a fifo, but i can't read from it. What's the problem? Here is a code and output. If I use O_RDONLY without O_NONBLOCK program just wait. pid_t p; int fd; char str[]="sample"; mkfifo("myfifo", S_IRUSR | S_IWUSR); fd = open("myfifo",…
user4612022
0
votes
1 answer

How to handle memory obtained by module_param when writing a Linux kernel module?

When writing a kernel module for Linux, module_param and its variants can take a string as a module parameter, and the memory space required for that string is allocated behind the scenes without having to do anything explicitly. My question is, how…
0
votes
1 answer

How to create one level process tree using fork() system call?

I want to create a one level process tree using fork() system call, which looks as follows for n = 4 process I have tried this with the following code but this is not working. (here 1 is a child of parent process ) for(i = 0 ;i < n; i++){ …
Lakshya Garg
  • 736
  • 2
  • 8
  • 23
0
votes
1 answer

Trouble with creating an empty file using C programming language in UNIX environment

I have recently started programming in UNIX environment. I need to write a program which creates an empty file with name and size given in the terminal using this commands gcc foo.c -o foo.o ./foo.o result.txt 1000 Here result.txt means the name…
0
votes
1 answer

Systems programming: wait(&status)'s return value

While learning about forking and piping, I came across the following excellent tutorial: https://www.cs.rutgers.edu/~pxk/416/notes/c-tutorials/pipe.html However, the tutorial goes into discussing how one can establish a pipe between 2 child…
nirvanaswap
  • 859
  • 2
  • 11
  • 21
0
votes
1 answer

Programming with old version of Xcode

I am a beginner in programming and as I have ideas of making apps what do you recommend to start with? Is it OK to start with old version of Xcode such as 3.1.1 ? Thx for your comments
user5366179
  • 101
  • 1
0
votes
1 answer

Determining the offset in LC3

I am given a few lines of code and told to write the corresponding LC3 instructions. I am having trouble determining the offset value. For example: x3100 1110001000100000 So 1110 is the opcode for LEA. 001 signifies R1. The rest confuses me.…
GenericUser01
  • 337
  • 3
  • 11
  • 27