You are on page 1of 5

Operating System

It is an interface between user computer and user hardware.


Throughput : no of task excuted per unit time.
Functions : Convenience, Efficiency, Throughput, ability to evolve.
Functionality :
Resource management
Process management (cpu scheduling)
Storage management
Memory management
Security
Types of OS : (https://www.geeksforgeeks.org/types-of-operating-
systems/?ref=lbp)
Batch : (non-preemption type)
Multi programmed os : non preemptive(i.e complete the given
whole process then go to another process)
Multi tasking/time sharing os : preemptive(like round robin
given some time i.e quantum)
Real time os :time matter,and there will be no delays,2 type
hard(flightsimulation,missile system) and soft (gaming ,livestream)
Distributed:ex facebook distributed everywhere
Clustered:ex supercomputer multiple computer connected to
one local network
Embedded: work on fixed functionality(i.e washing machine
cannot do work of oven and vice versa)
Operating System
Process states :-
New : create a process.
Long term scheduler(multiprogramming): bring process as
many process (multiprogramming) from new to ready state for
becoming ready for execution.
Ready(queue) :active state i.e store in ram for execution.
Short term scheduler : dispatch or schedule the process from
ready state to running state for execution
Running : process from ready state is dispatch or schedule for
running state to cpu for execution in ram
Terminated : after complete execution of process in running
state the process is deallocated of all resourses and get terminated.
Wait/Block : (ram queue) process go to wait state from running
state if some i/o request is made by process after completion of i/o
request its go to ready state.
Medium term scheduler : if ram is overflow or full then it send
to secondary memory and after completion it is send to ram.
Suspend wait : (secondary memory) if wait/block is overflow
i.e full then processes are send to suspend wait for i/o request in
secondary memory after completion it is then send to wait/block
state
Suspend ready : (secondary memory)as above but in ready
sate.
Backing store : if wait/block state is full processfrom suspend
wait send to ready state if its is full then in place of ready state it is
send to suspend ready for going to ready state after some time.
Operating System
Unix Command :

Fork : fork() Fork system call is used for creating a new process, which is
called child process, which runs concurrently with the process that makes
the fork() call (parent process)

Parent process representby(+ve or +1) chid process is represent by(0)


and (-ve) fork is not created or error
Fork() call n time will create 2^n-1 copy and 1 parent total equal to
2^n.
fork() call parent return +ve and for child return negative in function
like if statement in below.
Operating System

User mode and kernel moden : A processor in a computer running


Windows has two different modes: user mode and kernel mode. The
processor switches between the two modes depending on what type
of code is running on the processor. Applications run in user mode,
and core operating system components run in kernel mode.

Process vs threads
Operating System

User level thread Vs kernel level thread

Process synchronization:
1. Cooperative processes:
Share( common between process):
variable,memory,code,resources(cpu,scanner,printer)
2. Independent processes

You might also like