Lecture 1 & 2

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 28

Operating System

Purpose of an operating system


• Acts as an intermediary between the user of a computer and
computer hardware.

• Provide an environment in which a user can execute


programs conveniently and efficiently.

•  Software that manages computer hardware.


Definitions....
1. An operating system is a program that controls the
execution of application programs and acts as an interface
between the user of a computer and the computer hardware.

2. A more common definition is that the operating system is


the one program running at all times on the computer
(usually called the kernel), with all else being application
programs.
Functions of Operating system
1.Convenience: An OS makes a computer more convenient to
use.
2.Efficiency: An OS allows the computer system resources to
be used efficiently.
3.Ability to Evolve: An OS should be constructed in such a
way as to permit the effective development, testing, and
introduction of new system functions at the same time
without interfering with service.
4.Throughput: An OS should be constructed so that It can
give maximum throughput(Number of tasks per unit time).
Major Functionalities of Operating
System:
• Resource Management: 

• Process Management: 

• Storage Management:

• Memory Management: 

• Security/Privacy Management: 
•The process operating system as User Interface: 
1.User
2.System and application programs OS is designed to serve two
basic purposes:
3.Operating system
1.It controls the allocation and
4.Hardware use of the computing System’s
resources among the various
user and tasks.
2.It provides an interface
between the computer hardware
and the programmer that
simplifies and makes it feasible
for coding, creation, debugging
of application programs.
Task to be followed by Operating system
1.Provides the facilities to create, modification of programs
and data files using an editor.
2.Access to the compiler for translating the user program from
high-level language to machine language.
3.Provide a loader program to move the compiled program
code to the computer’s memory for execution.
4.Provide routines that handle the details of I/O programming.
1.I/O System Management

2.Assembler 

3.Compiler

4.Loader
Types of Operating System
1.Batch Operating System
2.Time-sharing operating System
3.Distributed operating System
4.Network operating system
5.Real-time operating system
Batch Operating System
Time-Sharing Operating Systems
Distributed operating System
Network operating system
Real-time operating system
Process Life Cycle in Operating System OS
1.Process life cycle in OS is one of the five states in which a
process can be starting from the time it has been submitted
for execution, till the time when it has been executed by the
system. A process can be in any of the following states –
2.New state
3.Ready state
4.Running state
5.Waiting state
6.Terminated
• Imagine a unit process that executes a simple addition
operation and prints it.
• Process Queue
• New State
• Process it submitted to the process queue, it in turns
acknowledges submission.
• Once submission is acknowledged, the process is given new
status.
• Ready State
• It then goes to Ready State, at this moment the process is
waiting to be assigned a processor by the OS
• Running State
• Once the Processor is assigned, the process is being executed
and turns in Running State.
Wait and Termination State
Thread in Operating System

• What is a Thread? • Why Multithreading?


A thread is a path of - A thread is also known as lightweight
execution within a process.
process. A process can - The idea is to achieve parallelism by
contain multiple dividing a process into multiple threads.
threads. -For example, in a browser, multiple tabs can
be different threads. MS Word uses
multiple threads: one thread to format the
text, another thread to process inputs, etc.
Process vs Thread?
Advantages of Thread over Process
1. Responsiveness
2. Faster context switch
3. Effective utilization of multiprocessor system
4. Resource sharing
5. Communication
6. Enhanced throughput of the system
Threads and its types in Operating System

• User Level thread (ULT) – • Kernel Level Thread (KLT)


- Implemented in the user level - Kernel knows and manages
library. the threads.
- Thread switching does not - Here kernel itself has thread
need to call OS table (a master one) that
- Kernel doesn’t know about keeps track of all the threads.
the user level thread and - In addition kernel also
manages them as if they were maintains the traditional
single-threaded processes. process table to keep track of
the processes.
Multithreading in Operating System
Benefits of Multithreading in Operating System

• The benefits of multi threaded programming can be broken down into four
major categories:
1.Responsiveness
2.Resource Sharing
3.Economy
4.Scalability
kaustubhdesale8500@gmail.com
inamdarshahid46@gmail.com
pranavpandya60@gmail.com

Circuit students:
raorupesh24@gmail.com

You might also like