Found 2065 Articles for Operating System

How to implement monitors using semaphores?

Arnab Chakraborty
Updated on 11-Oct-2019 12:51:49

2K+ Views

To implement monitor using semaphores, for each monitor, a semaphore mutex (which is initialized to 1) is provided. Wait(mutex) must be executed by a process before entering the monitor and must execute signal(mutex) after leaving the monitor. Since a signaling process must wait until the resumed process either leaves or waits, an additional semaphore, next, is introduced, initialized to 0. next can be used by The signaling processes to suspend themselves. An integer variable next_count is also provided to count the number of processes suspended on next. Thus, each external function F is replaced by-wait(mutex); … body of F ... ... Read More

Grand Central Dispatch (GCD)

Arnab Chakraborty
Updated on 11-Oct-2019 12:48:37

634 Views

Grand Central Dispatch (GCD) - a technology for Apple’s Mac OS X and iOS operating systems-is a combination of extensions to the C language, an API, and a run-time library that allows application developers to identify sections of code to run in parallel. Like OpenMP, GCD manages most of the details of threading. GCD identifies extensions to the C and C++ languages known as blocks. A block is simply a self-contained unit of work. It is specified by a caret ˆ inserted in front of a pair of braces { }. A simple example of a block is shown below ... Read More

What is OpenMP?

Arnab Chakraborty
Updated on 11-Oct-2019 12:45:48

7K+ Views

OpenMP is a set of compiler directives as well as an API for programs written in C, C++, or FORTRAN that provides support for parallel programming in shared-memory environments. OpenMP identifies parallel regions as blocks of code that may run in parallel. Application developers insert compiler directives into their code at parallel regions, and these directives instruct the OpenMP run-time library to execute the region in parallel. The following C program illustrates a compiler directive above the parallel region containing the printf() statement −#include #include int main(int argc, char *argv[]){    /* sequential code */    #pragma omp ... Read More

Data parallelism vs Task parallelism

Arnab Chakraborty
Updated on 11-Oct-2019 12:42:35

16K+ Views

Data ParallelismData Parallelism means concurrent execution of the same task on each multiple computing core.Let’s take an example, summing the contents of an array of size N. For a single-core system, one thread would simply sum the elements [0] . . . [N − 1]. For a dual-core system, however, thread A, running on core 0, could sum the elements [0] . . . [N/2 − 1] and while thread B, running on core 1, could sum the elements [N/2] . . . [N − 1]. So the Two threads would be running in parallel on separate computing cores.Task ParallelismTask ... Read More

Types of Parallelism in Processing Execution

Arnab Chakraborty
Updated on 11-Oct-2019 12:37:49

14K+ Views

Data ParallelismData Parallelism means concurrent execution of the same task on each multiple computing core.Let’s take an example, summing the contents of an array of size N. For a single-core system, one thread would simply sum the elements [0] . . . [N − 1]. For a dual-core system, however, thread A, running on core 0, could sum the elements [0] . . . [N/2 − 1] and while thread B, running on core 1, could sum the elements [N/2] . . . [N − 1]. So the Two threads would be running in parallel on separate computing cores.Task ParallelismTask ... Read More

What is Amdahl's Law?

Arnab Chakraborty
Updated on 31-Jan-2020 10:48:44

7K+ Views

Amdahl’s LawSuppose, Moni have to attend an invitation. Moni’s another two friend Diya and Hena are also invited. There are conditions that all three friends have to go there separately and all of them have to be present at door to get into the hall. Now Moni is coming by car, Diya by bus and Hena is coming by foot. Now, how fast Moni and Diya can reach there it doesn’t matter, they have to wait for Hena. So to speed up the overall process, we need to concentrate on the performance of Hena other than Moni or Diya.This is ... Read More

What is Multicore Programming?

Arnab Chakraborty
Updated on 11-Oct-2019 12:33:09

5K+ Views

Multicore programming helps to create concurrent systems for deployment on multicore processor and multiprocessor systems. A multicore processor system is basically a single processor with multiple execution cores in one chip. It has multiple processors on the motherboard or chip. A Field-Programmable Gate Array (FPGA) is might be included in a multiprocessor system. A FPGA is an integrated circuit containing an array of programmable logic blocks and a hierarchy of reconfigurable interconnects. Input data is processed by to produce outputs. It can be a processor in a multicore or multiprocessor system, or a FPGA.The multicore programming approach has following advantages ... Read More

Local procedure calls in Windows

Arnab Chakraborty
Updated on 11-Oct-2019 12:30:27

1K+ Views

The message-passing facility in Windows is called the local procedure call (LPC) facility. LPC is used for communication between two processes on the same machine. It is similar to the standard remote procedure call (RPC) mechanism that is widely used, but it is optimized for and specific to Windows. Windows uses a port object to establish and maintain a connection between two processes, like Mach. Two types of ports are used by Windows: connection ports and communication ports.The communication works as follows −Server processes publish connection-port objects that are visible to all processes.When a client wants services from a subsystem, ... Read More

What are the fundamental differences between Windows and Linux?

Arnab Chakraborty
Updated on 11-Oct-2019 12:26:28

428 Views

WindowsThe window operating system is the extension of the disk operating system.Windows is the most popular and simplest operating system which can be used by any person who can read and understand basic English, as it does not require any special training.It requires DOS to run the various application programs initially. So, DOS should be installed into the memory and then window can be executed.LinuxLinux is one of popular version of UNIX operating System which is open source as its source code is freely available. It is free to use and wasdesigned considering UNIX compatibility. Linux’s functionality list is quite ... Read More

What is the difference between a kernel and an operating system?

Arnab Chakraborty
Updated on 11-Oct-2019 12:21:25

561 Views

Operating SystemAn operating system (OS) is a collection of software that manages computer hardware resources and acts as an interface between user and hardware of the computer. It provides common services for computer programs. The OS is a crucial component of the system software in a computer system.KernelKernel is the core part of operating system and responsible for all major activities of this operating system. Kernel consists of various modules and it interacts directly with the low level hardware. It also provides the required abstraction to hide low level hardware details to system or application programs. An operating system is ... Read More

Advertisements