SlideShare uma empresa Scribd logo
1 de 26
BY
CASMOLET.J
WHAT IS AN OPERATING SYSTEM?(OS)
An operating system (OS) is a
collection of software that manages
computer hardware resources and
provides common services for
computer programs.
 The operating system is a vital
component of the system software
in a computer system. Application
programs usually require an
operating system to function.
OBJECTIVE
Operating system.
Functions and components of OS.
Types of OS.
Process and a program.
FUNCTION OF OS
Providing a user interface
Running applications
Support for built in utility
programs.
Control to the computer
hardware
COMPONENTS OF OS
• Process Management
• Memory management
• I/O Device management
• Network management
• Network services
• User Interface
TYPES OF OS
Single user,
Single Task
Single user,
Multi- tasking
Multi user, Multi-
tasking.
SINGLE USER, SINGLE TASK
• As the name implies, this operating
system is designed to manage the
computer so that one user can
effectively do one thing at a time.
The Palm OS for Palm handheld
computers is a good example of a
modern single-user, single-task
operating system
SINGLE USER MULTI-TASKING
Single user multi-tasking os allows user to perform one or more than one task at same time
Commonly os are MS windows Apples macintosh
} Microsoft Windows:
Windows is a series of operating
systems developed by Microsoft. Each
version of Windows includes a
graphical user interface, with a desktop
that allows users to view files and
folders in windows. For the past two
decades, Windows has been the most
widely used operating system for
personal computers PCs.
MacOS X:
} OS X is version 10 of the Apple
Macintosh operating system. OS X was
described by Apple as its first
“complete revision” of the
OS since the previous version is OS 9, with
a focus on modularity so that future changes
would be easier to incorporate.
 Written in c++ .c .objective -c
MULTI USER, MULTI- TASKING.
• Multi-user software is software that
allows access by multiple users of a
computer. Most batch processing
systems for mainframe computers
may also be considered "multi-user",
to avoid leaving the CPU idle while it
waits for I/O operations to complete.
However, the term "multitasking" is
more common in this context.
Advantage of OS
• Easy to use
• User friendly
• Intermediate between all
hardware's and software's of the
system
• No need to know any technical
languages
• Its the platform of all programs
Disadvantage of OS
• If any problems affected in
OS, you may lose all the
contents which have been
stored already
• Unwanted user can use your
own system
OPERATING SYSTEM FUNCTIONS
Besides managing hardware and software
resources on the system, the OS must manage
resources and memory.
There are two broad tasks to be accomplished.
An operating system is a piece of software that
manages the allocation of computer hardware.
The coordination of the hardware must be
appropriate to ensure the correct working of the
computer system and to prevent user programs
from interfering with the proper working of the
system.
OS - MEMORY STORAGE AND MANAGEMENT
Each process must have enough memory in which to
execute, and
It can neither run into the memory space of another
process,
Nor be run into by another process.
Memory management is the process of controlling and
coordinating computer memory, assigning portions
called blocks to various running programs to optimize
overall system performance. Memory
management resides in hardware, in the OS (operating
system), and in programs and applications.
PROGRAM EXECUTION
 Operating systems handle many kinds of activities
from user programs to system programs like printer
spooler, name servers, file server, etc. Each of these
activities is encapsulated as a process.
 A process includes the complete execution context
(code to execute, data to manipulate, registers, OS
resources in use). Following are the major activities of
an operating system with respect to program
management −
 Loads a program into memory.
 Executes the program.
 Handles program's execution.
 Provides a mechanism for process synchronization.
 Provides a mechanism for process communication.
 Provides a mechanism for deadlock handling.
FILE SYSTEM MANIPULATION
 A file represents a collection of related information. Computers can store files on the disk
(secondary storage), for long-term storage purpose. Examples of storage media include
magnetic tape, magnetic disk and optical disk drives like CD, DVD. Each of these media has
its own properties like speed, capacity, data transfer rate and data access methods.
 A file system is normally organized into directories for easy navigation and usage. These
directories may contain files and other directions. Following are the major activities of an
operating system with respect to file management −
 Program needs to read a file or write a file.
 The operating system gives the permission to the program for operation on file.
 Permission varies from read-only, read-write, denied and so on.
 Operating System provides an interface to the user to create/delete files.
 Operating System provides an interface to the user to create/delete directories.
 Operating System provides an interface to create the backup of file system.
