Showing posts with label Operating System. Show all posts
Showing posts with label Operating System. Show all posts

Tuesday, September 26, 2017

Different states of a PROCESS

As a process executes it changes its state. The state of a process is defined in part by the current activity of that process. A process may be in one of the following states.


  • New : The process is being created.
  • Running : Instructions are being executed.
  • Waiting : The process is waiting for some event to occur.
  • Ready: The process is waiting to be assigned to a processor.
  • Terminated: The process has finished execution.

The state diagram gives you the detailed understanding on how the process changes its state.



Saturday, August 5, 2017

What is an Operating System

An operating system is a program or programs that act as a intermediary between user of computer and hardware of computer.

Operating systems mainly for making computer hardware to be used in an efficient manner, make the computer system convenient to use and also solve user problems in easier way.


Friday, August 4, 2017

Describe the terms regarding Operating Systems a)Concurrency b)Parallelism

Concurrency:

The term concurrency refers to techniques that makes program more usable. Concurrency can be implemented and is used a lot on single processing units nonetheless it may benefit from multiple processing units with respect to speed.If we can load multiple documents simultaneously in the tabs of our browser and still can open other applications and perform actions,this is concurrency.


Single Core

T1
T2
T3
T4
T1
T2
T3
T4




                              -------------------------------------------->  time


Concurrency on Single Core



Parallelism:

The term parallelism refers to techniques to make programs faster by performing several computations in parallel. Graphic computations on GPU are parallelism is reduce data dependencies in order to be able to perform computations on independent computation units with minimal communication between them.

Parallelism on Multi Core

Core 1  
T1
T3
T1
T3
T1
T3
T1
T3






Core 2
T2
T4
T2
T4
T2
T4
T2
T4





                              --------------------------------> time 


Difference between threads and processes


  • Processes and threads are independent sequences of  execution ,the typical difference is that threads run in a shared memory space while processes run in separate memory spaces.
  • A process has self contained execution environment that means it has a complete, private set of basic run time resources particularly each process has its own memory space. Threads exist within a process and every process has at least one thread.
  • Each process provides the resources needed to execute a program. Each process is started with a single thread known as primary thread. A process can have multiple threads in addition to the primary thread.
  • Threads have direct access to the data segment of its process but processes have their own copy of the data segment of parent process.
  • Changes made to main thread may affect the behavior of the other threads of process while changes to parent process does not affect child process.
  • Processes are heavily dependent on system resources available while threads require minimal amounts of resource so a process is considered heavyweight while thread is considered a light weight process. 

Call a function in child component from parent component in React

Consider the following parent component class Parent extends React.Component { constructor(props) { super(props);         thi...