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

Directly Jump to another C++ function

I'm porting a small academic OS from TriCore to ARM Cortex (Thumb-2 instruction set). For the scheduler to work, I sometimes need to JUMP directly to another function without modifying the stack nor the link register. On TriCore (or, rather, on…
orithena
  • 1,455
  • 1
  • 10
  • 24
7
votes
2 answers

mkfifo() error ---> "Error creating the named pipe.: File exists"

The mkfifo function takes 2 arguments, path and mode. But I don't know what is the format of the path that it uses. I am writing a small program to create a named pipe and as path in the mkfifo. Using /home/username/Documents for example, but it…
Spyros
  • 682
  • 7
  • 18
  • 37
7
votes
3 answers

Implementation of Signals under Linux and Windows?

I am not new to the use of signals in programming. I mostly work in C/C++ and Python. But I am interested in knowing how signals are actually implemented in Linux (or Windows). Does the OS check after each CPU instruction in a signal descriptor…
6
votes
1 answer

return value in vfork() system call

Considering the below code : int main() { int pid; pid=vfork(); if(pid==0) printf("child\n"); else printf("parent\n"); return 0; } In case of vfork() the adress space used by parent process and child process is same, so single…
L.ppt
  • 524
  • 6
  • 21
6
votes
2 answers

Information on N-way set associative Cache stides

Several of the resources I've gone to on the internet have disagree on how set associative caching works. For example hardware secrets seem to believe it works like this: Then the main RAM memory is divided in the same number of blocks available…
6
votes
10 answers

C/C++ How to tell if a program is already running?

In a Windows environment, I don't want two instances of my program running at the same time. Related Is using a Mutex to prevent multiple instances of the same program from running safe?
ar0j
6
votes
3 answers

Why is sequentially reading a large file row by row with mmap and madvise sequential slower than fgets?

Overview I have a program bounded significantly by IO and am trying to speed it up. Using mmap seemed to be a good idea, but it actually degrades the performance relative to just using a series of fgets calls. Some demo code I've squeezed down…
juhanic
  • 805
  • 8
  • 16
6
votes
3 answers

Segmentation fault after the call of pthread_join()

I have written the following code using the POSIX pthread library: #include #include #include pthread_t pid1,pid2; void *test(void *arg) { void **end; printf("\nNew Thread ID: 0x%x\n",(unsigned…
pradeepchhetri
  • 2,899
  • 6
  • 28
  • 50
6
votes
6 answers

What programming languages, without a runtime, besides C, are good for writing programming languages?

I'm looking into a hobby of writing a toy programming language, partly from minor annoyances with other languages, partly so that I can understand what it's like, but mostly just to fool around. On the off chance that it gets really useful, I don't…
madumlao
  • 448
  • 5
  • 9
6
votes
2 answers

libeio on windows

What would it take to port libeio to windows?
Nathan
  • 446
  • 2
  • 15
6
votes
1 answer

Programmatically restart USB device in Windows

Some software I am developing requires the presence of a USB device (which I interact with as a SerialPort, with a USB-to-UART bridge). Sometimes, after a computer is being restarted from hibernation, the device is not being detected, and I can no…
Matthew King
  • 5,114
  • 4
  • 36
  • 50
6
votes
1 answer

linux execvp ; ls cannot access |, No such file or directory

I am trying to code a shell. But my shell doesn't execute the command - ls -l | less. I am using execvp. the code is given below. #include #include #include int main(){ int pid, status, num, len; char…
odbhut.shei.chhele
  • 5,834
  • 16
  • 69
  • 109
5
votes
4 answers

boost::thread data structure sizes on the ridiculous side?

Compiler: clang++ x86-64 on linux. It has been a while since I have written any intricate low level system code, and I ussualy program against the system primitives (windows and pthreads/posix). So, the in#s and out's have slipped from my memory. I…
5
votes
1 answer

vfork() system call

I read that the new process created using vfork() system call executes as a thread in the parent's address space and until the child thread doesnot calls exit() or exec() system call, the parent is blocked. So I wrote a program using vfork() system…
pradeepchhetri
  • 2,899
  • 6
  • 28
  • 50
5
votes
7 answers

Low level systems programming with C++

I have been using C++ for a while now and I began to get interested in lower level system programming like drivers and stuff. Even some kind of primitive operating system could be very interesting project! I have no clue where I could start. Are…
Henry H
  • 103
  • 1
  • 1
  • 8
1 2
3
27 28