SoftPrayog provides information regarding Linux system programming, C programming, GNU-Linux commands, troubleshooting and general software engineering concepts.
What’s new
Program to find the day of the week for a given date
The Gregorian calendar was adopted in 1582. A C Program to find the day of the week for a given date as per Gregorian calendar is explained. Read more
Flex Tutorial
Flex, “fast lexical analyzer”, is a software tool for scanning input file and breaking it into recognizable chunks of text, called tokens. Read more
Process synchronization
The problem of synchronizing multiple concurrent processes is explained and a solution is provided with an example program. Read more
Regular Expressions In C
Regular expressions are used for searching strings in text files. A regular expression is a string of characters and may contain certain metacharacters. Regular expressions are explained with usage in a C program. Read more
Using sha256sum command for ensuring file integrity
sha256sum command generates and checks the SHA256 checksum for files. How to use sha256sum command for generating and checking the SHA256 checksums is explained with an example. Read more
Dining philosophers problem
The dining philosophers problem was formulated by Edsger Dijkstra in 1965. The problem illustrates synchronization issues in systems made up of concurrent tasks. The objective of the problem is to have progress and avoid deadlock in systems… Read more
VIDEOS
Featured Posts
I/O multiplexing: select, poll and epoll in Linux
I/O multiplexing is the the ability to perform I/O operations on multiple file descriptors. Input operations like read, accept and calls for receiving messages block when there is no incoming data. So, if an input call is made and it blocks, we may miss data from other file descriptors. To circumvent this, I/O multiplexing calls, viz., select, poll, and the epoll API calls, are provided… Read more
D-Bus Tutorial
D-Bus is a mechanism for interprocess communication under Linux and other Unix-like systems. D-Bus concepts along with example client-server programs are explained…. Read more
POSIX Shared Memory in Linux
Shared memory is the fastest method of interprocess communication (IPC) under Linux and other Unix-like systems. The system provides a shared memory segment which the calling process can map to its address space… Read more
POSIX Semaphores in Linux
Semaphores are used for process and thread synchronization. Semaphores are clubbed with message queues and shared memory under the Interprocess Communication (IPC) facilities in Unix-like systems such as Linux. There are two varieties of semaphores, the traditional System V semaphores and the newer POSIX semaphores. In this post we will look at the POSIX semaphores… Read more
POSIX message queues in Linux
POSIX interprocess comunication (IPC) was introduced in the POSIX.1b standard (IEEE Std 1003.1b-1993) for real time extensions. POSIX message queues have been made available in Linux since the version 2.6.6 (May 2004). POSIX IPC calls are as per the standard but may not be available on older Unix-like systems. Compared with the System V IPC calls, the POSIX IPC calls have a cleaner interface and are easier to use… Read more
POSIX Threads Synchronization in C
POSIX Threads provide multiple flows of execution within a process. The threads have their own stacks but share the global data and the heap. So the global variables are visible to multiple threads. Also, the threads need to synchronize their actions so that they jointly realize the overall objectives of the process they belong to. Read more
C Programming Tutorial 1 – Getting Started
A C programming tutorial for beginners, explaining constants, variables, expressions, input and output and overall program structure. Read more