Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Operting System (Micro Project) 2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

A Project Report On

“Quick Sort Using c On Linux Platform”


Submitted

In partial fulfilment of the Requirement of the award of the degree of

Diploma in computer Engineering

Submitted by:
1)Dipali Vishnu kale (2011630003)

2)Srushti shashikant kaulwar (2011630011)

3)Swati subhash narwade (2011630015)

4) Harshda harishkumar kalyankar (2011630023)

Guided by:
Prof.G.K.Mangnale

Submitted to:
DEPARTMENT OF” COMPUTER ENGINEERING”

GOVERNMENT POLYTECHINC,HINGOLI
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION

GOVERNMENT POLYTECHNIC HINGOLI

CERTIFICATE
This is to certify that the project report entitled ” operating
System”was successfully completed by student of fifth semester
diploma in Computer Engineering

NAME OF STUDENTS

1)Dipali Vishnu kale(2011630003)

2)Srushti shashikant kaulwar (2011630011)

3)Swati subhash narwade(2011630015)

4) Harshda harishkumar kalyankar (2011630023)

In Partial Fulfillment Of The Requirements For The Award Of The


Diploma In Computer Engineering & Submitted To The Department Of
Computer Engineering Of Government Polytechnic Hingoli Work Carried
Out During A Period For The Academic Year 2022- 2023 as Per
Curriculum.

Prof.G.K.Mangnale Prof.A.T.Adhave

Name of Guide Head of department

Dr.Ashok.Upadhyay

principle
ACKNOWLEDGEMENT

We would like to express my gratitude to all the people behind the screen
who helped me to transform an idea into a real application. We profoundly
thank Prof. Dr. A. Upadhyay principal of our institute who has been an
excellent guide and also a great source of inspiration to our work. We would
like to thank our Professors of Computer Engineering branch for his technical
guidance, constant encouragement and support in carrying out my project at
college.

The satisfaction and euphoria that accompany the successful completion


of the task would be great but incomplete without the mention of the people
who made it possible with their constant guidance and encouragement crowns
all the efforts with success. In this context, We would like thank all the other
staff members, both teaching and non-teaching, who have extended their timely
help and eased our task. Last, but not least, we would like to thank the authors
of various research articles and books that were referred to. …
ABSTRACT

Quick Sort Using c On Linux Platform can be consider


as a most important thing in economic world.in the
present scenario the banking sector is the common
need in everyday life.in day to day life we face the
problems and then we realize something is not done in
this sector like we want to change the location (branch)
of our account then we need to fill the application and
then some day waiting to complete bank process. In
this process amount of time is more as well as here
occur manual work which is increases man power. Also
in current scenario aadhar card linking is must with
bank account and it is possible through the A but if in
urgent we want to link aadhar it may be not possible
there is no are available in that case we provide this
facility throught our project
INDEX

Sr. No Title Page No

1 Introduction 6

2 Ubuntu infromation 7

3 Algoritham and Pseudocode and 7-11


flowchart

4 Source Code 12-14

5 Conclusion
15

6 Refrences 15
INTRODUCTION

An operating system (OS) is the software component of a


computer system that is responsible for the management
and coordination of activities and the sharing of the
resources of the computer. The OS acts as a host for
application programs that are run on the machine. As a host,
one of the purposes of an OS is to handle the details of the
operation of the hardware. This relieves application
programs from having to manage these details and makes it
easier to write applications. Almost all computers use an OS
of some type.

OSs offer a number of services to application programs and


users. Applications access these services through application
programming interfaces (APIs) or system calls. By using these
interfaces, the application can request a service from the OS,
pass parameters, and receive the results of the operation.
Users may also interact with the OS by typing commands or
using a graphical user interface (GUI).
Information of Ubuntu

Ubuntu is a Linux distribution based on Debian mostly composed of


