Questions tagged [system-programming]

All questions regarding programming, tweaking and configuring of Unix & Linux core system as a whole or a sub-set of it.

Any and all questions regarding changing, enhancing, optimizing, configuring the system, either in shell scripts or in other languages like C, Java, Python, etc.

It also includes queries regarding sources and their reliabilities.

48 questions
30
votes
9 answers

What is the best book to learn Linux system programming?

I am trying to learn Linux system programming, which is the best book to learn this?
Khaja Minhajuddin
  • 857
  • 2
  • 12
  • 16
13
votes
2 answers

Difference between slow system calls and fast system calls

What's the difference between slow system calls and fast system calls? I have learned that slow system call can block if the process catches some signals, because the caught signals may wake up the blocked system call, but I can't exactly understand…
KayKay
  • 233
  • 1
  • 2
  • 7
8
votes
1 answer

Is there filesystem that allows me to insert some block in the middle of file in O(1)?

Assuming we have huge file F. we like to put "around" seek s a new empty (filled with zeros) block in O(1) time (i.e. without rewriting all remining part) "around" means we can round s to nearest filesystem blocksisze, and block to insert could be…
Grzegorz Wierzowiecki
  • 13,865
  • 23
  • 89
  • 137
7
votes
2 answers

Online course that covers Unix/Linux Systems programming

I am looking for an online course, something similar to the Berkely and Stanford Courses that covers Linux systems programming. A course which could use Stevens ( with some supplemental material covering linux idiosyncracies ) as the text (…
Mouse.The.Lucky.Dog
  • 2,027
  • 2
  • 26
  • 37
7
votes
2 answers

Learn Linux System Programming by doing projects

I have only a very basic idea about linux system programming. I have not done any real projects using linux system programming. In my current company I do system admin type work, but I am more interested in Linux System Programming. I want to do…
LinuxPenseur
  • 211
  • 2
  • 6
7
votes
2 answers

How to find the header file where a c function is defined?

Is there an easy way to find out which header file a C function declaration is in? cding into /usr/include and running (grep -E 'system.*\(' *.h -R) works with some trial and error, but isn't there an easier way to do this?
Khaja Minhajuddin
  • 857
  • 2
  • 12
  • 16
6
votes
1 answer

Concept of memory mapping in Unix like systems

Can some one explain in an easy to understand way the concept of memory mappings (achieved by mmap() system call) in Unix like systems ? When do we require this functionality ?
Geek
  • 6,548
  • 15
  • 46
  • 70
5
votes
2 answers

Implementing a Unix shell in C: Logging

I am currently working on implementing my own UNIX shell in C. The basis of the shell is working, you could find the source code here. Right now my next task is to implement a logging feature for the shell. So here's my question: What are the…
rahmu
  • 19,673
  • 28
  • 87
  • 128
5
votes
3 answers

Process creation time, shell script and system call overhead

I have a machine dual booted with Arch Linux and Ubuntu (16.04). I have recently started using the Kakoune text editor, and noticed that its startup time is drastically different depending on which OS I am using. However I believe the underlying…
5
votes
4 answers

System calls source code

C library provides functions such as write(),read(),open()...that we can use in our C program to make system calls. where can I find source code for these functions?
saurav1405
  • 379
  • 1
  • 3
  • 7
5
votes
3 answers

Cursor movement in terminals

I'm trying to wrap my head how shells move the screen cursor around (Moving around input the arrow keys and such). I've been doing a lot of testing, and I haven't found any system call that allows for movement of the screen cursor in a terminal. Is…
Juan
  • 153
  • 1
  • 5
4
votes
4 answers

How can I make my Linux server sleep and wake on LAN when not in use?

I have recently purchased myself an HP rack server for use as a personal fileserver. This server currently lives under my bed as I have nowhere else to put it. For those not aware (as I was not fully) this server is VERY LOUD. I need to be able…
4
votes
1 answer

FILE size limitation according to Robert Love's textbook

From Robert Love's Linux System Programming (2007, O'Reilly), this is what is given in the first paragraph (Chapter 1, Page 10): The file position’s maximum value is bounded only by the size of the C type used to store it, which is 64-bits in…
Arpith
  • 1,091
  • 3
  • 14
  • 23
3
votes
5 answers

How to set proper monitoring of my services in a automated way? So that if one crash it auto on the fly restarts?

How can i setup monitoring to my system services? Either using automated script which scan every moment, if httpd, mysqld, and my custom daemon is running or not, if not running it will automatically on the fly restart it? Any idea? For…
user11085
3
votes
0 answers

modetest.c from libdrm tests lists no framebuffers

I wanted to play with KMS since it seems to be the preferred low-level graphics library on Linux. However, after compiling the appropriate modetest.c version (2.4.32, since that's the version of libdrm-dev I have), it shows no framebuffers when…
Janus Troelsen
  • 1,463
  • 1
  • 15
  • 27
1
2 3 4