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

Telnet handling wc and any command that read an input from the keyboard

I am new in UNIX and new in Programming on it using C language. What I want to do is the simple implementation for telnet. I made all required connection on both sides(Server & Client). On the server: any request I receive, I fork a new process to…
Mahmoud Emam
  • 1,499
  • 4
  • 20
  • 37
1
vote
1 answer

What does mac 'purge' command really do?

I use mac machine, and I have a curiosity the concept of mac's purge command. When I do that command, it frees of the memory that some like garbages (Is it really right?) I have learnt Virtual Memory concept on 'System programming' this semester,…
user1732445
  • 235
  • 2
  • 4
  • 14
1
vote
1 answer

getpwnam getpwnam_r

I am trying to update a password structure in a function. This function gets a pointer to password structure, into which I have to update details. I get a struct passwd* to a function as an argument and my requirement is to update it's members to…
Ram
  • 1,153
  • 4
  • 16
  • 34
1
vote
1 answer

Unexplainable behaviour with replecating manual piping using dup2

I have two sets of code both trying to execute something like ls|grep pip One that works and one that does not. The working code creates 2 child process and uses one child each to execlp the one command and the other simply tries to do this by…
ffledgling
  • 11,502
  • 8
  • 47
  • 69
1
vote
1 answer

Resolving symbol name in Shared library (Linux)

I'm doing dynamic binary analysis in Linux. Given the program is dynamically linked (load time linking) and no address space randomization I've to resolve the function name if a standard library function is being called. I saw in disassembled code…
sheikh
  • 117
  • 4
  • 13
0
votes
1 answer

Segmentation fault: 11 when trying to modify struct

I am attempting to store my char* parameter into a data member of a struct pointer. But I am receiving a Segmentation Fault: 11 when I attempt to do so. void macro_set(char *name, char *body) { verify(body != NULL, "null arg body"); bool …
0
votes
2 answers

Memory Allocation for Kernel Space and User Space processes

Is there any difference between kernel space & user space MEMORY ALLOCATIONS? From which region of memory they get allocated. Can anyone please provide some pointers on this? Thanks. Best Regards, Sandeep Singh
Sandeep Singh
  • 4,941
  • 8
  • 36
  • 56
0
votes
0 answers

Hidden PCI device

I'm trying to access eMMC soldered to Intel SDIO controller on Intel Atom z8350 platform. The documentation says that there are 3 controllers in the SoC, but PCI scanning finds only one one that is not connected to the card. Research shows that the…
acckiitvar
  • 25
  • 5
0
votes
0 answers

How can i get Cache of Instructions?

I'm new here, so I apologize if I'm asking the wrong question. Introduction: I am writing code on Windows server 2022 and I need to get data from the instruction cache on the CPU, are there any ways to do this from Ring 3 or Ring 0 (in assembler or…
0
votes
1 answer

Why do glibc's `system()` and `posix_spawn()` deal with signals?

The current POSIX-wide implementation of system() in glibc for the parent process: 1.a sets the process-wide signal handlers for SIGINT and SIGQUIT to ignore 1.b and blocks SIGCHLD. The current Linux-specific implementation of posix_spawn() in…
dyp
  • 38,334
  • 13
  • 112
  • 177
0
votes
1 answer

why does the process yield control flow to kernel when it knows how to handle?

My understanding is as follows. The program raises runtime errors (e.g., division by zero, or invalid memory reference) The program executes 'fault' instruction and give control to the kernel The kernel determines that it is not recoverable like…
Now.Zero
  • 1,147
  • 1
  • 12
  • 23
0
votes
0 answers

writing 'count' as the first item of the output file for this algorithm

I was attempting a problem regarding pointers from a book called problem solving and program design in C. we were formally introduced to functions fscanf() and fprintf() where they accept both input file and output file pointers respectively as the…
0
votes
1 answer

Managing processes in C

I am trying to test how to create and manage processes with a program what should create a process and execute a command 2 times (each time executing a different command). What I am trying to do exactly: Create a new PID Print the PID Execute a…
NIGHTSCROLLER
  • 89
  • 1
  • 5
0
votes
1 answer

How can I print a message from a signal handler

I have small project for practice in system calls. The idea is to create a Rock paper scissors game. The controller need to create two child processes and when two processes are created they are supposed to send ready command to the controller…
Phillips
  • 51
  • 1
  • 7
0
votes
0 answers

Having issues when using dup2 twice within the same process

I cannot figure out why does this program display only garbage characters when trying to print (at the standard output) some data read from both a file and a pipe. It is interesting that this problem occurs only when I use more than one dup2…
pauk
  • 350
  • 4
  • 15