0% found this document useful (0 votes)
4 views

OSY MICRO PROJECT

The project report on 'Threads' explores multithreading concepts, benefits, and methodologies for implementation in computer engineering. It outlines the aims of skill development and real-world application, while addressing course outcomes related to concurrency and performance optimization. The report also details the types of threads, their advantages and disadvantages, and concludes with the significance of threads in enhancing application performance.

Uploaded by

padvalhome
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

OSY MICRO PROJECT

The project report on 'Threads' explores multithreading concepts, benefits, and methodologies for implementation in computer engineering. It outlines the aims of skill development and real-world application, while addressing course outcomes related to concurrency and performance optimization. The report also details the types of threads, their advantages and disadvantages, and concludes with the significance of threads in enhancing application performance.

Uploaded by

padvalhome
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

A

PROJECT REPORT ON
“THREADS ”

SUBMITTED
BY
Name Enrollment no.
Ayush Jaywant Padval 2211450077
Chaitanya Vikas Patil 2211450045
Pranay Ganesh More 2211450039
Om Ganesh Chandgaonkar 2211450070

UNDER THE GUIDENCE OF

Prof.Asmita Patil

SUBMITTED TO

Maharashtra State Board of Technical Eduction


&
Department of Computer Engineering

BHARITIYA EDUCATION/SOCIAL CHARITABLE TRUST

SHETH SHRI OTARMAL SHESHMAL PARMAR COLLEGE OF


DIPLOMA ENGG,

AT/POST:-NAGOTHANE-402106,TAL:-ROHA,DIST:-RAIGAD

ACADEMIC YEAR 2024-25


ACADEMIC YEAR 2024-25

BHARITIYA EDUCATION/SOCIAL CHARITABLE TRUST

SHETH SHRI OTARMAL SHESHMAL PARMAR COLLEGE OF


DIPLOMA ENGG,

AT/POST:-NAGOTHANE-402106,TAL:-ROHA,DIST:-RAIGAD

(Affiliated by Maharashtra State Board of Technical Education)

CERTIFICATE
DEPARTMENT OF COMPUTER ENGINNERING

This is to certify that following student of Third YEAR COMPUTER


ENGINEERING completed the project work on “THREADS”
As a partial fulfilment and academic requirement for diploma in Computer
Engineering as prescribed by MSBTE.

Name Enrollment no.


Ayush Jaywant Padval 2211450077
Chaitanya Vikas Patil 2211450045
Pranay Ganesh More 2211450039
Om Ganesh Chandgaonkar 2211450070

Prof. Asmita Patil Prof.Sagar Surekar 1145


(Microproject Guide) (H.O.D) (Principal)
Acknowledgement

It is with profoundly sense of gratitude that we acknowledge from our


guide Prof.Asmita Patil she has been guide in the true sense of word a guide
who satisfaction from our word & progress. We are highly obliged Prof. Sagar
Surekar of Department for aberrance & good co-operation given to us fur
bringing this project to almost standard. We are grateful to our principal for
proceeding acknowledgement to us in the connection of this project concluding.
We appreciate the assistance of all staff that helps us in for their sincere&
obliging help to make our project successfully.
Part -A
(Microproject)
1.0 Aims/Benefits of the micro project

• Skill Development
• Innovation and Creativity
• Hands-on Learning
• Team Collaboration
• Problem-Solving
• Real-World Application

2.0 Course outcome addressed.


• Understanding of Multithreading Concepts
• Efficient Resource Management
• Concurrency and Parallelism
• Deadlock and Race Conditions
• Performance Optimization

3.0 Proposed methodology


1. Literature Review:

• Research the concepts of multithreading, thread synchronization, and


