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 to block an app from launching in android at system level?

I want to know the exact method which invokes/starts all the apps. I basically want to block a certain set of apps using xposed module. Its ok if the app icon is visible but the app should not be launched after clicking on it. To be precise nothing…
compilerNayan
  • 63
  • 1
  • 5
0
votes
1 answer

Creating a UNIX Shell, confused about fork and child pids?

Here is my code for the evaluate function, which is called in the main. void eval(char *cmdline) { char *argv[MAXARGS]; /* argv for execve() */ int bg; /* should the job run in bg or fg? */ pid_t pid; /* process id */ bg =…
user3213348
  • 255
  • 1
  • 5
  • 14
0
votes
1 answer

How to define data types

Can someone please tell me if I am doing this right? typedef struct { int *stk; int *sp; } StackType; I am supposed to define a StackType
0
votes
3 answers

Unable to use "execve()" successfully

The aim of the program is to fork a new child process and execute a process which also has command line arguments. If I enter /bin/ls --help, I get the error: shadyabhi@shadyabhi-desktop:~/lab/200801076_lab3$ ./a.out Enter the name of the…
shadyabhi
  • 16,675
  • 26
  • 80
  • 131
0
votes
1 answer

C - pthreads appear to only be utilizing one core

Let me first of all say that this is for school but I don't really need help, I'm just confused by some results I'm getting. I have a simple program that approximates pi using Simpson's rule, in one assignment we had to do this by spawning 4 child…
LainIwakura
  • 2,871
  • 2
  • 19
  • 22
0
votes
4 answers

Output random number to file in linux in C

I'm trying to write a number (randomly generated) to a file using a loop for some number of iterations. I have: while (i++ < number) { n = randno(); write(openFd, (char) n, sizeof(int)); } The code compiles and runs. I can print 'n' to the…
John
0
votes
1 answer

get graphic card info in linux ( /proc file system )

I can create proc file.what I want to learn graphic card info using proc read function.How can I do this? I do not mean to learn that info in terminal( by writing lspci vs). do you know the path of which file stores the graphic card info in /proc…
user2923183
  • 19
  • 1
  • 6
0
votes
1 answer

How come my call to connect() fails?

In C, I am trying to connect to a server using the following function: int clientConnect() { //1. Set up connection address and port char *ipAddress = SMSA_DEFAULT_IP; int port = SMSA_DEFAULT_PORT; //1a. Set up a sockaddr_in struct as described in…
Mike
  • 2,514
  • 2
  • 23
  • 37
0
votes
1 answer

child and relation with fork

This is the question that I saw in the exam: Explain the circumstances under which which the line of code marked printf("LINE J") in Figure 3.33 will be reached. The only answer that came to my mind was this: when fork returns 0 we are at child…
HMdeveloper
  • 2,772
  • 9
  • 45
  • 74
0
votes
1 answer

C Read and write Issues w/ Specified Byte Length

I have a while loop in which I am reading from an archive file and extracting the first file. int fd = open(argv[2], O_RDWR | O_CREAT, 0666); char name_buffer[16]; char size_buffer[10]; // go to the first header lseek(fd, SARMAG,…
ns1
  • 117
  • 2
  • 3
  • 10
0
votes
2 answers

C Systems Program - Read/Write Issues During Copy

I am coding up a C program that extracts from a standard UNIX archive ar and creates the files it stores. Here is an example of what an ar looks like if I open it in vim: ! yo 1382105439 501 20 100644 10 ` test1…
ns1
  • 117
  • 2
  • 3
  • 10
0
votes
0 answers

How do I set programmatically (C++) a breakpoint to the CreateProcessW, CreateProcessA, etc functions

I have attached to a running process with DebugActiveProcess and I need to intercept CREATE_PROCESS_DEBUG_EVENT events. It appears that usual WaitForDebugEvent doesn't catch creating of child processes. I was advised to set a bp to CreateProcessW…
Nelly
  • 131
  • 2
  • 12
0
votes
1 answer

semclt is always returning -1

I am trying to learn use semophores. What I am trying to do is initialize a semaphore. Then set its value to 1, get that value and print it. But every time I try to do it, it shows me -1. My code is given below. Thanks in advance. #include…
odbhut.shei.chhele
  • 5,834
  • 16
  • 69
  • 109
0
votes
2 answers

Kindly explain how this function of the C program works?

I am reading the book Windows System Programming. In the second chapter, there is a program Cat.c , It implements the cat command of linux. The code is http://pastebin.com/wwQFp599 On the 20th line, a function is called iFirstFile = Options…
narayanpatra
  • 5,627
  • 13
  • 51
  • 60
0
votes
1 answer

what is work area in system programming?

i have read it when i was learning linking. When the program is going to be executed it was first linked by linker. At that time it was put in work area. Now i want to now what is this work area?
Parth
  • 527
  • 1
  • 8
  • 17