simulation of scheduling algorithms

30
Term paper of DATA STRUCTURES CSE:205 TERM PAPER TOPIC :- Simulation of Scheduling Algorithms SUBMITTED TO: SUBMITTED BY: ASHISH BUTANI Mr. Vijay Kumar ROLL.NO :- B2802B33

Upload: ashishpatel99

Post on 18-Nov-2014

119 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: Simulation of Scheduling Algorithms

Term paper of DATA STRUCTURES

CSE:205

TERM PAPER TOPIC:- Simulation of Scheduling Algorithms

SUBMITTED TO: SUBMITTED BY: ASHISH BUTANI

Mr. Vijay Kumar ROLL.NO :- B2802B33

REGNO.:- 10811098

Page 2: Simulation of Scheduling Algorithms

ACKNOWLEDGEMENT

First and foremost I thank my teacher Mr. vijay kumar who has assigned me this term paper to bring

out my creative capabilities.

I express my gratitude to my parents for being a continuous source of encouragement for all their

financial aid.

I would like to acknowledge the assistance provided to me by the library staff of LOVELY PROFESSIONAL

UNIVERSITY.

My heartfelt gratitude to my class-mates and for helping me to complete my work in time.

Page 3: Simulation of Scheduling Algorithms

Index

1. Introduction

2. Proposal

3. Background

3.1 What is a Process

4. Life cycle of a Process

5. Scheduling Algorithms

6. Simulation

6.1 A simple class diagram

7. Analysis of algorithms

7.1First Come First Served

7.2Round Robin

7.3Shortest Process First

7.4Highest Response-Ratio-Next

7.5Shortest Remaining Time

8. Graphical representation

9. Conclusion

10.Further work

Page 4: Simulation of Scheduling Algorithms

1. Introduction

Scheduling is a fundamental operating-system function. Whenever the CPU becomes idle, the operating system must select one of the processes in the ready queue to be executed. The selection process is carried out by the short-term scheduler. The scheduler selects fromamong the processes in memory that are ready to execute, and allocates the CPU to one ofthem.All processes in the ready queue are lined up waiting for a chance to run on the CPU.The records are generally the PCBs (Process Control Block) of the processes.

Another important component involved in the CPU scheduling function is the dispatcher. Thedispatcher is the module that gives control of the CPU to the processes selected by the short-term scheduler. This function involves:

• Switching context• Jumping to the proper location in the user program to restart that program.

Our goal is to simulate the process scheduling algorithms to get a more accurate evaluationon how choice of a particular scheduling algorithm can effect CPU utilization and how ascheduler decides when processors should be assigned, and to which processes. Different CPU scheduling algorithms have different properties and may favor one class of processes over another.

We have programmed a model of the computer system and implemented scheduling algorithms using Software data structures which represent the major components of the system which we have discussed in section 6.

2. Proposal

When system has a choice of processes to execute, it must have a strategy -called a ProcessScheduling Policy-for deciding which process to run at a given time .A scheduling policy should attempt to satisfy certain performance criteria, such as maximizing:

• Throughput • Latency • Preventing Indefinite postponement of Process • Maximizing Process Utilization

It is the job of the scheduler or dispatcher to assign a processor to the selected process.In our project various Process Scheduling Algorithms that determine at runtime which processruns next .These algorithms decide when and for how long each process runs; they make choices about

• Preemptibility • Priorities • Running time • Time-to-Completion • Fairness

We will be simulating these Scheduling Algorithms and comparing them against variousparameters mentioned above

Page 5: Simulation of Scheduling Algorithms

3. Background

3.1. What is Process?

A process is the locus of control of a procedure in execution that is manifested by the existence of a data structure called Process Control Block.

Each process has its own address space, which typically consists of Text region, Data regionand Stack region. The Text region stores the code that the processor executes. The Data region stores the variables and dynamically allocated memory that the process uses duringexecution. The Stack region stores instructions and local variables for active procedure calls. The contents of the Stack grow as the process issues nested procedure calls and shrink as procedures return.

4. Life Cycle of a Process

During its lifetime, a process moves through a series of discrete process states. These different states are as follows:

Running State: A process is said to be in running state when it is executing on a processor.

Ready State: A process is said to be in ready state if it could execute on a processor if onewere available.

Blocked State: A process is said to be in blocked state if it is waiting for some event to happen e.g. I/O completion event.