concurrency in programming.
• Review various thread management techniques and tools (e.g., Java's Thread
class, Python's threading module, POSIX threads).

2. Problem Definition and Objectives:

• Identify a specific problem or task that requires the use of multithreading


(e.g., parallel processing, load balancing, task concurrency).
• Clearly define the objectives of the project, such as improving application
performance, optimizing resource usage, or reducing execution time.
4.0 Action plan:

Sr.no Activity Start Date Due date Name of


Group
Member
1 Divide the All group
work members
for students
2 Collection of All group
information members
3 Make a note All group
for members
project
4 All Ayush Padval
project
typing
5 Make a final All
report group
for member
project
6 Final All group
submission Members
Date

5.0 Source required:


Sr.no Name of the Specification Qty Remarks
resource
1 Computer RAM minimum 1
8GB, I7 9TH
GEN
2 Operating Window11 _
System

6.0 Name of Team Member;-


Name Enrollment no.
Ayush Jaywant Padval 2211450077
Chaitanya Vikas Patil 2211450045
Pranay Ganesh More 2211450039
Om Ganesh Chandgaonkar 2211450070
Part -B

(Microproject)
1.0 Introduction
A thread refers to a single sequential flow of activities being executed in a process;
Now, it is also known as the thread of execution or the thread of control. thread
execution is possible within any OS’s process. A part from that, a process can have
several threads. A distinct programme counter, a stack of activation records as well
as control blocks are used by each thread of the same process Thread is frequently
described as a light technique.

How does it work?

• Creating a new thread in a current process requires significantly less time than
creating a new process.

• Threads can share common data without needing to communicate with each
other.

• When working with threads, context switching is faster.

• Terminating a thread requires less time than terminating a process.

Benefits of Using Thread

• The procedure can be easily broken down into numerous different threads.

• Multiple tabs in a browser can be considered threads.

• MS Word employs many threads to prepare the text in one thread, receive input
in another thread and so on.
Types of Threads

In the operating system, there are two types of threads.

1. User-level thread.
2. Kernel level thread.

1.User-level thread
The operating system does not recognize the user-level thread. User threads
can be easily implemented and it is implemented by the user. If a user
performs a user-level thread blocking operation, the whole process is blocked.
The kernel level thread does not know nothing about the user level thread. The
kernellevel thread manages user-level threads as if they are singlethreaded
processes? examples: Java thread, POSIX threads, etc.

Advantages of User-level threads


1. The user threads can be easily implemented than the kernel thread.
2. User-level threads can be applied to such types of operating systems that
do not support threads at the kernel-level.
3. It is faster and efficient.
4. Context switch time is shorter than the kernel-level threads.
5. It does not require modifications of the operating system.
6. User-level threads representation is very simple. The register, PC, stack,
and mini thread control blocks are stored in the address space of the user-level
process.
7. It is simple to create, switch, and synchronize threads without the
intervention of the process.

Disadvantages of User-level threads


1. User-level threads lack coordination between the thread and the kernel.

2. If a thread causes a page fault, the entire process is blocked.


Diagram:-

2.Kernel level thread


The kernel thread recognizes the operating system. There is a thread
control block and process control block in the system for each thread and
process in the kernel-level thread. The kernellevel thread is implemented
by the operating system. The kernel knows about all the threads and
manages them. The kernel-level thread offers a system call to create and
manage the threads from user-space. The implementation of kernel threads
is more difficult than the user thread. Context switch time is longer in the
kernel thread. If a kernel thread performs a blocking operation, the Banky
thread execution can continue. Example: Window Solaris.

Advantages of Kernel-level threads

1.The kernel-level thread is fully aware of all threads.

2. The scheduler may decide to spend more CPU time in the process of threads
being large numerical.

3. The kernel-level thread is good for those applications that block the
frequency.
Disadvantages of Kernel-level threads
1. The kernel thread manages and schedules all threads.
2. The implementation of kernel threads is difficult than the user thread.
3. The kernel-level thread is slower than user-level threads.

Diagram:-
Benefits of Threads:-

o Enhanced throughput of the system: When the process is split into many
threads, and each thread is treated as a job, the number of jobs done in the unit time
increases. That is why the throughput of the system also increases.

o Effective Utilization of Multiprocessor system: When you have more than one
thread in one process, you can schedule more than one thread in more than one
processor.

o Faster context switch: The context switching period between threads is less than
the process context switching. The process context switch means more
overhead for the CPU.

o Responsiveness: When the process is split into several threads, and when a thread
completes its execution, that process can be responded to as soon as possible.

o Communication: Multiple-thread communication is simple because the threads


share the same address space, while in process, we adopt just a few exclusive
communication strategies for communication between two processes.

o Resource sharing: Resources can be shared between all threads within a process,
such as code, data, and files. Note: The stack and register cannot be shared between
threads. There is a stack and register for each thread.
MULTI-THREADING :-

Multithreading allows the execution of multiple parts of a program at the same time.
These parts are known as threads and are lightweight processes available within the
process. Therefore, multithreading leads to maximum utilization of the
CPU by multitasking

The main models for multithreading are one to one model, many to one model and
many to many model. Details about these are given as follows –

1.One to One Model

The one to one model maps each of the user threads to a kernel thread. This means
that many threads can run in parallel on multiprocessors and other threads can run
when one thread makes a blocking system call. A disadvantage of the one to one
model is that the creation of a user thread requires a corresponding kernel thread.
Since a lot of kernel threads burden the system, there is restriction on the number of
threads in the system.

A diagram that demonstrates the one to one model is given as follows –


2. Many to One Model
The many to one model maps many of the user threads to a single kernel thread.
This model is quite efficient as the user space manages the thread management. A
disadvantage of the many to one model is that a thread blocking system call blocks
the entire process. Also, multiple threads cannot run in parallel as only one thread
can access the kernel at a time.A diagram that demonstrates the many to one model
is given as follows −
3. Many to Many Model
The many to many model maps many of the user threads to a equal number or
lesser kernel threads. The number of kernel threads depends on the application or
machine. The many to many does not have the disadvantages of the one to one
model or the many to one model. There can be as many user threads as required
and their corresponding kernel threads can run in parallel on a multiprocessor.
A diagram that demonstrates the many to many model is given as follows –
Difference Between User and Kernel Level Threads:-
Reference:
• www.tutorialspoint.com
• Operating System TextBook
• Subject Teacher Guidance

Conclusion:
The exploration of software threads reveals their pivotal role in modern
computing environments. Threads are essential for enabling multitasking and
concurrent execution within applications, significantly enhancing performance
and responsiveness. This review has highlighted several critical aspects of
software threads, including their fundamental concepts, benefits, challenges, and
recent advancements.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy