Hello techies, this is a presentation by my team on operating system threads..
Reference::Galvin
Hope this reference makes your learning experience well.
In this presentation, I am explaining about Threads, types of threads, its advantages and disadvantages, difference between Process and Threads, multithreading and its type.
"Like the ppt if you liked the ppt"
LinkedIn - https://in.linkedin.com/in/prakharmaurya
A thread is a portion of code that may be executed independently of the main program.
For example, a program may have an open thread waiting for a specific event to occur or running a separate job, allowing the main program to perform other tasks.
A program is capable of having multiple threads open at once and will either terminate or suspend them after a task is completed, or the program is closed.
threads and its types ....in operating system ..Nimrakhan89
There are two types of threads to be managed in a modern system: User threads and kernel threads. User threads are supported above the kernel, without kernel support. These are the threads that application programmers would put into their programs. Kernel threads are supported within the kernel of the OS itself.
In this presentation, I am explaining about Threads, types of threads, its advantages and disadvantages, difference between Process and Threads, multithreading and its type.
"Like the ppt if you liked the ppt"
LinkedIn - https://in.linkedin.com/in/prakharmaurya
A thread is a portion of code that may be executed independently of the main program.
For example, a program may have an open thread waiting for a specific event to occur or running a separate job, allowing the main program to perform other tasks.
A program is capable of having multiple threads open at once and will either terminate or suspend them after a task is completed, or the program is closed.
threads and its types ....in operating system ..Nimrakhan89
There are two types of threads to be managed in a modern system: User threads and kernel threads. User threads are supported above the kernel, without kernel support. These are the threads that application programmers would put into their programs. Kernel threads are supported within the kernel of the OS itself.
The objectives of Multithreaded programming in Operating systems are:
- To introduce the notion of a thread—a fundamental unit of CPU utilization that forms the basis of multithreaded computer systems.
- To discuss the APIs for the Pthreads, Windows, and Java thread libraries
- To explore several strategies that provide implicit threading.
- To examine issues related to multithreaded programming.
- To cover operating system support for threads in Windows and Linux.
Many user-level threads mapped to single kernel thread
One thread blocking causes all to block
Multiple threads may not run in parallel on muticore system because only one may be in kernel at a time
Few systems currently use this model
Examples:
Solaris Green Threads
GNU Portable Threads
1. What important part of the process switch operation is not shown .pdffathimaoptical
1. What important part of the process switch operation is not shown in Figure 3.4?
2. What is the operational difference between single-threaded and multi-threaded processes? i.e.,
how does it change the usage of each?
3. What kinds of operations take advantage of threads? Think of depth and breadth.
1).consider task parallelism
2).consider data parallelism
4.What is the difference between Many to One, One to One, and Many to Many models?
1).What are the benefits and constraints of each of these?
2).Provide examples of each of these
3).How does the two-level model help thread operations? process Po operating system process P
interrupt or system call executing save state into PCBo idle reload state from PCB1 dle interrupt
or system call executing save state into PCB1 idle reload state from PCB0 executing Figure 3.4
Diagram showing CPU switch from process to process.
Solution
PCB daigaram.
1.The Program control Block diagram is important ,we have PCB in the diagram,but in detail.
For each process there is a Process Control Block, PCB,
which stores the following ( types of ) process-specific information, as illustrated in Figure 3.1. (
Specific details may vary from system to system. )
•Process State - Running, waiting, etc., as discussed above.
•Process ID, and parent process ID.
•CPU registers and Program Counter - These need to be saved and restored when swapping
processes in and out of the CPU.
•CPU-Scheduling information - Such as priority information and pointers to scheduling queues.
•Memory-Management information - E.g. page tables or segment tables.
•Accounting information - user and kernel CPU time consumed, account numbers, limits, etc.
•I/O Status information - Devices allocated, open file tables, etc.
2.With a single thread process, the process runs/executes on single path.With multiple thread
process is where a process runs/executes on two or more paths.
Applications with multithreading implementation increases its responsiveness to the
application’s users, for instance;
with traditional single-threaded process implementation within a web server can serve only one
client request at a time and can make the waiting period for other users requesting services a very
long time.
With more efficient multithreaded server implementation; separate threads can be created to
respond to different users’ requests.
Multithreading technique in the above example increased the application responsiveness to the
users’ requests.
3.
Multiple Processes ,example proxy server satisfying the requests for a number of computers on a
LAN would be benefited by a multi-threaded process.
Task parallelism is the simultaneous execution on multiple cores of many different functions
across the same or different datasets.
This form of parallelism covers the execution of computer programs across multiple processors
on same or multiple machines. It focuses on executing different operations in parallel to fully
utilize the available computing resources in form of proces.
Most modern applications are multithreaded
Threads run within application
Multiple tasks with the application can be implemented by separate threads
Update display
Fetch data
Spell checking
Answer a network request
Process creation is heavy-weight while thread creation is light-weight
Can simplify code, increase efficiency
Kernels are generally multithreaded
Overview of the fundamental roles in Hydropower generation and the components involved in wider Electrical Engineering.
This paper presents the design and construction of hydroelectric dams from the hydrologist’s survey of the valley before construction, all aspects and involved disciplines, fluid dynamics, structural engineering, generation and mains frequency regulation to the very transmission of power through the network in the United Kingdom.
Author: Robbie Edward Sayers
Collaborators and co editors: Charlie Sims and Connor Healey.
(C) 2024 Robbie E. Sayers
Quality defects in TMT Bars, Possible causes and Potential Solutions.PrashantGoswami42
Maintaining high-quality standards in the production of TMT bars is crucial for ensuring structural integrity in construction. Addressing common defects through careful monitoring, standardized processes, and advanced technology can significantly improve the quality of TMT bars. Continuous training and adherence to quality control measures will also play a pivotal role in minimizing these defects.
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfKamal Acharya
The College Bus Management system is completely developed by Visual Basic .NET Version. The application is connect with most secured database language MS SQL Server. The application is develop by using best combination of front-end and back-end languages. The application is totally design like flat user interface. This flat user interface is more attractive user interface in 2017. The application is gives more important to the system functionality. The application is to manage the student’s details, driver’s details, bus details, bus route details, bus fees details and more. The application has only one unit for admin. The admin can manage the entire application. The admin can login into the application by using username and password of the admin. The application is develop for big and small colleges. It is more user friendly for non-computer person. Even they can easily learn how to manage the application within hours. The application is more secure by the admin. The system will give an effective output for the VB.Net and SQL Server given as input to the system. The compiled java program given as input to the system, after scanning the program will generate different reports. The application generates the report for users. The admin can view and download the report of the data. The application deliver the excel format reports. Because, excel formatted reports is very easy to understand the income and expense of the college bus. This application is mainly develop for windows operating system users. In 2017, 73% of people enterprises are using windows operating system. So the application will easily install for all the windows operating system users. The application-developed size is very low. The application consumes very low space in disk. Therefore, the user can allocate very minimum local disk space for this application.
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)MdTanvirMahtab2
This presentation is about the working procedure of Shahjalal Fertilizer Company Limited (SFCL). A Govt. owned Company of Bangladesh Chemical Industries Corporation under Ministry of Industries.
Event Management System Vb Net Project Report.pdfKamal Acharya
In present era, the scopes of information technology growing with a very fast .We do not see any are untouched from this industry. The scope of information technology has become wider includes: Business and industry. Household Business, Communication, Education, Entertainment, Science, Medicine, Engineering, Distance Learning, Weather Forecasting. Carrier Searching and so on.
My project named “Event Management System” is software that store and maintained all events coordinated in college. It also helpful to print related reports. My project will help to record the events coordinated by faculties with their Name, Event subject, date & details in an efficient & effective ways.
In my system we have to make a system by which a user can record all events coordinated by a particular faculty. In our proposed system some more featured are added which differs it from the existing system such as security.
3. Slide name Slide no.
Definition of Threads 4
Diagram of Single and Multithreads 5
Concepts of Multithreads 6
Benefits of Threads 7
Types of Multithreading Models 8
One-To-One 9
Many-To-One 10
Many-To-Many 11
INDEX
Note: Click on the slide name to directly land on to particular slide
4. DEFINITION OF THREADS
• A thread is a basic unit of CPU utilization, consisting of a program counter, a
stack, and a set of registers, ( and a thread ID. )
• Traditional ( heavyweight ) processes have a single thread of control - There is
one program counter, and one sequence of instructions that can be carried out
at any given time.
• Threads are very useful in modern programming whenever a process has
multiple tasks to perform independently of the others.
• This is particularly true when one of the tasks may block, and it is desired to
allow the other tasks to proceed without blocking.
6. CONCEPTS OF MULTITHREADS
• There are two types of threads exists
• User level thread
• Are supported above the kernel
• Managed without kernel support
• These are the threads that application programmers would put into their programs.
• Kernel Thread
• Supported directly by OS
• All modern OSes support kernel level threads, allowing the kernel to perform multiple
simultaneous tasks and/or to service multiple kernel system calls simultaneously.
• Windows XP, Linux, Mac OS, Solaris, True64 Unix – support kernel thread
• Furthermore, There must exist a relationship between user threads and kernel threads.
7. BENEFITS OF THREADS
• There are four major categories of benefits to multi-threading:
I. Responsiveness - One thread may provide rapid response while other threads are
blocked or slowed down doing intensive calculations.
II. Resource sharing - By default threads share common code, data, and other resources,
which allows multiple tasks to be performed simultaneously in a single address
space.
III.Economy - Creating and managing threads ( and context switches between them ) is
much faster than performing the same tasks for processes.
IV.Scalability, i.e. Utilization of multiprocessor architectures - A single threaded process
can only run on one CPU, no matter how many may be available, whereas the
execution of a multi-threaded application may be split amongst available processors.
9. ONE-TO-ONE
• The one-to-one model creates a separate
kernel thread to handle each user thread.
• One-to-one model overcomes the problems
listed above involving blocking system calls
and the splitting of processes across multiple
CPUs.
• However the overhead of managing the one-
to-one model is more significant, involving
more overhead and slowing down the system.
• Most implementations of this model place a
limit on how many threads can be created.
• Linux and Windows from 95 to XP
implement the one-to-one model for threads. Figure - One-to-one model
10. MANY-TO-ONE
• In the many-to-one model, many user-level threads
are all mapped onto a single kernel thread.
• Thread management is handled by the thread
library in user space, which is very efficient.
• However, if a blocking system call is made, then
the entire process blocks, even if the other user
threads would otherwise be able to continue.
• Because a single kernel thread can operate only on
a single CPU, the many-to-one model does not
allow individual processes to be split across
multiple CPUs.
• Green threads for Solaris and GNU Portable
Threads implement the many-to-one model in the
past, but few systems continue to do so today. Figure - Many-to-one model
11. MANY-TO-MANY
• The many-to-many model multiplexes any number of user
threads onto an equal or smaller number of kernel threads,
combining the best features of the one-to-one and many-to-
one models.
• Users have no restrictions on the number of threads created.
• Blocking kernel system calls do not block the entire process.
• Processes can be split across multiple processors.
• Individual processes may be allocated variable numbers of
kernel threads, depending on the number of CPUs present
and other factors.
• One popular variation of the many-to-many model is the
two-tier model, which allows either many-to-many or one-
to-one operation.
• IRIX, HP-UX, and Tru64 UNIX use the two-tier model, as
did Solaris prior to Solaris 9.
Figure - Many-to-many model