0% found this document useful (0 votes)
46 views15 pages

Presentation ON Operating System

The document discusses operating systems and process scheduling algorithms. It defines an operating system as the interface between hardware and users/applications, and notes operating systems have subsystems that manage processes, memory, files, I/O and networking. Process scheduling algorithms like First Come First Serve (FCFS) and Shortest Job First (SJF) are then introduced and examples are provided to calculate turnaround time and wait time.

Uploaded by

Vishesh Vij
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views15 pages

Presentation ON Operating System

The document discusses operating systems and process scheduling algorithms. It defines an operating system as the interface between hardware and users/applications, and notes operating systems have subsystems that manage processes, memory, files, I/O and networking. Process scheduling algorithms like First Come First Serve (FCFS) and Shortest Job First (SJF) are then introduced and examples are provided to calculate turnaround time and wait time.

Uploaded by

Vishesh Vij
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 15

PRESENTATION ON OPERATING SYSTEM

What is operating system


Operating system is the program that act as interface between the user and the computer hardware. They sit between the user and the hardware of the computer providing an operational environment to the users and application programs. For a user, therefore, a computer is nothing but the operating systems running on it. It is extended machine.

Components
An operating system performs large number of functions. Each function is carried out by a component of the operating system called its subsystems. The typical components of an operating system are :
1. Process management sub-system 2. Memory management sub-system 3. File management sub-system 4. I/O system management sub-system 5. Secondary storage management sub-system 6. Network management sub sys-system

PCB ( Process Control Block)


A process is created by another process through the create system call . The processes so created are said to be children process of the original process, which in turn is known as parent process. This gives rise to a hierarchical structure of the processes existing in a system. The first process created in the system is operating system itself. At any moment the processes form a tree structure of hierarch, as shown in figure.

Root

Pagedaemon

Swapper

Init

User 1

User 2

User 3

Proc 1

Proc 2

Proc 3

Process states
The current activity of a process is known as its state. As a process executes, its state changes. A process can exist 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 has acquired the required resources and is waiting to be assigned to a processor. Terminated The process has finished execution.

FCFS (First Come First Serve)


This scheme can be easily implemented using a queue data structure. The processes are queued up by enqueuer in the order of their arrival at the tail of the queue. Whenever, the CPU is available, the dispatcher removes a process from the head of the queue and schedules it to the CPU. Although simple, the scheme is often characterized by relatively longer wait time. Let us consider an example of the following processes with their respective CPU time requests assume P1 to be at the head of the queue:

Process :
Burst time:

P1 P2 P3 P4
6 8 7 3

P1

P2

P3

P4

14

21

24

Turn around time for process P1=6 Turn around time for process P2=6+8=14

Turn around time for process P3=14+7=21


Turn around time for process P4=21+3=24 Average turnaround time 6+14+21+24=65/4 16.25milliseconds

Wait time for process P1=0 Wait time for process P2=0+6=6 Wait time for process P3=6+8=14 Wait time for process P4=14+7=21 Average wait time =0+6+14+21=41/4 10.25 milliseconds.

SJF (Shortest Job First)


This algorithm associates with each process the length of the number of CPU bursts needed by it for its execution. The process having the smallest next CPU burst is allocated the CPU whenever it is available next. In case there is a tie, FCFS scheme is employed to break the tie.

Process: Burst time: P4 P1

P1 6

P2 8

P3 7 P3

P4 3 P2

16

24

Turn around time for process P1=3+6=9 Turn around time for process P2=16+8=24 Turn around time for process P3=9+7=16 Turn around time for process P4=3 Average turnaround time 3+16+24+9=52/4 13 milliseconds

Wait time for process P1=0+3=3 Wait time for process P2=9+7=16 Wait time for process P3=3+6=9 Wait time for process P4=0 Average wait time = 0+9+16+3=28 7 milliseconds

THANK YOU

You might also like