Suspended Process: A process is said to be in suspended state if it is indefinitely removed from contention for time on a processor without being delayed.

Suspended Ready: A process can suspend itself or a ready process or a blocked process. The suspended when again returns in contention for the processor time, after completing the suspended block, it is placed in the suspended ready queue.

Suspended Block: A process when suspended from the contending for the processor time is place in Suspended Block.

Life Cycle of a Process

Awake

Dispatch

Ready

Running

TimerRun out

Wakeup

Block

Asleep

Blocked

Page 6: Simulation of Scheduling Algorithms

What is Thread?

A thread is a Lightweight Process that shares many resources of the Heavyweight processsuch as the address space of the process – to improve the efficiency with which they performtheir tasks. They generally represent a single thread of instructions or thread of control.Threads within a process execute concurrently to attain a common goal.

Need for scheduling

The main objective of multiprogramming is to have some process running all the times, so as to maximize CPU utilization. In the uni-processor system, there is only one process running at a time. Others wait till CPU is free.

If the process being executed requires an I/O then in that time period processor remains idle. All this waiting time is wasted. With multiprogramming, we try to use this time productively. Several processes are kept in the memory. When one process has to wait, operating system can take away CPU from that process and gives it to another process. CPU scheduling is the foundation of multiprogramming. The scheduling helps in the reduction of the waiting time and response time of the processes. Along with, it also increases the throughput of the system.

What is Processor Scheduling Policy?

When a system as a choice of processes to execute, it must have a strategy for deciding which process to run at a given time. This strategy is known as Processor Scheduling Policy. Different process scheduling algorithms have different properties and may favor one class of processes over another. In choosing which algorithm to use in a particular situation, we compare the following characteristics to compare the algorithms.

CPU UtilizationWe want to keep the CPU as busy as possible. It ranges from 0 to 100%. In real systems itranges from 40% to 90%. For the purpose of this simulation we have assumed that CPUutilization is 100%.

ThroughputThe work done by the CPU is directly proportional to the CPU utilization. The number ofprocesses completed per unit time, called throughput, is the measure of work done by the CPU. Algorithms should try to maximize the throughput.

Turnaround timeThe time interval from submission of job to the completion of job is termed as the turnaround time. It includes waiting time of the process and the service time of the process.

Waiting timeThe amount of time process spent waiting in the ready queue is termed as Waiting time. Anyalgorithm does not affect the service time of the process but does affect the waiting time of the process. Waiting time should be kept to the minimum.

Response timeThe time interval from the submission of the process to the ready queue until the processreceives the first response is known as Response time. Response time should always be kept minimum.

Page 7: Simulation of Scheduling Algorithms

Besides the above features, a scheduling algorithm must also have the following properties:• Fairness• Predictability• Scalability

5. Scheduling Algorithms

First Come First Served

This is the simplest process-scheduling algorithm. In this, the process that requests the CPUfirst is allocated the CPU first. the implementation of this algorithm consists of a FIFO queue.The process enters the ready queue and gradually moves to the top of the ready queue. When it reaches to the top of the queue, it is allocated the processor when it becomes free.This algorithm generally has long average waiting time.

Round Robin

Round-robin is best suited for time sharing systems. It is very similar to FCFS, expect that the preemption has been added to switch between the processes. A time called quantum isintroduced in this algorithm, which is the time for which a process runs on the processor. Afterthe quantum the process is preempted, and the new process takes control of the processor for the next quantum time.

Shortest Process First

This algorithm associates with each process the length of the latter’s next CPU burst. Whenthe CPU is available, it is assigned to the process that has the smallest next CPU burst. If two processes have the same length next CPU burst, FCFS scheduling is used to break the tie. The SPF scheduling algorithm is optimal as it gives the minimum average waiting time for thegiven set of processes. It does that by moving the shortest processes first ahead of the long processes, thus decreasing their waiting time more than increasing the waiting time of the long processes. Consequently average waiting time reduces.

Highest-Response-Ratio-Next

This algorithm corrects some of the weakness of the SPF. The SPF algorithm is biasedtowards the processes with short service time. This keeps the longer processes waiting in theready queue for the longer time, despite of arriving in the ready queue before the short jobs. It is a non-preemptive scheduling algorithm in which the priority is the function of not only the service time but also of the time spent by the process waiting in the ready queue. Once the process obtains the control of the processor, it completes to completion. The priority is calculated by the formula

