Found 989 Articles for Software & Coding

What are threading issues?

Bhanu Priya
Updated on 30-Nov-2021 12:03:38

22K+ Views

We can discuss some of the issues to consider in designing multithreaded programs. These issued are as follows −The fork() and exec() system callsThe fork() is used to create a duplicate process. The meaning of the fork() and exec() system calls change in a multithreaded program.If one thread in a program which calls fork(), does the new process duplicate all threads, or is the new process single-threaded? If we take, some UNIX systems have chosen to have two versions of fork(), one that duplicates all threads and another that duplicates only the thread that invoked the fork() system call.If a ... Read More

What are the merits and demerits of a distributed system?

Bhanu Priya
Updated on 30-Nov-2021 12:00:56

422 Views

Distributed Operating System is a type of model where applications are running on multiple computers linked by communications. It is an extension of the network operating system which supports higher levels of communication and integration of the machines on the network.Distributed OS runs on multiple CPUs but for an end-user, it is just an ordinary centralized operating system. It can share all resources like CPU, disk, network interface, nodes, computers, etc. from one site to another site, and it increases the data available on the entire system.All processors are connected by valid communication media such as high-speed buses and telephone ... Read More

What are thread libraries?

Bhanu Priya
Updated on 30-Nov-2021 11:57:37

12K+ Views

A thread is a lightweight of process and is a basic unit of CPU utilization which consists of a program counter, a stack, and a set of registers.Given below is the structure of thread in a process −A process has a single thread of control where one program can counter and one sequence of instructions is carried out at any given time. Dividing an application or a program into multiple sequential threads that run in quasi-parallel, the programming model becomes simpler.Thread has the ability to share an address space and all of its data among themselves. This ability is essential ... Read More

What is a multithreading model in OS?

Bhanu Priya
Updated on 30-Nov-2021 11:23:07

1K+ Views

Multithreading is a process divided into a number of smaller tasks. Each task is represented or called it as a “Thread”. That means a thread is a lightweight of process. A number of such threads within a process executes at a time is called “multithreading”.The operating system’s additional capability is supporting multithreading.Based on the functionality, threads are divided into four categories and these are given below −One process, one thread.One process, multiple threads.Multiple processes, one thread per process.Multiple processes, multiple threads per process.Let us see how the above functionality represents in the pictorial form −One process, one thread − It ... Read More

How to implement thread in kernel space?

Bhanu Priya
Updated on 30-Nov-2021 11:20:38

1K+ Views

Kernel is a part of the operating system. It interacts directly with the hardware of the computer with the help of a device that is built into the kernel.Functions of KernelThe functions of the kernel are as follows −Memory managementControlling access to the computer.Maintaining the file system.Handling interruptsHandling errorsPerforming input and output services.Kernel allocates the resources of the computer of users.The kernel is the most important part of the Architecture of Unix OS.Generally, program executes in two modes, which are as follows −User mode − Cannot access any hardware resources, which perform only the user operations.Kernel mode − Can access ... Read More

How to implement thread in user space?

Bhanu Priya
Updated on 30-Nov-2021 11:16:14

2K+ Views

A thread is a lightweight of process. It is a basic unit of CPU utilization which consists of a program counter, a stack, and a set of registers.Given below is the structure of single threaded process −Thread in user spaceNow, let us see how to implement thread in User Space.Step 1 − The complete thread package is placed in the user space and the kernel has no knowledge about it.Step 2 − Kernel generally, manages ordinary and single threaded processes.Step 3 − Threads are always run on top of a run-time system.Step 4 − Run time system is a collection ... Read More

What are the process states in Windows and Linux?

Bhanu Priya
Updated on 30-Nov-2021 11:08:50

2K+ Views

A process is not only a program under execution but it is the active state of the program when it is executing and it has its own Process Control Block.A process requires other resources like memory, CPU, hard disk, and Input/Output, etc.A process has five states as given below −New − The new state of a process means the process is just created and it is stored onto the hard disk. This process will be picked by the operating system into the main memory. The new state is the initial state.Ready − The ready state of a process means the ... Read More

What is the purpose of a process control block (PCB)?

Bhanu Priya
Updated on 30-Nov-2021 11:07:01

3K+ Views

Every process is represented in the operating system by a process control block also called a task control block.A process control block (PSB) contains many pieces of information and it contains the attributes of a process.Attributes of a processThe attributes of a process includes the following:Process idEvery process is given some number. It may be either 16bit or 32 bit.Program counterIt contains the next instruction that has to be executed.PriorityWhenever a process is created, it is assigned with some priority. Processes which are having higher priority are executed first compared to processes which are having lower priority.General purpose registersWhenever you ... Read More

Why do we need shell scripting?

Bhanu Priya
Updated on 30-Nov-2021 11:04:07

4K+ Views

Shell is a software program that acts as a mediator between the kernel and the user. It reads the commands and interrupts by sending requests to execute a program. So, the shell is known as a command interpreter.It contains almost 100 system calls. It tells the kernel to carry out various tasks for the program. These tasks are as follows −Opening a file.Writing a file.Obtaining information about a file.Executing programs.Terminating a process.Changing the priority of processes.Getting the time and date.Need of shell scriptingLet us see the reasons for using shell scripts which are given below −Shell helps in doing work ... Read More

What is the concept of thread?

Bhanu Priya
Updated on 30-Nov-2021 11:01:54

4K+ Views

A thread is a lightweight of process and is a basic unit of CPU utilization which consists of a program counter, a stack, and a set of registers.Given below is the structure of thread in a process −A process has a single thread of control where one program can counter and one sequence of instructions is carried out at any given time. Dividing an application or a program into multiple sequential threads that run in quasi-parallel, the programming model becomes simpler.Thread has the ability to share an address space and all of its data among themselves. This ability is essential ... Read More

Advertisements