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
1 answer

How the redirection like "./a.out 0 < /dev/tty" is possible at 85p of APUE 3e

I was reading APUE(Advanced Programming in the UNIX Environment) 3e. And there is an example code to explain how fcntl() works like below. (I changed some of the headers included and some parts of code to be independent from this book's library. And…
woniok
  • 159
  • 4
  • 9
0
votes
1 answer

How are kernels made?

From my understanding, your program does everything using syscalls. But if everything is done with syscalls, then how are kernels coded? If every function just runs a stscall then how are you supposed to create your own?
Amber
  • 275
  • 1
  • 9
0
votes
0 answers

In Linux system programming with C language, how does the main program periodically check the global variable which is setted by signal_handler?

I know the basic principles of writing signal processing functions. The simpler the better, the global variables are set in the function body, and the rest of the work is left to the main program to complete, but how does the main program…
0
votes
0 answers

why not found device obj?

I write driver . Creates an Device Object (name = ICOCTL_1) when the service starts but getlastError function return not_foun_file(code 2) enter image description here void CUserAppDlg::OnBnClickedbtncreate(){ deviceHandle = …
MDev
  • 3
  • 2
0
votes
1 answer

Reason for using linked list implementations on stack vs heap

I was reviewing some libraries in C for a systems programming class, and I noticed their implementation of a doubly linked list did not require dynamically allocated data. Instead a list of a potentially dynamically allocated struct required an…
0
votes
0 answers

Memory segment permissions per user/group - any way to achieve this?

We know there are rwxp/s permissions on memory segments of an elf executable. Now, I have a user or a group, and I would like them to see .text segment (read access) of a certain executable but nothing else (no access to .bss or .data or .stack). Is…
0
votes
0 answers

Remote control over the running application C++ WINAPI

I want to create an application that can control the window of specified running process. I'm using WINAPI to obtain the main window handle of desired application and the sending the messages to it via SendMessage function from WINAPI. But it seems…
user11682080
0
votes
0 answers

How to get amount of the data cached by filesystem?

I wondering how to get the size of data cached by the filesystem (on Linux) after the write syscall was invoked. This is needed in order to find out which filesystem is the best in data caching and should be chosen to be used on SSD devices to…
tens0r
  • 55
  • 3
0
votes
1 answer

What is the difference between Message Queues and files in Linux. Also, what is the significance of priorities in message queues?

In Linux, Message queues are a form of IPC. However, I don't understand how they are different from a file. Instead of writing into a message queues, the processes can just write into a file right? What are the benifits of using message…
0
votes
1 answer

Operating Systems Mutexes

Question Assume that you have two mutexes, guard_mtx_1 and guard_mtx_2, that guards the access to the global lists, list_1 and list_2 in two threads that both run the following code snippet: ... lock(guard_mtx_1); Add(list_1,…
Sigrid
  • 73
  • 7
0
votes
1 answer

What does xorq do in a register?

I'm somewhat confident I understand XOR, which is commonly used to default values to zero, if you compare two of the same values with xor, it sets it to 0, if they're different the result is 1. If you have the…
0
votes
1 answer

What is PARANOIA meaning on chroot and setuid?

I know paranoia meaning but I'm reading isc-dhcp source code and I got confused about this term in system programming and linux world. configure.ac file has following codes : # PARANOIA is off by default (until we can test it with all…
alirezaarzehgar
  • 171
  • 1
  • 8
0
votes
1 answer

Network interfaces status tracking on FreeBSD

I'm porting some software to FreeBSD 12 (it's never been run on FreeBSD). The software needs to track the system network interfaces and react immediately on status changes. It's assumed to run with root privileges. In FreeBSD 7 there was combination…
QBatman
  • 145
  • 10
0
votes
1 answer

fcntl not working (doesn't lock the file) in multi-threaded programme

fcntl using code Hi. I'm trying to access a file with multiple threads, trying to get synchronization with record lock(fcntl). The problem is, fcntl doesn't lock the file. result I've tried: each threads to have own file descriptor/one file…
MIN
  • 1
0
votes
0 answers

Test if flock file locking is supported on a filesystem?

If one attempts to flock() a file on a lockless NFS mount, then flock will hang even if LOCK_NB is passed. Is it possible to detect that the filesystem does not support locking ahead of time? Perhaps with something returned from statfs? If not, is…
ridiculous_fish
  • 17,273
  • 1
  • 54
  • 61