Found 2065 Articles for Operating System

What languages have been used to write Windows, Mac OS and Linux OS?

Mukul Latiyan
Updated on 12-Jul-2022 09:05:15

5K+ Views

We know that an operating system is considered the backbone of any system that you may use. The three most common and widely used operating systems share things in common just as well as they share differences. While there are cases where one might outperform another, those cases and such scenarios are very rare.The most notable difference one can notice is how they store the files in their file structure, like in case of windows, it follows a directory structure to store the different kinds of files of the user, whereas the Mac OS file structure is known as MAC ... Read More

What is the sed in-place flag that works both on Mac and Linux?

Mukul Latiyan
Updated on 31-Jul-2021 12:26:24

3K+ Views

We know that the SED command in Linux stands for stream editor and is mainly used to perform functions on files, and the functions usually are either searching for a word, or replacing it or insertion of something and few more. It is a very useful command and can be found on the Linux kernel.It should also be noted that the BSD (Berkeley Software Distribution) sed shipped with the OS X does need the -i flag to work and the GNU one doesn’t.One way to make the GNU version of the SED to work on the Mac OS X, is ... Read More

What is the Linux Equivalent to DOS Pause?

Mukul Latiyan
Updated on 31-Jul-2021 12:25:43

141 Views

We know that the Pause command in DOS is used to suspend execution of the batch files and it then displays the messageStrike a key when ready ...It should also be noted that some versions of DOS also allow a comment to be entered on the same line as PAUSE.ExampleWe can make use of the Pause command in a scenario where we want to suspend the execution of a batch file and display the message “Insert Code”, by typing the following command in the terminalpause Insert CodeSo, that was all about the Pause command in DOS, but we want to ... Read More

What is fopen() and open() in Linux?

Mukul Latiyan
Updated on 31-Jul-2021 12:23:25

4K+ Views

The key difference between the fopen() and the open() function in the Linux operating system is that the open() function is a low-level call, where the fopen() when called simply calls the open() function in the background and it returns a Filepointer directly.The call to the open() function includes invoking several other functions and the behaviour of the entire process is mentioned below as a reference to understand the open() function better.Consider the code shown below −int sys_open(const char *filename, int flags, int mode) {    char *tmp = getname(filename);    int fd = get_unused_fd();    struct file *f = ... Read More

What does opening a file actually do on Linux?

Mukul Latiyan
Updated on 31-Jul-2021 12:22:04

336 Views

When we are talking about opening a file, then we have different cases such as in what language and what API are we actually calling when opening a file. While in most of the cases it is quite simple, the higher level languages will eventually call either the C API or directly invoke the Linux open() function which is also written in C.If we try to talk about different languages then this is a very broad question and cannot be covered in a one single article, and that is because of the sheer complexity that gets added to it when ... Read More

Understanding stdin, stderr and stdout in Linux

Mukul Latiyan
Updated on 31-Jul-2021 12:21:26

21K+ Views

There is a decent chance that if you have used Linux operating systems then you might have encountered the three famous data streams known as stdin, stderr and stdout. All these are different in their functions and have their own uses but one thing common between all three of them is that they are data streams that bash creates.Let’s understand more about what data streams actually mean and how they are beneficial. In terms of computing, a data stream is something that gives us the ability to transfer data from a source to an outflow and vice versa. The source ... Read More

Understanding .a , .so and .la library files in Linux

Mukul Latiyan
Updated on 31-Jul-2021 12:21:07

3K+ Views

In order to understand what the libraries of files with the extensions .a, .so and .la actually mean, we first must be aware of the concept of libraries in Linux. A Linux in its very simple terms is a collection of pre-compiled pieces of code which are known as functions. Libraries are very useful as they provide reusable functions, classes and data structures. Some examples of libraries in Linux are glibc (GNU version of standard C library), libc (the C standard library).In total we can divide the libraries in Linux in two categories. These categories are −Static LibrariesDynamic LibrariesStatic LibrariesThe ... Read More

Threads vs Processes in Linux

Mukul Latiyan
Updated on 31-Jul-2021 12:20:50

3K+ Views

ProcessA process is the execution of a program that allows you to perform the appropriate actions specified in a program. It can be defined as an execution unit where a program runs. The OS helps you to create, schedule, and terminate the processes which are used by the CPU. The other processes created by the main process are called child processes.ThreadThread is an execution unit that is part of a process. A process can have multiple threads, all executing at the same time. It is a unit of execution in concurrent programming.Consider the table shown below that depicts the differences ... Read More

What is the maximum number of threads per process in Linux?

Mukul Latiyan
Updated on 31-Jul-2021 12:19:22

1K+ Views

There are multiple ways with which we can check the maximum number of threads that Linux has allocated to a particular process.Approach 1cat /proc/sys/kernel/threads-maxOutput61741We can also increase the default value set by linux with the help of the command shown below −echo 123456789 > /proc/sys/kernel/threads-maxwhere 123456789 = Number of threadsApproach 2It is also known that Linux doesn’t have a separate threads per limit and it basically implemented the maximum number of threads per process indirectly.Commandnumber of threads = total virtual memory / (stack size*1024*1024) So the threads per process can be increased by decreasing the stack size or increasing the ... Read More

Linux – How to resolve the error "can't connect to Docker daemon"

Mukul Latiyan
Updated on 31-Jul-2021 12:19:03

185 Views

It is one of the commonly known errors that the new users can get when trying to start Docker on a daemon process. This error usually comes up when you try to run the following command in your terminaldocker-compose buildThe docker-compose in the above command is a tool that is used for running and defining multi container Docker applications.The error looks something like this −Cannot connect to the Docker daemon. Is the docker daemon running on this host?In order to make sure that you resolve this error, one approach is to make sure that post-installation steps are correctly followed.Below, there ... Read More

Advertisements