Skip to main content

Posts

Showing posts from December, 2020

Application Of Threads

  Application Of Threads This section discuss various implementation of threads. Multithreading concepts are implemented by pthread (POSIX standard), solaris, linux, window 2000 and java. 1. POSIX THREAD(Pthreads) ·          Pthread refers to the POSIX standard(IEEE 1003.IC) that defines an API for thread creation and sychronisation. ·          Prior to the of POSIX THREADS, each hardware vendor implemented their own version of threads. ·          As each implemented from the other, writing portable multithreaded application was difficult. Thus POSIX standardize the API for thread management. ·          The current Pthread API is defined only for C programming language and it is implemented as function with a header file Pthread.h and thread library. ·          The naming convention for Pthreads is well defined and the prefix of all the object or function is PTHREAD.                 Solaries Threads ·          Solaries 2 is a version of UNIX, that implements Pthreads AP

Thread Synchronisation Issues

Thread Synchronisation Issues Concurrency and Synchronisation When multiple threads access shared resources such that some of them modify a resource and others are reading that resource then we will face all sorts of data consistency problem due to synchronisation issues among threads. For example, if thread A reads shared data which is later changed by thread B and thread A is unaware of this change. Let’s first define some terms before jumping into details – Synchronisation  : using atomic operations to ensure correct operation of cooperating threads. Critical section  : a section of code, or collection of operations, in which only one thread may be executing at a given time. E.g. shopping. Mutual exclusion  : mechanisms used to create critical sections (ensure that only one thread is doing certain things at a given time). However, synchronisation can introduce thread contention, which occurs when two or more threads try to access the same resource simultaneously and cause the Java r

Thread

Thread What is Thread? A thread is a flow of execution through the process code, with its own program counter that keeps track of which instruction to execute next, system registers which hold its current working variables, and a stack which contains the execution history. A thread shares with its peer threads few information like code segment, data segment and open files. When one thread alters a code segment memory item, all other threads see that. A thread is also called a  lightweight process . Threads provide a way to improve application performance through parallelism. Threads represent a software approach to improving performance of operating system by reducing the overhead thread is equivalent to a classical process. Each thread belongs to exactly one process and no thread can exist outside a process. Each thread represents a separate flow of control. Threads have been successfully used in implementing network servers and web server. They also provide a suitable foundation for

Easytolearn E-book 2

                                                                                                                                                                          Description:here we give you pdf. about classification of operating system in which  we provide all information of classification in detail.  

Process Scheduling and Process Scheduling Queues

 Process Scheduling Definition The process scheduling is the activity of the process manager that handles the removal of the running process from the CPU and the selection of another process on the basis of a particular strategy. Process scheduling is an essential part of a Multi programming operating systems. Such operating systems allow more than one process to be loaded into the executable memory at a time and the loaded process shares the CPU using time multiplexing. Process scheduling contains the subsequent sub-functions: 1. Scheduling:   Chooses the process to be executed next on the CPU. The scheduling function uses information from the Process Control Block's and selects a process based upon the scheduling policy in force. 2. Dispatching:   Sets up execution of the chosen process on the CPU. Such function involves setting up the execution environment of the process that are selected, and loading information from the PSR and registers fields of the selected into the CPU. 3.

Suspend a process

  Suspend a process A process is an active program. It can also be said as 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 passes through different states as it executes. These states may be different in different operating systems. However, the common process states are explained below with the help of a diagram − New This is the state when the process has just been created. It is the initial state in the process life cycle. Ready In the ready state, the process is waiting to be assigned the processor by the short term scheduler, so it can run. This state is immediately after the new state for the process. Ready Suspended The processes in ready suspended state are in secondary memory. They were initially in the ready state in main memory but lack of memory forced them to be suspended and gets placed in the secondary