140 likes | 408 Views
PROCESS SCHEDULING IN LINUX. PROCESS -> WHEN THE PROGRAM IS LOADED INTO MEMORY AND EXECUTING IS CALLED A PROCESS . SCHEDULING -> SCHEDULING IS THE JOB OF ALLOCATING CPU TIME TO DIFFERENT TASK IN ANY TYPE OF OPERATING SYSTEM. PROCESS SCHEDULING.
E N D
PROCESS-> WHEN THE PROGRAM IS LOADED INTO MEMORY AND EXECUTING IS CALLED A PROCESS.SCHEDULING ->SCHEDULING IS THE JOB OF ALLOCATING CPU TIME TO DIFFERENT TASK IN ANY TYPE OF OPERATING SYSTEM.
PROCESS SCHEDULING LINUX HAS TWO SEPARATE ALGORITHM FOR PROCESS SCHEDULING ALGORITHMS. • TIME SHARING ALGORITHM (MULTITASKING) • REAL TIME TASKS
1) TIME SHARING • TIME SHARING ALGORITHM IS A LOGICAL EXTENSION OF MULTIPROGRAMMING. IT THIS CPU EXECUTE MULTIPLE JOBS BY SWITCHING AMONG THEM. BUT THE SWITCH ACCUR SO FREQUENTELY THAT THE USERS CAN INTERACT WITH EACH PROGRAM WHILE IT IS RUNNING. • IT’S REQUIRES AN INTERACTIVE COMPUTER SYSTEM.WHICH PROVIDES DIRECT COMMUNICATION BETWEEN THE USER AND THE SYSTEM.
TIME SHARING • TIME SHARING AND MULTIPROGRAMMING REQUIRE SEVERAL JOBS TO BE KEPT SIMULTANEOUSLY IN MEMORY . SINCE IN JENERAL MAIN MEMORY IS TOO SMALL TO ACCOMMODATE ALL JOBS ,THE JOBS ARE KEPT INITIALLY ON THE DISK IN THE JOB POOL. • THIS POOL CONSIST OF ALL PROCESSES RESIDING ON DISK WAITING ALLOCATION OF MAIN MEMORY . IT’S SEVERAL JOBS ARE READY TO BE BROUGHT INTO MEMORY , AND IF THERE NOT ENOUGH ROOM FOR ALL OF THEM ,THEN THE SYSTEM MUST CHOOSE AMONG THEM.
SCHEDULER OVERVIEW EVERY TIME THE SCHEDULER DOES THE FOLLOWING THINGS – • KERNAL WORK • CURRENT PROCESS • PROCESS SELECTION • SWITCHING PROCESS
PROCESS SCHEDULER RESPONSIBILITIES • DETERMINE WHICH PROCESS WILL HAVE ACCESS TO THE CPU AND EFFECT THE TRANSFER BETWEEN RUNNING PROCESS. • RECEIVE INTERUPTS AND ROUTE THEM TO THE APPROPRIATE KERNEL SUBSYSTEM. • SEND SIGNALS TO USER PROCESS. • MANAGE THE TIMER HARDWARE.
2) REAL TIME TASKS REAL TIME TASKS COME INTO TWO MAIN TERMS. A) PRIORITY BASED-> IN LINUX PRIORITY RANGES FROM 0 TO99 AND 100 TO 140. 1) IN FIRST RANGE WHICH IS 0 TO 99 IS CALLED “STATIC”(IT’S ALLOCATED TO REAL TIME TASKS AND NEVER CHANGED BY THE SCHEDULER). 2) IT IS 100 TO 140 AND IT’S CALLED “DYNAMIC”(IT IS FOR THE CONVENTIAL PROCESS).
REAL TIME • THE STATIC TIME IS ALWAYS HIGHER THEN THE DYNAMIC PRIOROTY THEN THE DYNAMIC PRIORITY. THE REAL TIME PROCESS ALWAYS HAVE PRECEDENCE OVER THE CONVENTIAL PROCESS. 2) TIME SLICE-> TIME SLICE CONDITION IT IS GETS DURING ONE ROUND OF EXECUTION.
THE MINIMUM TIME SLICE IS 10 MSECS THE DEFAULT TIMESLICE IS 150.MSESS AND THE MAXIMUM TIMESLICE IS 300 MSECS.3) CONTEXT SWITCH -> SWITCHING THE CPU TO ANTHER PROCESS REQUIRES PERFORMING A STATE SAVE OF THE CURRENT PROCESS AND A STATE RESTORE OF A DIFFERENT PROCESS .THE TASK IS KNOWN AS A CONTEXT SWITCH.
PRESENTED BY 1) PRAVEEN SALVI 2) PINKESH TAMBOLIBCA “B” BATCH