Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Operating System Articles
Page 122 of 171
What is a multithreading model in OS?
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 MoreHow to implement thread in kernel space?
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 MoreHow to implement thread in user space?
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 MoreWhat are the process states in Windows and Linux?
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 MoreWhy do we need shell scripting?
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 MoreWhat is the concept of thread?
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 MoreWhat is a programmed I/O?
It is one of the simplest forms of I/O where the CPU has to do all the work. This technique is called programmed I/O.Consider a user process that wants to print the Nine-character string ‘‘TUTORIALS’’ on the printer with the help of a serial interface.The software first assembles the string in a buffer in user space, as shown in the figure −ExplanationStep 1 − The user process acquires the printer for writing by using a system call to open it.Step 2 − If the printer is currently in use by another process, this system call fails and returns an error ...
Read MoreWhat is a client-server system?
Communication in client-server can communicate using shared memory and message passing.These techniques can be used for communication in client-server systems.Strategies for CommunicationWe can explore three other strategies for communication in client-server systems which are as follows −SocketsA socket is defined as an end point for communication. A pair of processes communicating over network employees or a pair of sockets, one for each process.A socket is identified by an IP address connected with a port number. In general, sockets use client server architecture. The server waits for incoming client requests by listening to a specified port.Once a request is received, the ...
Read MoreDifferentiate between shared memory and message passing model in OS.
Shared memory system is the fundamental model of inter process communication. In a shared memory system, in the address space region the cooperating communicate with each other by establishing the shared memory region.Shared memory concept works on fastest inter process communication.If the process wants to initiate the communication and it has some data to share, then establish the shared memory region in its address space.After that, another process wants to communicate and tries to read the shared data, and must attach itself to the initiating process’s shared address space.Message Passing provides a mechanism to allow processes to communicate and to ...
Read MoreHow is IPC implemented in the Android, MAC, Windows Operating systems?
Inter-process communication is a technique of exchanging data between two or more processes for performing some action on that data. These processes may be present on the same computer or at remote locations.The reasons for Inter-process communication are as follows −Sharing information between processesSpeed up the computation of some processIncreasing the modularity in the applicationNow, let us learn about the type of inter-process communication implemented in the following OS.AndroidAndroid OS uses the following method for sharing data between two or more processes.BindersIt is one of the ways of passing data between processes in the android operating system. The communication between ...
Read More