PROCESS SCHEDULING QUEUES
• Job queue − This queue keeps all
the processes in the system.
• Ready queue − This queue keeps a
set of all processes residing in main
memory, ready and waiting to
execute. A new process is always put
in this queue.
• Device queues − The processes
which are blocked due to
unavailability of an I/O device
constitute this queue.
THREAD
 A thread is a flow of execution through the process code, with its own program counter that keeps
track of which instruction to execute next, system registers which hold its current working
variables, and a stack which contains the execution history.
 A thread shares with its peer threads few information like code segment, data segment and open
files. When one thread alters a code segment memory item, all other threads see that.
 A thread is also called a lightweight process. Threads provide a way to improve application
performance through parallelism. Threads represent a software approach to improving performance
of operating system by reducing the overhead thread is equivalent to a classical process.
 Each thread belongs to exactly one process and no thread can exist outside a process. Each thread
represents a separate flow of control. Threads have been successfully used in implementing
network servers and web server. They also provide a suitable foundation for parallel execution of
applications on shared memory multiprocessors. The following figure shows the working of a
single-threaded and a multithreaded process.
TYPES OF THREAD
• User Level Threads − User managed
threads.
• Kernel Level Threads − Operating
System managed threads acting on
kernel, an operating system core.
USER LEVEL THREADS
• In this case, the thread management kernel is not aware of
the existence of threads. The thread library contains code for
creating and destroying threads, for passing message and
data between threads, for scheduling thread execution and
for saving and restoring thread contexts. The application
starts with a single thread.
• Thread switching does not require Kernel mode privileges.
• User level thread can run on any operating system.
• Scheduling can be application specific in the user level
thread.
• User level threads are fast to create and manage.
• In a typical operating system, most system calls are
blocking.
KERNEL LEVEL THREADS
• In this case, thread management is done by the Kernel. There is no
thread management code in the application area. Kernel threads are
supported directly by the operating system. Any application can be
programmed to be multithreaded. All of the threads within an
application are supported within a single process.
• The Kernel maintains context information for the process as a whole
and for individuals threads within the process. Scheduling by the
Kernel is done on a thread basis. The Kernel performs thread
creation, scheduling and management in Kernel space. Kernel threads
are generally slower to create and manage than the user threads.
MULTITHREADING MODELS
• Some operating system provide a combined user level thread and
Kernel level thread facility. Solaris is a good example of this
combined approach. In a combined system, multiple threads within
the same application can run in parallel on multiple processors and
a blocking system call need not block the entire process.
Multithreading models are three types
1. Many to many relationship.
2. Many to one relationship.
3. One to one relationship.
MANY TO MANY MODEL
• The many-to-many model multiplexes any number of
user threads onto an equal or smaller number of
kernel threads.
• The following diagram shows the many-to-many
threading model where 6 user level threads are
multiplexing with 6 kernel level threads. In this
model, developers can create as many user threads
as necessary and the corresponding Kernel threads
can run in parallel on a multiprocessor machine. This
model provides the best accuracy on concurrency
and when a thread performs a blocking system call,
the kernel can schedule another thread for
execution.
MANY TO ONE MODEL
• Many-to-one model maps many user level
threads to one Kernel-level thread. Thread
management is done in user space by the
thread library. When thread makes a blocking
system call, the entire process will be blocked.
Only one thread can access the Kernel at a
time, so multiple threads are unable to run in
parallel on multiprocessors.
• If the user-level thread libraries are
implemented in the operating system in such a
way that the system does not support them,
then the Kernel threads use the many-to-one
relationship modes
ONE TO ONE MODEL
• There is one-to-one relationship of
user-level thread to the kernel-level
thread. This model provides more
concurrency than the many-to-one
model. It also allows another thread to
run when a thread makes a blocking
system call. It supports multiple threads
to execute in parallel on
microprocessors.
• Disadvantage of this model is that
creating user thread requires the
corresponding Kernel thread. OS/2,
windows NT and windows 2000 use
one to one relationship model.
Epc 3.ppt

Mais conteúdo relacionado

Mais procurados

Lecture 3,4 operating systems
Lecture 3,4   operating systemsLecture 3,4   operating systems
Lecture 3,4 operating systems
Pradeep Kumar TS
 
1 types of operating system
1 types of operating system1 types of operating system
1 types of operating system
MrsNunn
 
Operating systems
Operating systemsOperating systems
Operating systems
anishgoel
 

Mais procurados (19)

Operating Systems FYBSC IT UNIT I- Introduction to Operating Systems
Operating Systems FYBSC IT UNIT I- Introduction to Operating SystemsOperating Systems FYBSC IT UNIT I- Introduction to Operating Systems
Operating Systems FYBSC IT UNIT I- Introduction to Operating Systems
 
