Process vs Parent Process vs Child Process

Ricky Barnes
Updated on 24-Jun-2020 12:11:24

11K+ Views

In Operating System, the fork() system call is used by a process to create another process. The process that used the fork() system call is the parent process and process consequently created is known as the child process.Details about these are given as follows −ProcessA process is an active program i.e a program that is under execution. It is more than the program code as it includes the program counter, process stack, registers, program code etc. Compared to this, the program code is only the text section.A process changes its state as it executes. This state partially depends on the ... Read More

Cooperating Process

Ricky Barnes
Updated on 24-Jun-2020 12:08:59

10K+ Views

Cooperating processes are those that can affect or are affected by other processes running on the system. Cooperating processes may share data with each other.Reasons for needing cooperating processesThere may be many reasons for the requirement of cooperating processes. Some of these are given as follows −ModularityModularity involves dividing complicated tasks into smaller subtasks. These subtasks can completed by different cooperating processes. This leads to faster and more efficient completion of the required tasks.Information SharingSharing of information between multiple processes can be accomplished using cooperating processes. This may include access to the same files. A mechanism is required so that ... Read More

Set the Width of the Element in HTML

Sravani S
Updated on 24-Jun-2020 12:04:06

309 Views

Use the width attribute in HTML to set the width of an element. You can use the attribute with the following elements − , , , , , etc.ExampleYou can try to run the following code to implement width attribute in HTML − Live Demo                                        Your browser does not support the video element.           Output

Mutex vs Semaphore

Ricky Barnes
Updated on 24-Jun-2020 12:01:12

29K+ Views

Mutex and Semaphore both provide synchronization services but they are not the same. Details about both Mutex and Semaphore are given below −MutexMutex is a mutual exclusion object that synchronizes access to a resource. It is created with a unique name at the start of a program. The Mutex is a locking mechanism that makes sure only one thread can acquire the Mutex at a time and enter the critical section. This thread only releases the Mutex when it exits the critical section.This is shown with the help of the following example −wait (mutex); ….. Critical Section ….. signal (mutex);A ... Read More

Multi-Threading Models

Alex Onsman
Updated on 24-Jun-2020 12:00:25

23K+ Views

Multithreading allows the execution of multiple parts of a program at the same time. These parts are known as threads and are lightweight processes available within the process. Therefore, multithreading leads to maximum utilization of the CPU by multitasking.The main models for multithreading are one to one model, many to one model and many to many model. Details about these are given as follows −One to One ModelThe one to one model maps each of the user threads to a kernel thread. This means that many threads can run in parallel on multiprocessors and other threads can run when one ... Read More

Monitors vs Semaphores

David Meador
Updated on 24-Jun-2020 11:59:09

4K+ Views

Monitors and semaphores are used for process synchronization and allow processes to access the shared resources using mutual exclusion. However, monitors and semaphores contain many differences. Details about both of these are given as follows −MonitorsMonitors are a synchronization construct that were created to overcome the problems caused by semaphores such as timing errors.Monitors are abstract data types and contain shared data variables and procedures. The shared data variables cannot be directly accessed by a process and procedures are required to allow a single process to access the shared data variables at a time.This is demonstrated as follows:monitor monitorName { ... Read More

Message Passing vs Shared Memory Process Communication Models

Alex Onsman
Updated on 24-Jun-2020 11:56:48

4K+ Views

Message passing model and shared memory model are models of interprocess communication. Details about these are given as follows −Message Passing Process Communication ModelMessage passing model allows multiple processes to read and write data to the message queue without being connected to each other. Messages are stored on the queue until their recipient retrieves them. Message queues are quite useful for interprocess communication and are used by most operating systems.A diagram that demonstrates message passing model of process communication is given as follows −In the above diagram, both the processes P1 and P2 can access the message queue and store ... Read More

Specify the Gap Between Columns with CSS

Nishtha Thakur
Updated on 24-Jun-2020 11:50:27

184 Views

Use the column-gap property to set the gap between the columns. You can try to run the following code to implement the column-gap property, with value 50px:ExampleLive Demo                    .demo {             column-count: 4;             column-gap: 50px;          }                              This is demo text. This is demo text. This is demo text. This is demo text.          This is ... Read More

Execute Script When File is Ready to Start Playing in HTML

Sreemaha
Updated on 24-Jun-2020 11:49:44

252 Views

You can use the oncanplay attribute for the following attributes − , , and .Example                                        Your browser does not support the video element.                      alert("I am ready to begin.");          

Specify Audio/Video Loading in HTML

Prabhas
Updated on 24-Jun-2020 11:48:24

141 Views

You can try to run the following code to learn how to implement a preload attribute to allow the author to give a hint to the browser for the best user experience. Works for both and tags −Example                                        Your browser does not support the video element.          

Advertisements