Found 2065 Articles for Operating System

Operating System Definition

Arnab Chakraborty
Updated on 17-Oct-2019 11:10:07

2K+ Views

An operating system (OS) is basically a collection of software that manages computer hardware resources and provides common services for computer programs. Operating system is a crucial component of the system software in a computer system. We can probably see that the term operating system covers many roles and functions. That is the case, at least in part, because of the myriad designs and uses of computers. Nowadays, Computers are present within toasters, cars, ships, spacecraft, homes, and businesses. They are the foundation for game machines, music players, cable TV tuners, and industrial control systems. Since computers have a relatively short ... Read More

Dekker's algorithm in Operating System

Arnab Chakraborty
Updated on 17-Oct-2019 11:07:57

9K+ Views

Dekker’s algorithmDekker’s algorithm is the first solution of critical section problem. There are many versions of this algorithms, the 5th or final version satisfies the all the conditions below and is the most efficient among all of them.The solution to critical section problem must ensure the following three conditions:Mutual ExclusionProgressBounded WaitingFirst versionDekker’s algorithm succeeds to achieve mutual exclusion.It uses variables to control thread execution.It constantly checks whether critical section available.Examplemain(){    int thread_no = 1;    startThreads(); } Thread1(){    do {       // entry section       // wait until threadno is 1       ... Read More

Functional Programming Languages

Arnab Chakraborty
Updated on 17-Oct-2019 10:53:32

431 Views

Functional programming languages are specially designed to handle symbolic computation and list processing applications. Functional programming is based on mathematical functions. Some of the popular functional programming languages include: Lisp, Python, Erlang, Haskell, Clojure, etc.Functional programming languages are categorized into two groups, i.e. −Pure Functional Languages − These types of functional languages support only the functional paradigms. For example − Haskell.Impure Functional Languages − These types of functional languages support the functional paradigms and imperative style programming. For example − LISP.Functional Programming – CharacteristicsThe characteristics of functional programming are as follows −Functional programming languages are designed on the concept of ... Read More

Resuming Process Monitoring for a Process Instance

Arnab Chakraborty
Updated on 17-Oct-2019 10:51:37

521 Views

If several processes are suspended on condition x, and an x.signal() operation is executed by some process, then we can determine that which of the suspended processes should be resumed next by one simple solution is to use a first-come, first-served (FCFS) ordering, so that the process that has been waiting the longest is resumed first. In many circumstances, however, such a simple scheduling scheme is not adequate. For this reason, the conditional-wait construct can be used. This construct has the formx.wait(c);Here c is an integer expression that is evaluated when the wait() operation is executed. The value of c, ... Read More

Peterson’s Problem

Arnab Chakraborty
Updated on 17-Oct-2019 10:49:16

17K+ Views

Peterson’s solution provides a good algorithmic description of solving the critical-section problem and illustrates some of the complexities involved in designing software that addresses the requirements of mutual exclusion, progress, and bounded waiting.do {    flag[i] = true;    turn = j;    while (flag[j] && turn == j);    /* critical section */    flag[i] = false;    /* remainder section */ } while (true);The structure of process Pi in Peterson’s solution. This solution is restricted to two processes that alternate execution between their critical sections and remainder sections. The processes are numbered P0 and P1. We use Pj ... Read More

Hardware Synchronization

Arnab Chakraborty
Updated on 17-Oct-2019 09:18:41

12K+ Views

In Synchronization hardware, we explore several more solutions to the critical-section problem using techniques ranging from hardware to software based APIs available to application programmers. These solutions are based on the premise of locking; however, the design of such locks can be quite sophisticated.These Hardware features can make any programming task easier and improve system efficiency. Here, we present some simple hardware instructions that are available on many systems and show how they can be used effectively in solving the critical-section problem. If we could prevent interrupts from occurring while a shared variable was being modified. The critical-section problem could ... Read More

Data structures of a Windows thread

Arnab Chakraborty
Updated on 17-Oct-2019 09:10:35

474 Views

Windows implements the Windows API, which is the primary API for the family of Microsoft operating systems (Windows 98, NT, 2000, and XP, as well as Windows 7). Basically A Windows application runs as a separate process, and each process may contain one or more threads. Additionally, Windows uses the one-to-one mapping, where each user-level thread maps to an associated kernel thread. The general components of a thread include −A thread ID uniquely identifying the threadA set of register representing the status of the processorA stack of user, employed when the thread is running in user mode, and a kernel ... Read More

Lightweight process (LWP)

Arnab Chakraborty
Updated on 17-Oct-2019 09:07:48

3K+ Views

Many systems implement either the many-to-many or the two-level model place an intermediate data structure between the user and kernel threads. This data structure—typically known as a lightweight process, or LWP—is shown in below Figure. The LWP appears to be a virtual processor on which the application can schedule a user thread to run, to the user-thread library. Each Light Weight Process is attached to a kernel thread, and it is kernel threads that the operating system schedules to run on physical processors. The LWP blocks as well, if a kernel thread blocks (such as while waiting for an I/O ... Read More

Scheduler activations

Arnab Chakraborty
Updated on 17-Oct-2019 09:05:22

1K+ Views

One technique for communication between the user-thread library and the kernel is known as scheduler activation. It works as likes: The kernel provides an application with a set of virtual processors (LWPs), and the application can schedule user threads onto an available virtual processor. Moreover, the kernel must inform an application about certain events. This procedure is known as an upcall. Upcalls are handled by the thread library with an upcall handler, and upcall handlers must run on a virtual processor. One event that triggers an upcall occurs when an application thread is about to block. In this scenario, the ... Read More

Thread-local storage (TLS)

Arnab Chakraborty
Updated on 17-Oct-2019 09:03:18

741 Views

Threads share the data of the process to which it belongs to. This data sharing provides one of the benefits of multithreaded programming. However, in some circumstances, each thread might need its own copy of certain data. Such data is called thread-local storage (or TLS).For example, in a transaction-processing system, we might service each transaction in a separate thread. Each transaction might be assigned a unique identifier. To associate each thread with its unique identifier, we could use thread-local storage.It is easy to puzzle TLS with local variables. During a single function invocation only local variables are visible, whereas TLS ... Read More

Advertisements