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.

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.

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. 

Explain the differences between TCP and UDP?

Tcp is connection oriented service which means every time you send a message you get an acknowledgment from the receiver stating the message has been received.
This is a reliable way of communication, but is slow. Think of it as a telephonic call. Only when the other side picks up the call, you can talk.

UDP is connectionless service. Like the one we use in online streaming. There is no acknowledgement in this case so the data might not be perfect at the receiver but the transmission is fast. So a few packet loss doesn’t really matters. It is like an email. You can send but you wont know if it has been read or not. Like you wont know which packets reached and which were dropped.

What is a Hypervisor?

hypervisor or virtual machine monitor (VMM) is computer software, firmware, or hardware, that creates and runs virtual machines. A computer on which a hypervisor runs one or more virtual machines is called a host machine, and each virtual machine is called a guest machine.

Hypervisor is a virtualization platform. A hypervisor is a computer software,firmware or hardware that will create and run virtual machines. On a computer with hypervisor we can run one or more virtual machines is called host machine and the virtual machines are called guest machines.

There are two types of hypervisors:

Type 1: Delivered as an integral part of Operating System


Type 2: Delivered as a process that runs within an Operating System