josephus problem in real-world applicationsespecially in the operating systemmultiple activities have to be performed the biggest issue is not just performing these activities but also completing them in minimum time the johnson' algorithm is used in such applications where an optimal order of execution of different activities has to be determined consider problem that consists of independent tasks otn and two independent processes and if it is specified that must be completed before then johnson' problem can be given asstep determine and times for each task step make two queuesq and where is formed at the beginning of the schedule and is formed at its end step for each taskanalyse and times to determine the smallest time if is the smallest timethen insert the corresponding task at the end of otherwiseinsert the corresponding task at the beginning of in case of tietake as the smallest time note if there is tie between multiple or multiple timesselect the first task in the list consider the table given belowwhich specifies the tasks and time it takes to complete processes and task time to perform time to perform nowfor each taskanalyse and times to determine the smallest time tasks with time less than are assigned to the head of other tasks are assigned to the tail of task time to perform time to perform mintime location tail tail