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

Linux, Inter-Process Communication

Which linux shared memory solution supports resizing the shared memory pool at run time?
0
votes
0 answers

How can I have multiple threads working on the same for loop in C which in turn calls a function

This code is part of nvme-cli(its built on linux api) I am trying to build an option to repeat a nvme-command say n times with p number of threads. For example, if I say repeat 50-times with 5-threads, then each of the 5 threads should repeat…
Arjun G S
  • 23
  • 13
0
votes
3 answers

Why is the product of two positive integers a negative integer?

This semester i took system proramming course. Why 50000*50000 will be negative? I try to understand logic of this. Here is the screenshot of the slide slide image
user8690050
0
votes
1 answer

Easy way to find out whether a Posix API is implemented by an OS

While writing my code I thought of having a common implementation for all POSIX OSes as opposed to separate implementation for each OS. One of the POSIX API I use is posix_fallocate() and while testing I found it not being supported by MacOS. Had I…
user1200373
  • 181
  • 6
0
votes
2 answers

Is it possible to do systems programming in J or something close to it?

just wondering if this is possible? if so id like to see some online texts about it b/c I googled and couldnt find any haha, thanks
hello
  • 1
0
votes
1 answer

Choose BSD or sys5 style when creating file in linux

When I create file in linux default group owner becomes gid of process which creates file. If I add SGID to parent directory file will inherit parent directory owner group. Also I can change fs mount options to behave either like sys5 or like…
0
votes
3 answers

I am generating signal and facing the strange behaviour

I have started getting my hands of signals in Linux but here is some strange behavior happening in my code. I have just started and I searched for it too but I have not found anything, sorry if the question is too lame, here is the code- void…
0
votes
2 answers

I am trying to make recursive function which is reading from file character wise but it's not working in C

I have been getting hands on recursive technique using C , here the problem I am facing - bool FetchInputFromFile(int file_dis ){ // file_dis is the file descriptor which I have used in main with `open` sys call char ch; …
0
votes
0 answers

Hook Arbitrary Kernel Function through Module

I am trying to monitor all times the PCIe stack writes configures to a device. In the absence of a PCI equivalent of usbmon, I thought to monitor all times the pci_bus_write_config_byte() function is called. I wanted to write a kernel module that…
Farhan Yusufzai
  • 297
  • 6
  • 23
0
votes
1 answer

Manually wake up epoll_wait through gdb?

I have a program stuck in epoll_wait for an unknown reason (the timeout didn't kick in). Is there a way to force epoll_wait to return using gdb? Note that I can't stop / recompile the program - I actually need to unstick this instance of the…
kiv
  • 1,595
  • 1
  • 9
  • 11
0
votes
0 answers

fork() example in system programming

I have a problem with understanding this code in system programming using C in Unix. #include #include #include #include #include int main() { pid_t pid; pid=fork(); if( pid >…
0
votes
1 answer

Is a process' page table mapped to Kernel address space?

I was doing Windows system programming and wondered if I can access a process' page table on source code level. Here is what I know about page table related to virtual memory. Let's suppose an user just runs a process called 'A' process on Windows…
0
votes
1 answer

Getting started with coding unix commands

I have been learning c and data structures for quite some time now and I wanted to see whether I could apply what I have learnt. I searched a bit and found out that I could start with util linux but, before I could do so, I thought I'd check and…
mahesh Rao
  • 375
  • 1
  • 4
  • 16
0
votes
1 answer

Modifying exit.c system call code

Hello guys I need a little help here. After many hours of study and research I gave up I couldn't do it. I'm new in kernel programming and I have this task to do. I am asked to modify the exit() system call code so that it terminates all the…
0
votes
0 answers

Stuck with printing the tokens in yacc

I was writing a simple compiler to execute MOV and ADD instructions. Here is part of my yacc code... %{ char *name extern char *yytext %} %token MOV ADD /*name of instructions returned…