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

Is it possible to install separate signal handler for each pthread?

Let's say we have 3 threads A(main), B, C. I am aware that we can send signals to an individual thread using pthread_kill and mask signals in thread using pthread_sigmask. Also, I am aware signal handler is shared between threads in general. Is it…
Cliff
  • 140
  • 1
  • 8
2
votes
0 answers

poll() system call stuck in restart_syscall()

Intermittently process is getting stuck in poll call. This process reads the data received on a socket using poll system call. After restart it runs fine for some days and then does not read anything from socket. tcpdump shows the data is received…
Amrit
  • 319
  • 1
  • 2
  • 9
2
votes
2 answers

Hardware supported OS functions

I would like to know major hardware supported operating system(generic) functions or the categories of that. Is there any link or reference materials I can refer?
2
votes
0 answers

How can I implement locking a range of values in a sorted sequence?

I am trying to write a general purpose locking algorithm which allows me to lock a range of contiguous values in a sorted array. To start with, these could be exclusive locks - so two concurrent locks must be non-overlapping. What could be a good,…
CppNoob
  • 2,322
  • 1
  • 24
  • 35
2
votes
1 answer

when using different file descripter, why is the result different? (system programming)

I am studying about file descripter and realized that if I use dup2() function, the result will be different. The first snippet ... int main(void){ char buf1[BUFSIZ] = "I am low\n"; printf("i am high\n"); write(1, buf1, strlen(buf1)); …
whitehat
  • 63
  • 6
2
votes
1 answer

How do I programatically start an internet connection?

I want to programmatically start broadband (PPOE) internet connection. I'm not sure if InternetDial will work as the documentation clearly says that it initiates a connection to the Internet using a modem. I tried searching for the API function but…
Searock
  • 6,278
  • 11
  • 62
  • 98
2
votes
1 answer

Monitoring directory using ReadDirectoryChangesW API

I am trying to monitor a directory e:\test using ReadDirectoryChangesW API. My Code : #define UNICODE #define WIN32_WINNT 0x0500 #include "stdafx.h" #include #include HANDLE hDir; int _tmain(int argc, _TCHAR* argv[]) { …
Searock
  • 6,278
  • 11
  • 62
  • 98
2
votes
1 answer

x86 debug register : how to break on a specific physical address

x86 debug registers (dr0 to dr3) allow to break on a specific address when software attempts to read/write in (intel doc). And this configured address must be a linear address. The problem is that when paging is enabled, the same physical address…
Mahouk
  • 902
  • 9
  • 28
2
votes
1 answer

Passing a negative file descriptor to poll

The man page of the poll function says: ... int poll(struct pollfd *fds, nfds_t nfds, int timeout); ... struct pollfd { int fd; /* file descriptor */ short events; /* requested events…
2
votes
2 answers

Copying part of the stack and using mmap to map it to the current process

I want my program to do the following: Open a new file. Copy a (page-aligned) portion of the stack that includes the current frame pointer address to the file. Map the contents of the file back into the process's address space in the same range as…
Amittai Aviram
  • 2,270
  • 3
  • 25
  • 32
2
votes
1 answer

how to generate the Performance monitoring interrupt after every overflow

I want to configure the performance counter IA32_PERF_FIXED_CTR0 to generate performance monitoring interrupt (PMI) after every N retired instructions. The problem is that although I get the first PMC interrupt, I don’t get any further ones even…
2
votes
1 answer

C program compiles in xcode, but runs infinite loop in terminal

I've been working on a group program for a systems programming class which will run functions that someone at a bank would use. These functions include add bank customers, output balance of a customer, and so on. The problem lies with the add…
mimiholli
  • 33
  • 7
2
votes
2 answers

How to know if a process is a parent or a child

How does one identify if a process is a child/grandchild of another process using its pid?
Alex.P
  • 33
  • 1
  • 1
  • 3
2
votes
1 answer

Output of Program with fork()

I am trying to understand why the output of this program always starts with 012xxxxxxx Here is the code: int main() { int i; for (i=0; i<2; i++) { fork(); printf("%d", i); } printf("2"); } I sketched the process graph: But I don't…
foobar5512
  • 2,470
  • 5
  • 36
  • 52
2
votes
0 answers

OS GUI development learning:How to find the best recources to learn the GUI development for OS developing?

There has some best resources to learn the OS GUI development?For example,books or documents or other things in respect of this fact.I want to read the books which are related to Unix:X Window System or C video programming and other things such…
Tala Bon
  • 21
  • 4