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

Module-1

Operating system
Operating Systems
• An operating system acts as an intermediary
between the user of a computer and
computer hardware.
• The purpose of an operating system is to
provide an environment in which a user can
execute programs conveniently and
efficiently.
• An operating system is a program that controls the
execution of application programs and acts as an
interface between the user of a computer
• An operating system is concerned with the allocation of
resources and services, such as memory, processors,
devices, and information.
• The operating system correspondingly includes
programs to manage these resources, such as a traffic
controller, a scheduler, a memory management module,
I/O programs, and a file system.er and the computer
hardware.
Features of Operating system – Operating
system has the following features:

• Convenience: An OS makes a computer more convenient


to use.
• Efficiency: An OS allows the computer system resources
to be used efficiently.
• 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.
• 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:
Conceptual view of a computer system
Types of Operating Systems –

• Batch Operating System- Sequence of jobs in a program on


a computer without manual interventions.
• Time-sharing operating System- allows many users to share
computer resources. (Max utilization of the resources).
• Distributed operating System- Manages a group of different
computers and makes appear to be a single computer.
• Network operating system- computers running in different
operating systems can participate in a common network (It
is used for security purposes).
• Real-time operating system – used where any or all the jobs
have strict time constraints.
Examples of Operating Systems are –

• Windows (GUI-based, PC)


• Linux (Personal, Workstations, ISP, File and print
server, Three-tier client/Server)
• macOS (Macintosh), used for Apple’s personal
computers and workstations (MacBook, iMac).
• Android (Google’s Operating System for
smartphones/tablets/smartwatches)
• iOS (Apple’s OS for iPhone, iPad, and iPod
Touch)
Threads and its types in Operating System

• Thread is a single sequence stream within a


process.
• Threads have same properties as of the
process so they are called as light weight
processes. Threads are executed one after
another but gives the illusion as if they are
executing in parallel.
Each thread has different states. Each
thread has

• A program counter
• A register set
• A stack space
Similarity between Threads and Processes –

• Only one thread or process is active at a time


• Within process both execute sequential
• Both can create children
Types of Threads:

• User Level thread (ULT)


• Kernel Level Thread (KLT)
What is a process?

• In computing, a process is the instance of a


computer program that is being executed by
one or many threads. It contains the program
code and its activity. Depending on the
operating system (OS), a process may be
made up of multiple threads of execution that
execute instructions concurrently.
How is process memory used for efficient operation?

• The process memory is divided into four sections for


efficient operation:
• The text category is composed of integrated program code,
which is read from fixed storage when the program is
launched.
• The data class is made up of global and static variables,
distributed and executed before the main action.
• Heap is used for flexible, or dynamic memory allocation
and is managed by calls to new, delete, malloc, free, etc.
• The stack is used for local variables. The space in the stack
is reserved for local variables when it is announced.
What does a process look like in memory?
States of Process: A process is in one of the following states:
• New: Newly Created Process (or) being-created process.
• 2. Ready: After creation process moves to Ready state,
i.e. the process is ready for execution.
• 3. Run: Currently running process in CPU (only one
process at a time can be under execution in a single
processor).
• 4. Wait (or Block): When a process requests I/O access.
• 5. Complete (or Terminated): The process completed its
execution.
• 6. Suspended Ready: When the ready queue becomes
full, some processes are moved to suspended ready state
• 7. Suspended Block: When waiting queue becomes full.
What is Process Scheduling?

• Process Scheduling is the process of the process


manager handling the removal of an active
process from the CPU and selecting another
process based on a specific strategy.
• Process Scheduling is an integral part of Multi-
programming applications. Such operating
systems allow more than one process to be
loaded into usable memory at a time and the
loaded shared CPU process uses repetition time.
What are the different types of CPU
Scheduling Algorithms?
• There are mainly two types of scheduling methods:
• Preemptive Scheduling: Preemptive scheduling is
used when a process switches from running state
to ready state or from the waiting state to the
ready state.
• Non-Preemptive Scheduling: Non-Preemptive
scheduling is used when a process terminates , or
when a process switches from running state to
waiting state.
Different types of CPU Scheduling
Algorithms

You might also like