free and open-source software. Ubuntu is officially released in three
editions are Desktop, Server and Core for Internet of things devices
and robots. All the editions can run on the computer alone, or in a
virtual machine Ubuntu is a popular operating system for cloud
computing, with support for Open Stack. Ubuntu’s default desktop as
of version 17.10, is GNOME. Ubuntu is released every six months,
with long-term support (LTS) releases every two years as of 23 April
2020, the latest release and also the most recent long-term support
release is 20.04 "Focal Fossa", which is supported until 2025 under
public support and until 2030 as a paid option. The next release is
due sometimes in October 2020, and will most likely be titled 20.10.
Ubuntu is developed by Canonical and a community of other
developers, under a meritocratic governance model Canonical
provider security updates and support for each Ubuntu release,
starting from the release date and until the release reaches its
designated end-of-life (EOL) date Canonical generates revenue
through the sale of premium services related to Ubuntu.
Advantage of Operating System
• Allows you to hide details of hardware by creating an
abstraction hich a user may execute programs/applications
• Offers an environment in which a user may execute
programs/applications
• Easy to use with a GUI
• The operating system must make sure that the computer
system convenient to use
• Operating System acts as an intermediary among
applications and the hardware components
• It provides the computer system resources with easy to
use format

Disadvantages
• If any issue occurs in OS, you may lose all the contents
which have been stored in your system
• Operating system's software is quite expensive for small
size organization which adds burden on them. Example
Windows
• It is never entirely secure as a threat can occur at any time
Quick Sort Pivot Algorithm:

Step 1 − Choose the highest index value has pivot


Step 2 − Take two variables to point left and right of the list
excluding pivot
Step 3 − left points to the low index
Step 4 − right points to the high
Step 5 − while value at left is less than pivot move right
Step 6 − while value at right is greater than pivot move left
Step 7 − if both step 5 and step 6 does not match swap left
and right
Step 8 − if left ≥ right, the point where they met is new•

 Quick Sort Pivot Pseudocode:

function partitionFunc (left, right, pivot)

left Pointer = left


right Pointer = right - 1

while True do
while A[++left Pointer] < pivot do
//do-nothing
end while

while rightPointer > 0 && A[--right Pointer] > pivot do


//do-nothing end while
if leftPointer >= rightPointer
break
else swap leftPointer, rightPointer
end if
end while

swap leftPointer, right


return leftPointer

end function

Quick Sort Algorithm:

Step 1 − Make the right-most index value pivot


Step 2 − partition the array using pivot value
Step 3 − quicksort left partition recursively
Step 4 − quicksort right partition recursively

• Quick Sort Pseudocode

procedure quicksort (left, right)

if right-left <= 0
return
else
pivot = A[right] partition = partitionFunc (left, right, pivot)
quicksort (left, partition-1)
quicksort(partition+1,right)
end if

end procedure
 Flowchart:
Code for Quick Sort Program:

#!/bin/bash
function quicksort()
{
left=$1
right=$2
if [[ $1 -lt $2 ]]
then
pivot=${array[$1]}
while(( $left < $right ))
do
while((${array[$left]} <= $pivot && $left < $2))
do
left=$(($left + 1))
done
while((${array[$right]} > $pivot))
do
right=$(($right-1))
done
if [[ $left -lt $right ]]
then
temp=${array[$left]}
array[$left]=${array[$right]}
array[$right]=$temp
fi
done

temp=${array[$right]}
array[$right]=${array[$1]}
array[$1]=$temp
temp=$right
# pivot used in each case are printed for evaluation
quicksort $1 $((right-1)) array
quicksort $((temp+1)) $2 array
fi
}
echo “Enter the number of elements “
read limit
echo “Enter the elements into the list”
for((i=0;i <$limit;i++))
do
read array[i]
done
quicksort 0 $((limit-1)) array
echo Array elements after are :
for((i=0;i <limit;i++))
do
echo${array[$i]}
done
Output:
Conclusion:
In this project we have studied how to create a quicksort
program using shell script. Also we studied about the shell
script in Ubuntu Operating System. An operating system is a
software which acts as an interface between the end user
and computer hardware.

References:
• https://en.wikipedia.org/wiki/Operating_system
• https://en.wikipedia.org/wiki/Shell_script

You might also like