Priority = (Waiting Time + Service Time)/Service Time

In this algorithm too, short processes receive preference. But longer processes that havebeen waiting in the ready queue are also given the favorable treatment.

Shortest Remaining Time

This is the preemptive algorithm which acts on the principles of SPF. It gives preference to the processes with the smaller service time. If a process is using the process and in the mean time a new process arrives whose service time is less than the currently running, then it preempts the currently running process and gives processor control to the new process. Thisalgorithm is no longer useful in today’s operating systems.

Page 8: Simulation of Scheduling Algorithms

6. Simulation

We have programmed a model of the computer system using Software data structures whichrepresent the major components of the system discussed above .The Ready Queue and thememory are simulated using Vectors in which we store objects of class Process. A Processobject contains information about the Process which is also updated when the process runs. In the real system we call this entity as PCB (Process control block).

Ready Queue contains the list of ready processes which are ready to execute. Ready queue is maintained in a priority order, which depends on the algorithm we are using to calculate thepriority. In our simulation the ready queue has been programmed to serve the processes inthe First in First out, Round Robin, Shortest Process first, Highest Response Ration Next and also Shortest Remaining time.

The simulator has a variable representing a clock; as this variables value is increased, thesimulator modifies the system state to reflect the activities of the devices, the processes, and the scheduler. Our system has a function called ProcessReady which checks whichprocesses are ready to enter the system depending on the current clock. Preemption is performed based on the current clock. If based on the algorithm if the next process in the ready queue should get the CPU the current process is pushed into the queue and the next process, based on how the priority of the processes is calculated in ready queue, is taken andgiven the CPU time. We call this in real systems as context switch .We will be providing this overhead a simple variable which we fill add to a process when it is preempted.

The scheduler is an abstract class in which we have defined the basic components which areneeded by the scheduler like ready queue .FIFO, RR, SPF, SRT and HRRN are the classeswhich extend this scheduler class and implement the ready queue based on specificscheduler.

As we run the simulations the statistics that indicate algorithms performance are gathered and printed. The analysis is shown in the section 7.

The data that we are using to drive the simulation is generated using a random-numbergenerator. The generator is programmed to generate processes, CPU-burst times, Arrivalsand Finish time.

The process PCB in our simulation consists of following attributes: Process Id

Process ServiceTimeProcess ArrivalTimeProcess FinishTimeProcess ResponseTime

The same set of processes is feed into the scheduling algorithm to evaluate the algorithmseffect on the processes and CPU. These are initialized for all the processes that we randomlygenerate .Once the process gets the CPU its service time gets updated and if the simulation performs a context switch which preempts the current running process and puts it at the backof the ready queue i.e. we save the PCB of the process. After this the first process in theready queue is given the block .In the end the system outputs the Arrival Time, Service Time,Turn around Time, Waiting Time and Response Time for each process executed by the system. The output formats, the input and the Analysis using this simulation model are shownin the sections that follow:

Page 9: Simulation of Scheduling Algorithms

6.1. A simple Class Diagram

Scheduler Process

FIFO RR

ReadyQ:VectorFinishQ:VectorProcessReady()Report()

SPF HRRN

Id:IntegerServiceTime:IntegerArrivalTime:IntegerFinishTime:IntegerResponseTime:IntegergetId()getArrival()getServiceTime()getTimeLeft()setFinishTime()getFinishTime()setResponseTime()getResponseTime()servicing()

SRT

Page 10: Simulation of Scheduling Algorithms

7. Analyis

7.1. First Come First Serve

Dataset for simulation

Process Arrival ServiceName Time Time

FinishTime

TurnaroundTime

WaitingTime Response

01234

0-1

5-6P010-11P215-16P220-21P4

12345

1-2P06-7P111-12P216-17P321-22P4

54627

610161825

2-3P07-8P112-13P217-18P322-23P4

58131420

3-4P08-9P113-14P218-19P423-24P4

0471213

4-5P09-10P114-15P219-20P424-25P4

0471213

In First In First Out scheduling algorithm, process P0 arrives into the Ready queue first. Since FCFS allocates the processor to the processes on the basis of their arrival into the readyqueue. Hence, P1 is allocated the processor. P1 will execute to completion and finally getsadded to the finish queue. Then the processor is allocated to P1, which is next in readyqueue. After P1 completes its execution, it is added to finish queue. Then processor isallocated to next in ready queue. Thus after P1, P2, P3 and P4 are allocated the processor time respectively. Hence the processor is allocated to the processes in the order they arrive in the ready queue.

Limitations:In FCFS, average waiting time is quite longer. If we have a processor bound job (generallywith longer service time) and other I/O bound jobs. And if, processor bound job is allocatedthe processor time, then it will hold the CPU. As a result, other I/O bound jobs will keep waiting in the ready queue and the I/O devices will remain idle.

Like in the test cases we observed, process P3 despite having a very short service time had to wait for long till all the processes ahead of it ran to completion.

Average Turn around Time: 12Average Waiting Time: 7.2Average Response Time: 7.2

Page 11: Simulation of Scheduling Algorithms

7.2. Round Robin

Dataset for Simulation

Process ArrivalName Time

ServiceTime

FinishTime

TurnaroundTime

WaitingTime Response

30124

0-1

5-6P1

41235

1-2P06-7P1

25467

2-3P07-8P2

1214182125

813161820

3-4P08-9P2

68121213

4-5P19-10P2

60249

10-11P315-16P420-21P2

11-12P316-17P421-22P4

12-13P017-18P122-23P4

13-14P018-19P223-24P4

14-15P419-20P224-25P4

Round Robin is basically FCFS with preemption. In this algorithm the P0 enters the ReadyQueue when no other process is there to compete for the processor time. Hence, P0 is givenaccess to the processor and it starts its execution. The quantum has been set to 3-unit time.When P0 has run for the quantum time on the processor, it will relinquish the processor. At this time, the value of the clock is 3. By this time, P1, P2 and P3 has entered the Readyqueue. P0 will enter the Ready queue after P3. Since P1 came into the Ready queue after P0,thus the processor will be allocated to P1. Now P1 will run on the processor for the quantumtime. By the time, P1 completes its run on processor for the quantum time, P4 will enter the Ready queue after P0. After the quantum expires, P1 will relinquish the processor and willenter in the ready after P4. Now the processor is allocated to P2, P3 and P4 respectively. After relinquishing the processor, they all will enter the ready queue after P1 in the sequenceP2, P3 and P4. When the process completes its execution, it will be removed from the readyqueue and will enter into finish queue.

Advantages: Round Robin algorithm exhibits fairness. All the processes are treated equally and are given equal processor time.As compared to FCFS, the average waiting time is considerably reduced in Round Robin algorithm. Like the process P3, waited for 16 unit time in FCFS, had to wait for 10 unit time to gain access to processor and ran to completion in the quantum period only. This reduced the total number of processes waiting in the ready queue.

Limitations:The performance of the system implementing Round Robin mainly depends upon the value of the quantum. If we set the quantum to very high value, then it will proceed as the FCFS. As a result the system performance will be sluggish. If we keep the quantum value low, moreoverhead will be produced because of frequent context switch .Round Robin with lowquantum is generally suitable for the interactive system. However, to determine the optimal quantum time is a tedious task.

Page 12: Simulation of Scheduling Algorithms

Average Turn around Time: 15Average Waiting Time: 8.2Average Response Time: 4.2

7.3. Shortest Process First

Dataset taken for simulation

Process Arrival ServiceName Time Time

FinishTime

TurnaroundTime

WaitingTime Response

03124

0-1

5-6P010-11P115-16P220-21P4

14235

1-2P06-7P311-12P116-17P221-22P4

52467

68121825

2-3P07-8P312-13P217-18P222-23P4

54101520

3-4P08-9P113-14P218-19P423-24P4

026913

4-5P09-10P114-15P219-20P424-25P4

026913

Process P0 arrives in the ready queue when no other process is in the queue to compete forthe processor time. Thus P0 is given the processor time immediately. Since this is a non-preemptive algorithm, P0 will execute to its completion and is added to finish queue. By the time P0 completes other processes enter into the ready queue namely, P1, P2, P3 and P4. When P0 completes its execution, scheduler searches for the process with the minimumservice time. Since of the four processes in the ready queue, P3 has the minimum servicetime (= 2), hence P3 is allocated the processor time. When P3 executes to completion, the process with next least service time is allocated the processor. This time it is P1.Thiscontinues until all the processes have finished. This clearly demonstrates that SPF gives preference to the processes with short service time. As a result of this processes with longerservice time have to wait for longer period of time for execution, despite of entering the queue before the shorter process. This might cause indefinite postponement of processes with higher service time. To avoid this from happening we have yet another scheduling algorithm inseries which gives favorable treatment to the processes which have been waiting longer in theready queue .HRRN is discussed next.

Advantages:Shorter processes are given preference. If the ready queue contains Processor bound processes and some I/O bound processes, then the I/O bound will be given more preference.As a result the system throughput increases.Average waiting time of the processes decreases. Like in the test case, the process P3 waited for only 6 seconds compared to 10 seconds in RR and 16 seconds in FCFS.

Limitations:

The algorithm is more biased towards the processes with shorter service time. As a result the processes with longer service time many a times are kept waiting in the ready queue forlonger time and may cause indefinite postponement.Since it is a non-preemptive algorithm therefore it does not exhibit fairness.

Page 13: Simulation of Scheduling Algorithms

Average Turn around Time: 10.8Average Waiting Time: 6 Average Response Time: 6

7.4. Highest Response Ratio Next

Dataset for Simulation

Process Arrival Service FinishName Time Time Time Turnaround

TimeWaitingTime Response

01324

0-1

5-6P010-11P315-16P220-21P4

12435

1-2P06-7P111-12P316-17P221-22P4

54267

610121825

2-3P07-8P112-13P217-18P222-23P4

5881520

3-4P08-9P113-14P218-19P423-24P4

046913

4-5P09-10P114-15P219-20P424-25P4

046913

In Highest Response Ratio Next (HRRN) algorithm the P0 enters the Ready Queue when no other process is there to compete for the processor time. Hence, P0 is given access to theprocessor and it starts its execution. Till this point the algorithm works as FCFS. However, by the time P0 completes its execution, other processes P1, P2, P3 and P4 arrive in the Readyqueue. Now HRRN algorithm based upon the Service time and the Waiting time of theprocesses will determine the priority of the processes. The process with highest priority will be given access of the processor to execute. When the P0 relinquishes the processor, at that time the value of the clock is 6. The calculation to determine the priority of the process is done in the following steps:

At clock=6,

Arrival timeWaiting TimeService TimePriority

P12441.5

P23361.5

P34221.5

P45171.1

At this point the priority of process P1, P2 and P3 are equal and of P4 is less than the otherthree. So, P4 is out of the competition for the processor time. Since the three processes have the equal priority, here the algorithm will stick to FCFS basis. So, P1 will be given access ofthe processor. Now when P1 relinquishes the processor, at that time the value of the clock is10. Following are the calculation at this time.

Page 14: Simulation of Scheduling Algorithms

Arrival timeWaiting TimeService TimePriority

P23762.2

P34624

P45571.7

Based upon the priority calculated at this time, P3 is allocated the process. When P3 relinquishes the processor, the value of clock is 12. So now new calculations will be

Arrival timeWaiting TimeService TimePriority

P23962.5

P35772

Hence, this time P2 has been allocated the processor. When P2 relinquishes the processor,the P4 is finally allocated the processor.

Advantages:HRRN overcomes the limitation of SPF by giving favorable treatment to the longer processes. Like in our test case, the process P1 came in the queue before P3. However, as SPF gives preference to shorter process, hence P3 was allocated the process ahead of P1. However, in HRRN, P1 had to wait just for 6 unit time to get access to the processor.HRRN also prevents indefinite postponement.

Average Turn around Time: 11.2Average Waiting Time: 6.4Average Response Time: 6.4

7.5. Shortest Remaining Time

Dataset for Analysis

ProcessName03124

0-1

5-6P010-11P115-16P220-21P4

ArrivalTime14235

1-2P06-7P311-12P116-17P221-22P4

ServiceTime52467

FinishTime68121825

2-3P07-8P312-13P217-18P222-23P4

TurnaroundTime54101520

3-4P08-9P113-14P218-19P423-24P4

WaitingTime0481218

4-5P09-10P114-15P219-20P424-25P4

Response026913

Page 15: Simulation of Scheduling Algorithms

In Shortest Remaining Time, when P1 enters the Ready queue, it is the only process in the foray for the processor time. Hence P0 is allocated the processor time. At clock = 2, processP1 enters the ready queue with service time 4. But at this moment the value of the service time of P0 is 4, equal to P1. Hence FCFS is followed in this case. Since P0 arrived in theready queue before P1, hence P0 retains the processor. At clock =3, process P2 enters theready queue with service time 6. By this time the updated service time of P0 is 3 which isminimum of the three, hence P0 retains the processor. At clock = 4, process P3 enters the ready queue with service time 2. At this moment, the service time left of P0 is 2. Since boththe processes have the same service time, hence FCFS basis is adopted. Hence P0 retainsthe processor. At clock =5, P4 enters the ready queue with service time 7. P0 continues toretain the processor and executes to completion and is added to finish queue. After P0, the processor is allotted to next process with shortest service time, i.e P3. Now P3 executes to completion. This is followed by P1, P2 and P4 respectively. Upon completion these processesare added to the finish queue.

Advantages:It offers the minimum waiting time for the processes. Like the process P3, waited for 6 seconds before getting the processor time. Though this waiting time is equal to that in SPF. But being a preemptive algorithm, SRT scores over SPF by providing even lesser waiting time than the former.

Average Turn around Time: 11Average Waiting Time: 6.4Average Response Time: 6

Page 16: Simulation of Scheduling Algorithms

8. Graphical Representation

The graphs presented below represent the turnaround time, waiting time and response time

Turnaround Time Comparison

25

20

15

10

5

0

P0P1P2P3P4

FCFS RR SPF

Algorithms

HRRN SRT

20

15

10

5

0

Waiting Time Comparison

P0P1P2P3P4

FCFS RR SPF

Algorithms

HRRN SRT

1614121086420

Response Time Comparison

P0P1P2P3P4

FCFS RR SPFAlgorithms

HRRN SRT

Tim

e T

ime

Tim

e

Page 17: Simulation of Scheduling Algorithms

9. Conclusion

From the analysis of the algorithms, we have come up with the conclusion that RR has the best average response time and being the preemptive algorithm, it exhibits fairness. But however, performance of the RR algorithm depends heavily on the size of the quantum. On the one extreme is the time quantum is very large, RR algorithm is same as FCFS policy. But if the time quantum is fairly small, the RR will exhibit fairness but a considerable overhead gets added to the turnaround time due frequent context switch. This fact becomes clear from the RR average turnaround time reading is highest as compared to other algorithms. Hencewe observed if majority of the processes are less then the time quantum, the RR will givebetter response time.

Further, SPF has the least average turnaround time and average waiting time as compared to other algorithms. This shows that SPF is provably optimal, in that it gives the minimumaverage time in the set of processes by moving the short process before a long one. Thewaiting time of short process decreases more than the waiting time of the long process. Consequently the waiting time decreases. But this algorithm can only be used for systems which are interactive and thereby is biased to short processes and unfavorable to longer oneswhich may lead to indefinite postponement of longer processes.

HRRN has approximately same average turnaround, waiting and response time. It overcomesthe limitation of the SPF by giving favorable treatment to the processes waiting for a longertime, and thereby prevents indefinite postponement.

SRT exhibits approximately same average response time, waiting time and turnaround time, and may seem to be an effective algorithm for interactive processes if the tasks performedbefore issuing I/O are short in duration. However, SRT determines priority based on the runtime to completion, not the run time to I/O. Some interactive processes such as shell executesfor the life time of the session, which would place the shell at the lowest priority level.

10. Further work

We have successfully simulated the scheduling algorithms based on which the scheduler decides which processes to allocate to the processor. We have successfully gathered data foranalysis, but we still have to take under consideration the overhead which the real world operating systems incur due to context switch while using the preemptive algorithms.

Page 18: Simulation of Scheduling Algorithms

References:

Books :

Design” – John Wiley and Sons.Spotts M.F. and Shoup T.E. – “Design of Machine Elements” – Prentice Hall International.Bhandari V.B. – “Design of Machine Elements” – Tata McGraw Hill Publication Co. Ltd.Black P.H. and O. Eugene Adams – “Machine Design” – McGraw Hill Book Co. Inc.

Sites: http://www.milcal.com http://www.chbooks.com http://inside.mines.com http://www.wnycre.bufallo.edu/leavnknv.html . http://www.nptel.iitm.ac.in/courses/Webcourse-contents/IIT%20Kharagpur/Machine

%20design1/pdf/mod8les1.pdf