4 various operating systems
4 various operating systems4 various operating systems
4 various operating systems
 
Operating system
Operating systemOperating system
Operating system
 
INTRODUCTION TO OPERATING SYSTEM
INTRODUCTION TO OPERATING SYSTEMINTRODUCTION TO OPERATING SYSTEM
INTRODUCTION TO OPERATING SYSTEM
 
Operating system lecture1
Operating system lecture1Operating system lecture1
Operating system lecture1
 
Presentation simulation
Presentation simulationPresentation simulation
Presentation simulation
 
operating system
operating systemoperating system
operating system
 
Operating System concepts
Operating System conceptsOperating System concepts
Operating System concepts
 
lecture 1 (Introduction to Operating System.)
lecture 1 (Introduction to Operating System.)lecture 1 (Introduction to Operating System.)
lecture 1 (Introduction to Operating System.)
 
1 introduction
1 introduction1 introduction
1 introduction
 
Lecture 3,4 operating systems
Lecture 3,4   operating systemsLecture 3,4   operating systems
Lecture 3,4 operating systems
 
Types of os
Types of osTypes of os
Types of os
 
1 types of operating system
1 types of operating system1 types of operating system
1 types of operating system
 
Operating System
Operating SystemOperating System
Operating System
 
Operating systems
Operating systemsOperating systems
Operating systems
 
OSCh4
OSCh4OSCh4
OSCh4
 
Threads
ThreadsThreads
Threads
 
lecture 1 (Part 2) kernal and its categories
lecture 1 (Part 2) kernal and its categorieslecture 1 (Part 2) kernal and its categories
lecture 1 (Part 2) kernal and its categories
 
Operating Systems A-Z
Operating Systems A-ZOperating Systems A-Z
Operating Systems A-Z
 

Semelhante a Epc 3.ppt

week-1-200310134908.pptx
week-1-200310134908.pptxweek-1-200310134908.pptx
week-1-200310134908.pptx
ssuser5c874e
 
Operating system (OS) itself is a process, what approaches are there.pdf
Operating system (OS) itself is a process, what approaches are there.pdfOperating system (OS) itself is a process, what approaches are there.pdf
Operating system (OS) itself is a process, what approaches are there.pdf
JUSTSTYLISH3B2MOHALI
 
operatinndnd jdj jjrg-system-1(1) (1).pptx
operatinndnd jdj jjrg-system-1(1) (1).pptxoperatinndnd jdj jjrg-system-1(1) (1).pptx
operatinndnd jdj jjrg-system-1(1) (1).pptx
krishnajoshi70
 

Semelhante a Epc 3.ppt (20)

week-1-200310134908.pptx
week-1-200310134908.pptxweek-1-200310134908.pptx
week-1-200310134908.pptx
 
Operating System DOS and Windows
Operating System DOS and WindowsOperating System DOS and Windows
Operating System DOS and Windows
 
os unit 1 (2).pptx. introduction to operating systems
os unit 1 (2).pptx. introduction to operating systemsos unit 1 (2).pptx. introduction to operating systems
os unit 1 (2).pptx. introduction to operating systems
 
SISTEMAS OPERATIVOS.pptx
SISTEMAS OPERATIVOS.pptxSISTEMAS OPERATIVOS.pptx
SISTEMAS OPERATIVOS.pptx
 
Operating system (OS) itself is a process, what approaches are there.pdf
Operating system (OS) itself is a process, what approaches are there.pdfOperating system (OS) itself is a process, what approaches are there.pdf
Operating system (OS) itself is a process, what approaches are there.pdf
 
OS UNIT1.pptx
OS UNIT1.pptxOS UNIT1.pptx
OS UNIT1.pptx
 
operatinndnd jdj jjrg-system-1(1) (1).pptx
operatinndnd jdj jjrg-system-1(1) (1).pptxoperatinndnd jdj jjrg-system-1(1) (1).pptx
operatinndnd jdj jjrg-system-1(1) (1).pptx
 
Operating Systems & Applications
Operating Systems & ApplicationsOperating Systems & Applications
Operating Systems & Applications
 
EMBEDDED OS
EMBEDDED OSEMBEDDED OS
EMBEDDED OS
 
os_1.pdf
os_1.pdfos_1.pdf
os_1.pdf
 
introduction to Operating system for computer science Program
introduction to Operating system for computer science Programintroduction to Operating system for computer science Program
introduction to Operating system for computer science Program
 
Unit 1 q&a
Unit  1 q&aUnit  1 q&a
Unit 1 q&a
 
Symmetric multiprocessing and Microkernel
Symmetric multiprocessing and MicrokernelSymmetric multiprocessing and Microkernel
Symmetric multiprocessing and Microkernel
 
Nt introduction(os)
Nt introduction(os)Nt introduction(os)
Nt introduction(os)
 
Os
OsOs
Os
 
Os
OsOs
Os
 
OperatingSystemFeature.pptx
OperatingSystemFeature.pptxOperatingSystemFeature.pptx
OperatingSystemFeature.pptx
 
Basics of Operating System
Basics of Operating SystemBasics of Operating System
Basics of Operating System
 
Bedtime Stories on Operating Systems.pdf
Bedtime Stories on Operating Systems.pdfBedtime Stories on Operating Systems.pdf
Bedtime Stories on Operating Systems.pdf
 
1. Introduction to OS.ppt
1. Introduction to OS.ppt1. Introduction to OS.ppt
1. Introduction to OS.ppt
 

Último

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 

Último (20)

Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 

Epc 3.ppt

  • 2. WHAT IS AN OPERATING SYSTEM?(OS) An operating system (OS) is a collection of software that manages computer hardware resources and provides common services for computer programs.  The operating system is a vital component of the system software in a computer system. Application programs usually require an operating system to function.
  • 3. OBJECTIVE Operating system. Functions and components of OS. Types of OS. Process and a program.
  • 4. FUNCTION OF OS Providing a user interface Running applications Support for built in utility programs. Control to the computer hardware
  • 5. COMPONENTS OF OS • Process Management • Memory management • I/O Device management • Network management • Network services • User Interface
  • 6. TYPES OF OS Single user, Single Task Single user, Multi- tasking Multi user, Multi- tasking.
  • 7. SINGLE USER, SINGLE TASK • As the name implies, this operating system is designed to manage the computer so that one user can effectively do one thing at a time. The Palm OS for Palm handheld computers is a good example of a modern single-user, single-task operating system
  • 8.
  • 9. SINGLE USER MULTI-TASKING Single user multi-tasking os allows user to perform one or more than one task at same time Commonly os are MS windows Apples macintosh } Microsoft Windows: Windows is a series of operating systems developed by Microsoft. Each version of Windows includes a graphical user interface, with a desktop that allows users to view files and folders in windows. For the past two decades, Windows has been the most widely used operating system for personal computers PCs. MacOS X: } OS X is version 10 of the Apple Macintosh operating system. OS X was described by Apple as its first “complete revision” of the OS since the previous version is OS 9, with a focus on modularity so that future changes would be easier to incorporate.  Written in c++ .c .objective -c
  • 10. MULTI USER, MULTI- TASKING. • Multi-user software is software that allows access by multiple users of a computer. Most batch processing systems for mainframe computers may also be considered "multi-user", to avoid leaving the CPU idle while it waits for I/O operations to complete. However, the term "multitasking" is more common in this context.
  • 11. Advantage of OS • Easy to use • User friendly • Intermediate between all hardware's and software's of the system • No need to know any technical languages • Its the platform of all programs Disadvantage of OS • If any problems affected in OS, you may lose all the contents which have been stored already • Unwanted user can use your own system
  • 12. OPERATING SYSTEM FUNCTIONS Besides managing hardware and software resources on the system, the OS must manage resources and memory. There are two broad tasks to be accomplished. An operating system is a piece of software that manages the allocation of computer hardware. The coordination of the hardware must be appropriate to ensure the correct working of the computer system and to prevent user programs from interfering with the proper working of the system.
  • 13. OS - MEMORY STORAGE AND MANAGEMENT Each process must have enough memory in which to execute, and It can neither run into the memory space of another process, Nor be run into by another process. Memory management is the process of controlling and coordinating computer memory, assigning portions called blocks to various running programs to optimize overall system performance. Memory management resides in hardware, in the OS (operating system), and in programs and applications.
  • 14. PROGRAM EXECUTION  Operating systems handle many kinds of activities from user programs to system programs like printer spooler, name servers, file server, etc. Each of these activities is encapsulated as a process.  A process includes the complete execution context (code to execute, data to manipulate, registers, OS resources in use). Following are the major activities of an operating system with respect to program management −  Loads a program into memory.  Executes the program.  Handles program's execution.  Provides a mechanism for process synchronization.  Provides a mechanism for process communication.  Provides a mechanism for deadlock handling.
  • 15. FILE SYSTEM MANIPULATION  A file represents a collection of related information. Computers can store files on the disk (secondary storage), for long-term storage purpose. Examples of storage media include magnetic tape, magnetic disk and optical disk drives like CD, DVD. Each of these media has its own properties like speed, capacity, data transfer rate and data access methods.  A file system is normally organized into directories for easy navigation and usage. These directories may contain files and other directions. Following are the major activities of an operating system with respect to file management −  Program needs to read a file or write a file.  The operating system gives the permission to the program for operation on file.  Permission varies from read-only, read-write, denied and so on.  Operating System provides an interface to the user to create/delete files.  Operating System provides an interface to the user to create/delete directories.  Operating System provides an interface to create the backup of file system.
  • 16. PROCESS SCHEDULING QUEUES • Job queue − This queue keeps all the processes in the system. • Ready queue − This queue keeps a set of all processes residing in main memory, ready and waiting to execute. A new process is always put in this queue. • Device queues − The processes which are blocked due to unavailability of an I/O device constitute this queue.
  • 17. THREAD  A thread is a flow of execution through the process code, with its own program counter that keeps track of which instruction to execute next, system registers which hold its current working variables, and a stack which contains the execution history.  A thread shares with its peer threads few information like code segment, data segment and open files. When one thread alters a code segment memory item, all other threads see that.  A thread is also called a lightweight process. Threads provide a way to improve application performance through parallelism. Threads represent a software approach to improving performance of operating system by reducing the overhead thread is equivalent to a classical process.  Each thread belongs to exactly one process and no thread can exist outside a process. Each thread represents a separate flow of control. Threads have been successfully used in implementing network servers and web server. They also provide a suitable foundation for parallel execution of applications on shared memory multiprocessors. The following figure shows the working of a single-threaded and a multithreaded process.
  • 18.
  • 19. TYPES OF THREAD • User Level Threads − User managed threads. • Kernel Level Threads − Operating System managed threads acting on kernel, an operating system core.
  • 20. USER LEVEL THREADS • In this case, the thread management kernel is not aware of the existence of threads. The thread library contains code for creating and destroying threads, for passing message and data between threads, for scheduling thread execution and for saving and restoring thread contexts. The application starts with a single thread. • Thread switching does not require Kernel mode privileges. • User level thread can run on any operating system. • Scheduling can be application specific in the user level thread. • User level threads are fast to create and manage. • In a typical operating system, most system calls are blocking.
  • 21. KERNEL LEVEL THREADS • In this case, thread management is done by the Kernel. There is no thread management code in the application area. Kernel threads are supported directly by the operating system. Any application can be programmed to be multithreaded. All of the threads within an application are supported within a single process. • The Kernel maintains context information for the process as a whole and for individuals threads within the process. Scheduling by the Kernel is done on a thread basis. The Kernel performs thread creation, scheduling and management in Kernel space. Kernel threads are generally slower to create and manage than the user threads.
  • 22. MULTITHREADING MODELS • Some operating system provide a combined user level thread and Kernel level thread facility. Solaris is a good example of this combined approach. In a combined system, multiple threads within the same application can run in parallel on multiple processors and a blocking system call need not block the entire process. Multithreading models are three types 1. Many to many relationship. 2. Many to one relationship. 3. One to one relationship.
  • 23. MANY TO MANY MODEL • The many-to-many model multiplexes any number of user threads onto an equal or smaller number of kernel threads. • The following diagram shows the many-to-many threading model where 6 user level threads are multiplexing with 6 kernel level threads. In this model, developers can create as many user threads as necessary and the corresponding Kernel threads can run in parallel on a multiprocessor machine. This model provides the best accuracy on concurrency and when a thread performs a blocking system call, the kernel can schedule another thread for execution.
  • 24. MANY TO ONE MODEL • Many-to-one model maps many user level threads to one Kernel-level thread. Thread management is done in user space by the thread library. When thread makes a blocking system call, the entire process will be blocked. Only one thread can access the Kernel at a time, so multiple threads are unable to run in parallel on multiprocessors. • If the user-level thread libraries are implemented in the operating system in such a way that the system does not support them, then the Kernel threads use the many-to-one relationship modes
  • 25. ONE TO ONE MODEL • There is one-to-one relationship of user-level thread to the kernel-level thread. This model provides more concurrency than the many-to-one model. It also allows another thread to run when a thread makes a blocking system call. It supports multiple threads to execute in parallel on microprocessors. • Disadvantage of this model is that creating user thread requires the corresponding Kernel thread. OS/2, windows NT and windows 2000 use one to one relationship model.