SlideShare a Scribd company logo
1 of 14
Download to read offline
Placement Algorithm:
It decides which program to load into the memory. Common placement algorithms are first-fit,
next-fit, best-fit and priority fit.
Next-fit often leads to allocation of the largest block at the end of memory
First-fit favors allocation near the beginning: tends to create less fragmentation then Next-fit
Best-fit searches for smallest block: the fragment left behind is small as possible
Main memory quickly forms holes too small to hold any process: compaction generally needs to
be done more often
The following jobs are loaded into memory using fixed partition following a certain memory
allocation method (best-fit, first-fit and worst-fit).
List of Jobs
Size
Turnaround
Job 1
100k
3
Job 2
10k
1
Job 3
35k
2
Job 4
15k
1
Job 5
23k
2
Job 6
6k
1
Job 7
25k
1
Job 8
55k
2
Job 9
88k
3
Job 10
100k
3
Memory Block Size
Block 1 50k
Block 2 200k
Block 3 70k
Block 4 115k
Block 5 15k
BEST FIT
Best-fit memory allocation makes the best use of memory space but slower in making
allocation. In the illustration below, on the first processing cycle, jobs 1 to 5 are submitted and be
processed first. After the first cycle, job 2 and 4 located on block 5 and block 3 respectively and
both having one turnaround are replace by job 6 and 7 while job 1, job 3 and job 5 remain on
their designated block. In the third cycle, job 1 remain on block 4, while job 8 and job 9 replace
job 7 and job 5 respectively (both having 2 turnaround). On the next cycle, job 9 and job 8
remain on their block while job 10 replace job 1 (having 3 turnaround). On the fifth cycle only
job 9 and 10 are the remaining jobs to be process and there are 3 free memory blocks for the
incoming jobs. But since there are only 10 jobs, so it will remain free. On the sixth cycle, job 10
is the only remaining job to be process and finally on the seventh cycle, all jobs are successfully
process and executed and all the memory blocks are now free.
FIRST- FIT
First-fit memory allocation is faster in making allocation but leads to memory waste. The
illustration below shows that on the first cycle, job 1 to job 4 are submitted first while job 6
occupied block 5 because the remaining memory space is enough to its required memory size to
be process. While job 5 is in waiting queue because the memory size in block 5 is not enough for
the job 5 to be process. Then on the next cycle, job 5 replace job 2 on block 1 and job 7 replace
job 4 on block 4 after both job 2 and job 4 finish their process. Job 8 is in waiting queue because
the remaining block is not enough to accommodate the memory size of job 8. On the third cycle,
job 8 replace job 3 and job 9 occupies block 4 after processing job 7. While Job 1 and job 5
remain on its designated block. After the third cycle block 1 and block 5 are free to serve the
incoming jobs but since there are 10 jobs so it will remain free. And job 10 occupies block 2
after job 1 finish its turns. On the other hand, job 8 and job 9 remain on their block. Then on the
fifth cycle, only job 9 and job 10 are to be process while there are 3 memory blocks free. In the
sixth cycle, job 10 is the only remaining job to be process and lastly in the seventh cycle, all jobs
are successfully process and executed and all the memory blocks are now free.
WORST-FIT
Worst-fit memory allocation is opposite to best-fit. It allocates free available block to the new
job and it is not the best choice for an actual system. In the illustration, on the first cycle, job 5 is
in waiting queue while job 1 to job 4 and job 6 are the jobs to be first process. After then, job 5
occupies the free block replacing job 2. Block 5 is now free to accommodate the next job which
is job 8 but since the size in block 5 is not enough for job 8, so job 8 is in waiting queue. Then on
the next cycle, block 3 accommodate job 8 while job 1 and job 5 remain on their memory block.
In this cycle, there are 2 memory blocks are free. In the fourth cycle, only job 8 on block 3
remains while job 1 and job 5 are respectively replace by job 9 and job 10. Just the same in the
previous cycle, there are still two free memory blocks. At fifth cycle, job 8 finish its job while
the job 9 and job 10 are still on block 2 and block 4 respectively and there is additional memory
block free. The same scenario happen on the sixth cycle. Lastly, on the seventh cycle, both job 9
and job 10 finish its process and in this cycle, all jobs are successfully process and executed. And
all the memory blocks are now free.
SCAN disk Scheduling Algorithm
In operating systems, seek time is very important. Since all device requests are linked in queues,
the seek time is increased causing the system to slow down. Disk Scheduling Algorithms are
used to reduce the total seek time of any request.
Disk scheduling algorithms are used to allocate the services to the I/O requests on the disk [1].
Since seeking disk requests is time consuming, disk scheduling algorithms try to minimize this
latency. If desired disk drive or controller is available, request is served immediately. If busy,
new request for service will be placed in the queue of pending requests. When one request is
completed, the Operating System has to choose which pending request to service next. The OS
relies on the type of algorithm it needs when dealing and choosing what particular disk request is
to be processed next. The objective of
This algorithm is performed by moving the R/W head back-and-forth to the innermost and
outermost track. As it scans the tracks from end to end, it process all the requests found in the
direction it is headed. This will ensure that all track requests, whether in the outermost, middle or
innermost location, will be traversed by the access arm thereby finding all the requests. This is
also known as the Elevator algorithm. Using the same sets of example in FCFS the solution are
as follows:
(THM) = (50-0) + (180-0) = 50 + 180 (THM) = 230 Seek Time = THM * Seek rate = 230 * 5ms
Seek Time = 1,150 ms this algorithm works like an elevator does. In the algorithm example, it
scans down towards the nearest end and when it reached the bottom it scans up servicing the
requests that it did not get going down. If a request comes in after it has been scanned, it will not
be serviced until the process comes back down or moves back up [5]. This process moved a total
of 230 tracks and a seek time of 1,150. This is optimal than the previous algorithm. In operating
systems, seek time is very important. Since all device requests are linked in queues, the seek time
is increased causing the system to slow down. Disk Scheduling Algorithms are used to reduce
the total seek time of any request.
Disk scheduling algorithms are used to allocate the services to the I/O requests on the disk [1].
Since seeking disk requests is time consuming, disk scheduling algorithms try to minimize this
latency. If desired disk drive or controller is available, request is served immediately. If busy,
new request for service will be placed in the queue of pending requests. When one request is
completed, the Operating System has to choose which pending request to service next. The OS
relies on the type of algorithm it needs when dealing and choosing what particular disk request is
to be processed next. The objective of using these algorithms is keeping Head movements to the
amount as possible. The less the head to move, the faster the seek time will be. To see how it
works, the different disk scheduling algorithms will be discussed and examples are also provided
for better understanding on these different algorithms.
Although there are other algorithms that reduce the seek time of all requests, I will only
concentrate on the following disk scheduling algorithms:
First Come-First Serve (FCFS)
Shortest Seek Time First (SSTF)
Elevator (SCAN)
Circular SCAN (C-SCAN)
LOOK
C-LOOK
This approach works like an elevator does. It scans down towards the nearest end and then when
it hits the bottom it scans up servicing the requests that it didn't get going down. If a request
comes in after it has been scanned it will not be serviced until the process comes back down or
moves back up. This process moved a total of 230 tracks. Once again this is more optimal than
the previous algorithm, but it is not the best.
Operating System:
Operating System (OS) is the software that manages the sharing of the resources of a computer.
An operating system processes system data and user input, and responds by allocating and
managing tasks and internal system resources as a service to users and programs of the system.
At the foundation of all system software, an operating system performs basic tasks such as
controlling and allocating memory, prioritizing system requests, controlling input and output
devices, facilitating networking and managing file systems. Major Operating Systems include
Microsoft Windows, Sun Solaris, Mac OS, and the UNIX/Linux Family.
The main functions of a modern general purpose operating system is as follows
UserInterface
All graphics based today, the user interface includes the windows, menus and method of
interaction between the user andthe computer. Prior to graphical user interfaces (GUIs), all
operations were performed by typing in commands. Not extincttoday, a command-line interface
is included in all major operating systems, and technical operations are commonlyexecuted from
the command line by programmers and administrators.
Operating systems may support optional interfaces. Although the overwhelming majority of
people work with the defaultinterface, different "shells" offer variations of functionality, and
"skins" provide different appearances.
JobManagement
Job management controls the time and sequence that applications are run. Common in the
mainframe and high-end serverenvironment, IBM's job control language (JCL) was developed
decades ago to schedule the daily work. The execution of shortscripts at specific times
throughout the day is common in Unix/Linux servers. In a desktop environment, batch files can
bewritten to perform a sequence of operations that can be scheduled to start at a given time.
TaskManagement
multitasking, which is the ability to simultaneously execute multiple programs, is available in all
operating systems today.Critical in the mainframe and server environment, applications can be
prioritized to run faster or slower depending on theirpurpose. In the desktop world, multitasking
is more often than not "task switching," which keeps applications open so userscan bounce
back and forth among them.
DataManagement
Data management keeps track of the data on the disk or in solid state storage. The application
program deals with data byfile name and a particular location within the file. The operating
system's file system knows where the data are physicallystored (which sectors) and interaction
between the application and operating system is through the programming interface(API). When
an application needs to retrieve or save data, it makes a call to the file system, which is in charge
of opening, reading, writing and closing files.
DeviceManagement
Device management controls peripheral devices by sending them commands in their proprietary
command language. Thesoftware routine that deals with each device is called a "driver," and
the OS requires drivers for each of the peripheralsattached to the computer. When a different
type of peripheral is attached, that device's driver must be added to the operatingsystem if not
previously installed.
Security
Operating systems provide password protection to keep unauthorized users out of the system.
Activity logs are maintained,which may provide time accounting for billing purposes. They also
may provide backup and recovery routines for starting overin the event of a system failure.
List of Jobs
Size
Turnaround
Job 1
100k
3
Job 2
10k
1
Job 3
35k
2
Job 4
15k
1
Job 5
23k
2
Job 6
6k
1
Job 7
25k
1
Job 8
55k
2
Job 9
88k
3
Job 10
100k
3
Solution
Placement Algorithm:
It decides which program to load into the memory. Common placement algorithms are first-fit,
next-fit, best-fit and priority fit.
Next-fit often leads to allocation of the largest block at the end of memory
First-fit favors allocation near the beginning: tends to create less fragmentation then Next-fit
Best-fit searches for smallest block: the fragment left behind is small as possible
Main memory quickly forms holes too small to hold any process: compaction generally needs to
be done more often
The following jobs are loaded into memory using fixed partition following a certain memory
allocation method (best-fit, first-fit and worst-fit).
List of Jobs
Size
Turnaround
Job 1
100k
3
Job 2
10k
1
Job 3
35k
2
Job 4
15k
1
Job 5
23k
2
Job 6
6k
1
Job 7
25k
1
Job 8
55k
2
Job 9
88k
3
Job 10
100k
3
Memory Block Size
Block 1 50k
Block 2 200k
Block 3 70k
Block 4 115k
Block 5 15k
BEST FIT
Best-fit memory allocation makes the best use of memory space but slower in making
allocation. In the illustration below, on the first processing cycle, jobs 1 to 5 are submitted and be
processed first. After the first cycle, job 2 and 4 located on block 5 and block 3 respectively and
both having one turnaround are replace by job 6 and 7 while job 1, job 3 and job 5 remain on
their designated block. In the third cycle, job 1 remain on block 4, while job 8 and job 9 replace
job 7 and job 5 respectively (both having 2 turnaround). On the next cycle, job 9 and job 8
remain on their block while job 10 replace job 1 (having 3 turnaround). On the fifth cycle only
job 9 and 10 are the remaining jobs to be process and there are 3 free memory blocks for the
incoming jobs. But since there are only 10 jobs, so it will remain free. On the sixth cycle, job 10
is the only remaining job to be process and finally on the seventh cycle, all jobs are successfully
process and executed and all the memory blocks are now free.
FIRST- FIT
First-fit memory allocation is faster in making allocation but leads to memory waste. The
illustration below shows that on the first cycle, job 1 to job 4 are submitted first while job 6
occupied block 5 because the remaining memory space is enough to its required memory size to
be process. While job 5 is in waiting queue because the memory size in block 5 is not enough for
the job 5 to be process. Then on the next cycle, job 5 replace job 2 on block 1 and job 7 replace
job 4 on block 4 after both job 2 and job 4 finish their process. Job 8 is in waiting queue because
the remaining block is not enough to accommodate the memory size of job 8. On the third cycle,
job 8 replace job 3 and job 9 occupies block 4 after processing job 7. While Job 1 and job 5
remain on its designated block. After the third cycle block 1 and block 5 are free to serve the
incoming jobs but since there are 10 jobs so it will remain free. And job 10 occupies block 2
after job 1 finish its turns. On the other hand, job 8 and job 9 remain on their block. Then on the
fifth cycle, only job 9 and job 10 are to be process while there are 3 memory blocks free. In the
sixth cycle, job 10 is the only remaining job to be process and lastly in the seventh cycle, all jobs
are successfully process and executed and all the memory blocks are now free.
WORST-FIT
Worst-fit memory allocation is opposite to best-fit. It allocates free available block to the new
job and it is not the best choice for an actual system. In the illustration, on the first cycle, job 5 is
in waiting queue while job 1 to job 4 and job 6 are the jobs to be first process. After then, job 5
occupies the free block replacing job 2. Block 5 is now free to accommodate the next job which
is job 8 but since the size in block 5 is not enough for job 8, so job 8 is in waiting queue. Then on
the next cycle, block 3 accommodate job 8 while job 1 and job 5 remain on their memory block.
In this cycle, there are 2 memory blocks are free. In the fourth cycle, only job 8 on block 3
remains while job 1 and job 5 are respectively replace by job 9 and job 10. Just the same in the
previous cycle, there are still two free memory blocks. At fifth cycle, job 8 finish its job while
the job 9 and job 10 are still on block 2 and block 4 respectively and there is additional memory
block free. The same scenario happen on the sixth cycle. Lastly, on the seventh cycle, both job 9
and job 10 finish its process and in this cycle, all jobs are successfully process and executed. And
all the memory blocks are now free.
SCAN disk Scheduling Algorithm
In operating systems, seek time is very important. Since all device requests are linked in queues,
the seek time is increased causing the system to slow down. Disk Scheduling Algorithms are
used to reduce the total seek time of any request.
Disk scheduling algorithms are used to allocate the services to the I/O requests on the disk [1].
Since seeking disk requests is time consuming, disk scheduling algorithms try to minimize this
latency. If desired disk drive or controller is available, request is served immediately. If busy,
new request for service will be placed in the queue of pending requests. When one request is
completed, the Operating System has to choose which pending request to service next. The OS
relies on the type of algorithm it needs when dealing and choosing what particular disk request is
to be processed next. The objective of
This algorithm is performed by moving the R/W head back-and-forth to the innermost and
outermost track. As it scans the tracks from end to end, it process all the requests found in the
direction it is headed. This will ensure that all track requests, whether in the outermost, middle or
innermost location, will be traversed by the access arm thereby finding all the requests. This is
also known as the Elevator algorithm. Using the same sets of example in FCFS the solution are
as follows:
(THM) = (50-0) + (180-0) = 50 + 180 (THM) = 230 Seek Time = THM * Seek rate = 230 * 5ms
Seek Time = 1,150 ms this algorithm works like an elevator does. In the algorithm example, it
scans down towards the nearest end and when it reached the bottom it scans up servicing the
requests that it did not get going down. If a request comes in after it has been scanned, it will not
be serviced until the process comes back down or moves back up [5]. This process moved a total
of 230 tracks and a seek time of 1,150. This is optimal than the previous algorithm. In operating
systems, seek time is very important. Since all device requests are linked in queues, the seek time
is increased causing the system to slow down. Disk Scheduling Algorithms are used to reduce
the total seek time of any request.
Disk scheduling algorithms are used to allocate the services to the I/O requests on the disk [1].
Since seeking disk requests is time consuming, disk scheduling algorithms try to minimize this
latency. If desired disk drive or controller is available, request is served immediately. If busy,
new request for service will be placed in the queue of pending requests. When one request is
completed, the Operating System has to choose which pending request to service next. The OS
relies on the type of algorithm it needs when dealing and choosing what particular disk request is
to be processed next. The objective of using these algorithms is keeping Head movements to the
amount as possible. The less the head to move, the faster the seek time will be. To see how it
works, the different disk scheduling algorithms will be discussed and examples are also provided
for better understanding on these different algorithms.
Although there are other algorithms that reduce the seek time of all requests, I will only
concentrate on the following disk scheduling algorithms:
First Come-First Serve (FCFS)
Shortest Seek Time First (SSTF)
Elevator (SCAN)
Circular SCAN (C-SCAN)
LOOK
C-LOOK
This approach works like an elevator does. It scans down towards the nearest end and then when
it hits the bottom it scans up servicing the requests that it didn't get going down. If a request
comes in after it has been scanned it will not be serviced until the process comes back down or
moves back up. This process moved a total of 230 tracks. Once again this is more optimal than
the previous algorithm, but it is not the best.
Operating System:
Operating System (OS) is the software that manages the sharing of the resources of a computer.
An operating system processes system data and user input, and responds by allocating and
managing tasks and internal system resources as a service to users and programs of the system.
At the foundation of all system software, an operating system performs basic tasks such as
controlling and allocating memory, prioritizing system requests, controlling input and output
devices, facilitating networking and managing file systems. Major Operating Systems include
Microsoft Windows, Sun Solaris, Mac OS, and the UNIX/Linux Family.
The main functions of a modern general purpose operating system is as follows
UserInterface
All graphics based today, the user interface includes the windows, menus and method of
interaction between the user andthe computer. Prior to graphical user interfaces (GUIs), all
operations were performed by typing in commands. Not extincttoday, a command-line interface
is included in all major operating systems, and technical operations are commonlyexecuted from
the command line by programmers and administrators.
Operating systems may support optional interfaces. Although the overwhelming majority of
people work with the defaultinterface, different "shells" offer variations of functionality, and
"skins" provide different appearances.
JobManagement
Job management controls the time and sequence that applications are run. Common in the
mainframe and high-end serverenvironment, IBM's job control language (JCL) was developed
decades ago to schedule the daily work. The execution of shortscripts at specific times
throughout the day is common in Unix/Linux servers. In a desktop environment, batch files can
bewritten to perform a sequence of operations that can be scheduled to start at a given time.
TaskManagement
multitasking, which is the ability to simultaneously execute multiple programs, is available in all
operating systems today.Critical in the mainframe and server environment, applications can be
prioritized to run faster or slower depending on theirpurpose. In the desktop world, multitasking
is more often than not "task switching," which keeps applications open so userscan bounce
back and forth among them.
DataManagement
Data management keeps track of the data on the disk or in solid state storage. The application
program deals with data byfile name and a particular location within the file. The operating
system's file system knows where the data are physicallystored (which sectors) and interaction
between the application and operating system is through the programming interface(API). When
an application needs to retrieve or save data, it makes a call to the file system, which is in charge
of opening, reading, writing and closing files.
DeviceManagement
Device management controls peripheral devices by sending them commands in their proprietary
command language. Thesoftware routine that deals with each device is called a "driver," and
the OS requires drivers for each of the peripheralsattached to the computer. When a different
type of peripheral is attached, that device's driver must be added to the operatingsystem if not
previously installed.
Security
Operating systems provide password protection to keep unauthorized users out of the system.
Activity logs are maintained,which may provide time accounting for billing purposes. They also
may provide backup and recovery routines for starting overin the event of a system failure.
List of Jobs
Size
Turnaround
Job 1
100k
3
Job 2
10k
1
Job 3
35k
2
Job 4
15k
1
Job 5
23k
2
Job 6
6k
1
Job 7
25k
1
Job 8
55k
2
Job 9
88k
3
Job 10
100k
3

More Related Content

Similar to Placement AlgorithmIt decides which program to load into the memo.pdf

PROCESS.pptx
PROCESS.pptxPROCESS.pptx
PROCESS.pptxDivyaKS18
 
Clock driven scheduling
Clock driven schedulingClock driven scheduling
Clock driven schedulingKamal Acharya
 
Scheduling algo(by HJ)
Scheduling algo(by HJ)Scheduling algo(by HJ)
Scheduling algo(by HJ)Harshit Jain
 
Scheduling algorithms
Scheduling algorithmsScheduling algorithms
Scheduling algorithmsPaurav Shah
 
Memory Management
Memory ManagementMemory Management
Memory ManagementSanthiNivas
 
Document 14 (6).pdf
Document 14 (6).pdfDocument 14 (6).pdf
Document 14 (6).pdfRajMantry
 
Disk Scheduling Algorithms
Disk Scheduling AlgorithmsDisk Scheduling Algorithms
Disk Scheduling Algorithmsali jawad
 
VTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERS
VTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERSVTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERS
VTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERSvtunotesbysree
 
Sheet1Address60741024Offsetaddress0102450506074120484026230723002p.docx
Sheet1Address60741024Offsetaddress0102450506074120484026230723002p.docxSheet1Address60741024Offsetaddress0102450506074120484026230723002p.docx
Sheet1Address60741024Offsetaddress0102450506074120484026230723002p.docxbagotjesusa
 
chapter 5 CPU scheduling.ppt
chapter  5 CPU scheduling.pptchapter  5 CPU scheduling.ppt
chapter 5 CPU scheduling.pptKeyreSebre
 
5 - ch3.pptx
5 - ch3.pptx5 - ch3.pptx
5 - ch3.pptxTemp35704
 
Understanding operating systems 5th ed ch02
Understanding operating systems 5th ed ch02Understanding operating systems 5th ed ch02
Understanding operating systems 5th ed ch02BarrBoy
 
Cpu scheduling final
Cpu scheduling finalCpu scheduling final
Cpu scheduling finalmarangburu42
 
Cs6413 operating-systems-laboratory
Cs6413 operating-systems-laboratoryCs6413 operating-systems-laboratory
Cs6413 operating-systems-laboratoryPreeja Ravishankar
 

Similar to Placement AlgorithmIt decides which program to load into the memo.pdf (20)

PROCESS.pptx
PROCESS.pptxPROCESS.pptx
PROCESS.pptx
 
Clock driven scheduling
Clock driven schedulingClock driven scheduling
Clock driven scheduling
 
Scheduling algo(by HJ)
Scheduling algo(by HJ)Scheduling algo(by HJ)
Scheduling algo(by HJ)
 
Memory Management
Memory ManagementMemory Management
Memory Management
 
Scheduling algorithms
Scheduling algorithmsScheduling algorithms
Scheduling algorithms
 
Memory Management
Memory ManagementMemory Management
Memory Management
 
Bt0070
Bt0070Bt0070
Bt0070
 
Document 14 (6).pdf
Document 14 (6).pdfDocument 14 (6).pdf
Document 14 (6).pdf
 
Memory management
Memory managementMemory management
Memory management
 
Unit 2 notes
Unit 2 notesUnit 2 notes
Unit 2 notes
 
Disk Scheduling Algorithms
Disk Scheduling AlgorithmsDisk Scheduling Algorithms
Disk Scheduling Algorithms
 
VTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERS
VTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERSVTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERS
VTU 5TH SEM CSE OPERATING SYSTEMS SOLVED PAPERS
 
Sheet1Address60741024Offsetaddress0102450506074120484026230723002p.docx
Sheet1Address60741024Offsetaddress0102450506074120484026230723002p.docxSheet1Address60741024Offsetaddress0102450506074120484026230723002p.docx
Sheet1Address60741024Offsetaddress0102450506074120484026230723002p.docx
 
chapter 5 CPU scheduling.ppt
chapter  5 CPU scheduling.pptchapter  5 CPU scheduling.ppt
chapter 5 CPU scheduling.ppt
 
5 - ch3.pptx
5 - ch3.pptx5 - ch3.pptx
5 - ch3.pptx
 
Understanding operating systems 5th ed ch02
Understanding operating systems 5th ed ch02Understanding operating systems 5th ed ch02
Understanding operating systems 5th ed ch02
 
Cpu scheduling final
Cpu scheduling finalCpu scheduling final
Cpu scheduling final
 
exp 3.docx
exp 3.docxexp 3.docx
exp 3.docx
 
Ch4 memory management
Ch4 memory managementCh4 memory management
Ch4 memory management
 
Cs6413 operating-systems-laboratory
Cs6413 operating-systems-laboratoryCs6413 operating-systems-laboratory
Cs6413 operating-systems-laboratory
 

More from aryan9007

A sustainable transportation system is one that • allows the basic .pdf
A sustainable transportation system is one that • allows the basic .pdfA sustainable transportation system is one that • allows the basic .pdf
A sustainable transportation system is one that • allows the basic .pdfaryan9007
 
37511250Solution37511250.pdf
37511250Solution37511250.pdf37511250Solution37511250.pdf
37511250Solution37511250.pdfaryan9007
 
2)The 2 strongest dimensions of my personality area)direction It.pdf
2)The 2 strongest dimensions of my personality area)direction  It.pdf2)The 2 strongest dimensions of my personality area)direction  It.pdf
2)The 2 strongest dimensions of my personality area)direction It.pdfaryan9007
 
1+5 = 6Solution1+5 = 6.pdf
1+5 = 6Solution1+5 = 6.pdf1+5 = 6Solution1+5 = 6.pdf
1+5 = 6Solution1+5 = 6.pdfaryan9007
 
ReverseList.javaimport java.util.ArrayList;public class Rever.pdf
 ReverseList.javaimport java.util.ArrayList;public class Rever.pdf ReverseList.javaimport java.util.ArrayList;public class Rever.pdf
ReverseList.javaimport java.util.ArrayList;public class Rever.pdfaryan9007
 
pOH = 14 - 11.5 = 2.5 [OH-]= 10^-2.5 = 0.003162 M.pdf
                     pOH = 14 - 11.5 = 2.5 [OH-]= 10^-2.5 = 0.003162 M.pdf                     pOH = 14 - 11.5 = 2.5 [OH-]= 10^-2.5 = 0.003162 M.pdf
pOH = 14 - 11.5 = 2.5 [OH-]= 10^-2.5 = 0.003162 M.pdfaryan9007
 
moles of NaOH = 0.250 1.2 10^-3 = 3 10^-4 M.pdf
                     moles of NaOH = 0.250  1.2  10^-3 = 3  10^-4 M.pdf                     moles of NaOH = 0.250  1.2  10^-3 = 3  10^-4 M.pdf
moles of NaOH = 0.250 1.2 10^-3 = 3 10^-4 M.pdfaryan9007
 
molarity = no of moles volume no of moles = mas.pdf
                     molarity = no of moles  volume no of moles = mas.pdf                     molarity = no of moles  volume no of moles = mas.pdf
molarity = no of moles volume no of moles = mas.pdfaryan9007
 
Pharmacology Stimulates alpha and beta receptors.pdf
                     Pharmacology  Stimulates alpha and beta receptors.pdf                     Pharmacology  Stimulates alpha and beta receptors.pdf
Pharmacology Stimulates alpha and beta receptors.pdfaryan9007
 
step1 moles of FeS = 25000x1000Molar mass of FeS.pdf
                     step1 moles of FeS = 25000x1000Molar mass of FeS.pdf                     step1 moles of FeS = 25000x1000Molar mass of FeS.pdf
step1 moles of FeS = 25000x1000Molar mass of FeS.pdfaryan9007
 
React with water Li, Ca, Ba, Na .pdf
                     React with water Li, Ca, Ba, Na                 .pdf                     React with water Li, Ca, Ba, Na                 .pdf
React with water Li, Ca, Ba, Na .pdfaryan9007
 
The Schiff test invented [1] and named after Hugo.pdf
                     The Schiff test invented [1] and named after Hugo.pdf                     The Schiff test invented [1] and named after Hugo.pdf
The Schiff test invented [1] and named after Hugo.pdfaryan9007
 
I- Solu.pdf
                     I-                                       Solu.pdf                     I-                                       Solu.pdf
I- Solu.pdfaryan9007
 
CDE are already in cyclic form A is long enough t.pdf
                     CDE are already in cyclic form A is long enough t.pdf                     CDE are already in cyclic form A is long enough t.pdf
CDE are already in cyclic form A is long enough t.pdfaryan9007
 
C) HF is the strongest acid among them. H2O and .pdf
                     C) HF is the strongest acid among them.  H2O and .pdf                     C) HF is the strongest acid among them.  H2O and .pdf
C) HF is the strongest acid among them. H2O and .pdfaryan9007
 
broken images, cant view, cant help Re post i.pdf
                     broken images, cant view, cant help Re post i.pdf                     broken images, cant view, cant help Re post i.pdf
broken images, cant view, cant help Re post i.pdfaryan9007
 
Yes. Provided that the test is actually performed fairly (true doubl.pdf
Yes. Provided that the test is actually performed fairly (true doubl.pdfYes. Provided that the test is actually performed fairly (true doubl.pdf
Yes. Provided that the test is actually performed fairly (true doubl.pdfaryan9007
 
The studies below provide evidence linking genes and behavior1. F.pdf
The studies below provide evidence linking genes and behavior1. F.pdfThe studies below provide evidence linking genes and behavior1. F.pdf
The studies below provide evidence linking genes and behavior1. F.pdfaryan9007
 
the matrix does not have Enough Rational Eigenvalues to diagonalise.pdf
the matrix does not have Enough Rational Eigenvalues to diagonalise.pdfthe matrix does not have Enough Rational Eigenvalues to diagonalise.pdf
the matrix does not have Enough Rational Eigenvalues to diagonalise.pdfaryan9007
 
The differences in activities between system development and system .pdf
The differences in activities between system development and system .pdfThe differences in activities between system development and system .pdf
The differences in activities between system development and system .pdfaryan9007
 

More from aryan9007 (20)

A sustainable transportation system is one that • allows the basic .pdf
A sustainable transportation system is one that • allows the basic .pdfA sustainable transportation system is one that • allows the basic .pdf
A sustainable transportation system is one that • allows the basic .pdf
 
37511250Solution37511250.pdf
37511250Solution37511250.pdf37511250Solution37511250.pdf
37511250Solution37511250.pdf
 
2)The 2 strongest dimensions of my personality area)direction It.pdf
2)The 2 strongest dimensions of my personality area)direction  It.pdf2)The 2 strongest dimensions of my personality area)direction  It.pdf
2)The 2 strongest dimensions of my personality area)direction It.pdf
 
1+5 = 6Solution1+5 = 6.pdf
1+5 = 6Solution1+5 = 6.pdf1+5 = 6Solution1+5 = 6.pdf
1+5 = 6Solution1+5 = 6.pdf
 
ReverseList.javaimport java.util.ArrayList;public class Rever.pdf
 ReverseList.javaimport java.util.ArrayList;public class Rever.pdf ReverseList.javaimport java.util.ArrayList;public class Rever.pdf
ReverseList.javaimport java.util.ArrayList;public class Rever.pdf
 
pOH = 14 - 11.5 = 2.5 [OH-]= 10^-2.5 = 0.003162 M.pdf
                     pOH = 14 - 11.5 = 2.5 [OH-]= 10^-2.5 = 0.003162 M.pdf                     pOH = 14 - 11.5 = 2.5 [OH-]= 10^-2.5 = 0.003162 M.pdf
pOH = 14 - 11.5 = 2.5 [OH-]= 10^-2.5 = 0.003162 M.pdf
 
moles of NaOH = 0.250 1.2 10^-3 = 3 10^-4 M.pdf
                     moles of NaOH = 0.250  1.2  10^-3 = 3  10^-4 M.pdf                     moles of NaOH = 0.250  1.2  10^-3 = 3  10^-4 M.pdf
moles of NaOH = 0.250 1.2 10^-3 = 3 10^-4 M.pdf
 
molarity = no of moles volume no of moles = mas.pdf
                     molarity = no of moles  volume no of moles = mas.pdf                     molarity = no of moles  volume no of moles = mas.pdf
molarity = no of moles volume no of moles = mas.pdf
 
Pharmacology Stimulates alpha and beta receptors.pdf
                     Pharmacology  Stimulates alpha and beta receptors.pdf                     Pharmacology  Stimulates alpha and beta receptors.pdf
Pharmacology Stimulates alpha and beta receptors.pdf
 
step1 moles of FeS = 25000x1000Molar mass of FeS.pdf
                     step1 moles of FeS = 25000x1000Molar mass of FeS.pdf                     step1 moles of FeS = 25000x1000Molar mass of FeS.pdf
step1 moles of FeS = 25000x1000Molar mass of FeS.pdf
 
React with water Li, Ca, Ba, Na .pdf
                     React with water Li, Ca, Ba, Na                 .pdf                     React with water Li, Ca, Ba, Na                 .pdf
React with water Li, Ca, Ba, Na .pdf
 
The Schiff test invented [1] and named after Hugo.pdf
                     The Schiff test invented [1] and named after Hugo.pdf                     The Schiff test invented [1] and named after Hugo.pdf
The Schiff test invented [1] and named after Hugo.pdf
 
I- Solu.pdf
                     I-                                       Solu.pdf                     I-                                       Solu.pdf
I- Solu.pdf
 
CDE are already in cyclic form A is long enough t.pdf
                     CDE are already in cyclic form A is long enough t.pdf                     CDE are already in cyclic form A is long enough t.pdf
CDE are already in cyclic form A is long enough t.pdf
 
C) HF is the strongest acid among them. H2O and .pdf
                     C) HF is the strongest acid among them.  H2O and .pdf                     C) HF is the strongest acid among them.  H2O and .pdf
C) HF is the strongest acid among them. H2O and .pdf
 
broken images, cant view, cant help Re post i.pdf
                     broken images, cant view, cant help Re post i.pdf                     broken images, cant view, cant help Re post i.pdf
broken images, cant view, cant help Re post i.pdf
 
Yes. Provided that the test is actually performed fairly (true doubl.pdf
Yes. Provided that the test is actually performed fairly (true doubl.pdfYes. Provided that the test is actually performed fairly (true doubl.pdf
Yes. Provided that the test is actually performed fairly (true doubl.pdf
 
The studies below provide evidence linking genes and behavior1. F.pdf
The studies below provide evidence linking genes and behavior1. F.pdfThe studies below provide evidence linking genes and behavior1. F.pdf
The studies below provide evidence linking genes and behavior1. F.pdf
 
the matrix does not have Enough Rational Eigenvalues to diagonalise.pdf
the matrix does not have Enough Rational Eigenvalues to diagonalise.pdfthe matrix does not have Enough Rational Eigenvalues to diagonalise.pdf
the matrix does not have Enough Rational Eigenvalues to diagonalise.pdf
 
The differences in activities between system development and system .pdf
The differences in activities between system development and system .pdfThe differences in activities between system development and system .pdf
The differences in activities between system development and system .pdf
 

Recently uploaded

Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 

Recently uploaded (20)

Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 

Placement AlgorithmIt decides which program to load into the memo.pdf

  • 1. Placement Algorithm: It decides which program to load into the memory. Common placement algorithms are first-fit, next-fit, best-fit and priority fit. Next-fit often leads to allocation of the largest block at the end of memory First-fit favors allocation near the beginning: tends to create less fragmentation then Next-fit Best-fit searches for smallest block: the fragment left behind is small as possible Main memory quickly forms holes too small to hold any process: compaction generally needs to be done more often The following jobs are loaded into memory using fixed partition following a certain memory allocation method (best-fit, first-fit and worst-fit). List of Jobs Size Turnaround Job 1 100k 3 Job 2 10k 1 Job 3 35k 2 Job 4 15k 1 Job 5 23k 2 Job 6 6k 1 Job 7 25k
  • 2. 1 Job 8 55k 2 Job 9 88k 3 Job 10 100k 3 Memory Block Size Block 1 50k Block 2 200k Block 3 70k Block 4 115k Block 5 15k BEST FIT Best-fit memory allocation makes the best use of memory space but slower in making allocation. In the illustration below, on the first processing cycle, jobs 1 to 5 are submitted and be processed first. After the first cycle, job 2 and 4 located on block 5 and block 3 respectively and both having one turnaround are replace by job 6 and 7 while job 1, job 3 and job 5 remain on their designated block. In the third cycle, job 1 remain on block 4, while job 8 and job 9 replace job 7 and job 5 respectively (both having 2 turnaround). On the next cycle, job 9 and job 8 remain on their block while job 10 replace job 1 (having 3 turnaround). On the fifth cycle only job 9 and 10 are the remaining jobs to be process and there are 3 free memory blocks for the incoming jobs. But since there are only 10 jobs, so it will remain free. On the sixth cycle, job 10
  • 3. is the only remaining job to be process and finally on the seventh cycle, all jobs are successfully process and executed and all the memory blocks are now free. FIRST- FIT First-fit memory allocation is faster in making allocation but leads to memory waste. The illustration below shows that on the first cycle, job 1 to job 4 are submitted first while job 6 occupied block 5 because the remaining memory space is enough to its required memory size to be process. While job 5 is in waiting queue because the memory size in block 5 is not enough for the job 5 to be process. Then on the next cycle, job 5 replace job 2 on block 1 and job 7 replace job 4 on block 4 after both job 2 and job 4 finish their process. Job 8 is in waiting queue because the remaining block is not enough to accommodate the memory size of job 8. On the third cycle, job 8 replace job 3 and job 9 occupies block 4 after processing job 7. While Job 1 and job 5 remain on its designated block. After the third cycle block 1 and block 5 are free to serve the incoming jobs but since there are 10 jobs so it will remain free. And job 10 occupies block 2 after job 1 finish its turns. On the other hand, job 8 and job 9 remain on their block. Then on the fifth cycle, only job 9 and job 10 are to be process while there are 3 memory blocks free. In the sixth cycle, job 10 is the only remaining job to be process and lastly in the seventh cycle, all jobs are successfully process and executed and all the memory blocks are now free. WORST-FIT Worst-fit memory allocation is opposite to best-fit. It allocates free available block to the new job and it is not the best choice for an actual system. In the illustration, on the first cycle, job 5 is in waiting queue while job 1 to job 4 and job 6 are the jobs to be first process. After then, job 5 occupies the free block replacing job 2. Block 5 is now free to accommodate the next job which is job 8 but since the size in block 5 is not enough for job 8, so job 8 is in waiting queue. Then on the next cycle, block 3 accommodate job 8 while job 1 and job 5 remain on their memory block. In this cycle, there are 2 memory blocks are free. In the fourth cycle, only job 8 on block 3 remains while job 1 and job 5 are respectively replace by job 9 and job 10. Just the same in the previous cycle, there are still two free memory blocks. At fifth cycle, job 8 finish its job while the job 9 and job 10 are still on block 2 and block 4 respectively and there is additional memory block free. The same scenario happen on the sixth cycle. Lastly, on the seventh cycle, both job 9 and job 10 finish its process and in this cycle, all jobs are successfully process and executed. And all the memory blocks are now free. SCAN disk Scheduling Algorithm In operating systems, seek time is very important. Since all device requests are linked in queues, the seek time is increased causing the system to slow down. Disk Scheduling Algorithms are used to reduce the total seek time of any request. Disk scheduling algorithms are used to allocate the services to the I/O requests on the disk [1].
  • 4. Since seeking disk requests is time consuming, disk scheduling algorithms try to minimize this latency. If desired disk drive or controller is available, request is served immediately. If busy, new request for service will be placed in the queue of pending requests. When one request is completed, the Operating System has to choose which pending request to service next. The OS relies on the type of algorithm it needs when dealing and choosing what particular disk request is to be processed next. The objective of This algorithm is performed by moving the R/W head back-and-forth to the innermost and outermost track. As it scans the tracks from end to end, it process all the requests found in the direction it is headed. This will ensure that all track requests, whether in the outermost, middle or innermost location, will be traversed by the access arm thereby finding all the requests. This is also known as the Elevator algorithm. Using the same sets of example in FCFS the solution are as follows: (THM) = (50-0) + (180-0) = 50 + 180 (THM) = 230 Seek Time = THM * Seek rate = 230 * 5ms Seek Time = 1,150 ms this algorithm works like an elevator does. In the algorithm example, it scans down towards the nearest end and when it reached the bottom it scans up servicing the requests that it did not get going down. If a request comes in after it has been scanned, it will not be serviced until the process comes back down or moves back up [5]. This process moved a total of 230 tracks and a seek time of 1,150. This is optimal than the previous algorithm. In operating systems, seek time is very important. Since all device requests are linked in queues, the seek time is increased causing the system to slow down. Disk Scheduling Algorithms are used to reduce the total seek time of any request. Disk scheduling algorithms are used to allocate the services to the I/O requests on the disk [1]. Since seeking disk requests is time consuming, disk scheduling algorithms try to minimize this latency. If desired disk drive or controller is available, request is served immediately. If busy, new request for service will be placed in the queue of pending requests. When one request is completed, the Operating System has to choose which pending request to service next. The OS relies on the type of algorithm it needs when dealing and choosing what particular disk request is to be processed next. The objective of using these algorithms is keeping Head movements to the amount as possible. The less the head to move, the faster the seek time will be. To see how it works, the different disk scheduling algorithms will be discussed and examples are also provided for better understanding on these different algorithms. Although there are other algorithms that reduce the seek time of all requests, I will only concentrate on the following disk scheduling algorithms: First Come-First Serve (FCFS) Shortest Seek Time First (SSTF) Elevator (SCAN)
  • 5. Circular SCAN (C-SCAN) LOOK C-LOOK This approach works like an elevator does. It scans down towards the nearest end and then when it hits the bottom it scans up servicing the requests that it didn't get going down. If a request comes in after it has been scanned it will not be serviced until the process comes back down or moves back up. This process moved a total of 230 tracks. Once again this is more optimal than the previous algorithm, but it is not the best. Operating System: Operating System (OS) is the software that manages the sharing of the resources of a computer. An operating system processes system data and user input, and responds by allocating and managing tasks and internal system resources as a service to users and programs of the system. At the foundation of all system software, an operating system performs basic tasks such as controlling and allocating memory, prioritizing system requests, controlling input and output devices, facilitating networking and managing file systems. Major Operating Systems include Microsoft Windows, Sun Solaris, Mac OS, and the UNIX/Linux Family. The main functions of a modern general purpose operating system is as follows UserInterface All graphics based today, the user interface includes the windows, menus and method of interaction between the user andthe computer. Prior to graphical user interfaces (GUIs), all operations were performed by typing in commands. Not extincttoday, a command-line interface is included in all major operating systems, and technical operations are commonlyexecuted from the command line by programmers and administrators. Operating systems may support optional interfaces. Although the overwhelming majority of people work with the defaultinterface, different "shells" offer variations of functionality, and "skins" provide different appearances. JobManagement Job management controls the time and sequence that applications are run. Common in the mainframe and high-end serverenvironment, IBM's job control language (JCL) was developed decades ago to schedule the daily work. The execution of shortscripts at specific times throughout the day is common in Unix/Linux servers. In a desktop environment, batch files can bewritten to perform a sequence of operations that can be scheduled to start at a given time.
  • 6. TaskManagement multitasking, which is the ability to simultaneously execute multiple programs, is available in all operating systems today.Critical in the mainframe and server environment, applications can be prioritized to run faster or slower depending on theirpurpose. In the desktop world, multitasking is more often than not "task switching," which keeps applications open so userscan bounce back and forth among them. DataManagement Data management keeps track of the data on the disk or in solid state storage. The application program deals with data byfile name and a particular location within the file. The operating system's file system knows where the data are physicallystored (which sectors) and interaction between the application and operating system is through the programming interface(API). When an application needs to retrieve or save data, it makes a call to the file system, which is in charge of opening, reading, writing and closing files. DeviceManagement Device management controls peripheral devices by sending them commands in their proprietary command language. Thesoftware routine that deals with each device is called a "driver," and the OS requires drivers for each of the peripheralsattached to the computer. When a different type of peripheral is attached, that device's driver must be added to the operatingsystem if not previously installed. Security Operating systems provide password protection to keep unauthorized users out of the system. Activity logs are maintained,which may provide time accounting for billing purposes. They also may provide backup and recovery routines for starting overin the event of a system failure. List of Jobs Size Turnaround Job 1 100k 3 Job 2 10k 1 Job 3
  • 7. 35k 2 Job 4 15k 1 Job 5 23k 2 Job 6 6k 1 Job 7 25k 1 Job 8 55k 2 Job 9 88k 3 Job 10 100k 3 Solution Placement Algorithm: It decides which program to load into the memory. Common placement algorithms are first-fit, next-fit, best-fit and priority fit. Next-fit often leads to allocation of the largest block at the end of memory First-fit favors allocation near the beginning: tends to create less fragmentation then Next-fit Best-fit searches for smallest block: the fragment left behind is small as possible Main memory quickly forms holes too small to hold any process: compaction generally needs to be done more often The following jobs are loaded into memory using fixed partition following a certain memory allocation method (best-fit, first-fit and worst-fit).
  • 8. List of Jobs Size Turnaround Job 1 100k 3 Job 2 10k 1 Job 3 35k 2 Job 4 15k 1 Job 5 23k 2 Job 6 6k 1 Job 7 25k 1 Job 8 55k 2 Job 9 88k 3 Job 10 100k 3 Memory Block Size
  • 9. Block 1 50k Block 2 200k Block 3 70k Block 4 115k Block 5 15k BEST FIT Best-fit memory allocation makes the best use of memory space but slower in making allocation. In the illustration below, on the first processing cycle, jobs 1 to 5 are submitted and be processed first. After the first cycle, job 2 and 4 located on block 5 and block 3 respectively and both having one turnaround are replace by job 6 and 7 while job 1, job 3 and job 5 remain on their designated block. In the third cycle, job 1 remain on block 4, while job 8 and job 9 replace job 7 and job 5 respectively (both having 2 turnaround). On the next cycle, job 9 and job 8 remain on their block while job 10 replace job 1 (having 3 turnaround). On the fifth cycle only job 9 and 10 are the remaining jobs to be process and there are 3 free memory blocks for the incoming jobs. But since there are only 10 jobs, so it will remain free. On the sixth cycle, job 10 is the only remaining job to be process and finally on the seventh cycle, all jobs are successfully process and executed and all the memory blocks are now free. FIRST- FIT First-fit memory allocation is faster in making allocation but leads to memory waste. The illustration below shows that on the first cycle, job 1 to job 4 are submitted first while job 6 occupied block 5 because the remaining memory space is enough to its required memory size to be process. While job 5 is in waiting queue because the memory size in block 5 is not enough for the job 5 to be process. Then on the next cycle, job 5 replace job 2 on block 1 and job 7 replace job 4 on block 4 after both job 2 and job 4 finish their process. Job 8 is in waiting queue because the remaining block is not enough to accommodate the memory size of job 8. On the third cycle, job 8 replace job 3 and job 9 occupies block 4 after processing job 7. While Job 1 and job 5
  • 10. remain on its designated block. After the third cycle block 1 and block 5 are free to serve the incoming jobs but since there are 10 jobs so it will remain free. And job 10 occupies block 2 after job 1 finish its turns. On the other hand, job 8 and job 9 remain on their block. Then on the fifth cycle, only job 9 and job 10 are to be process while there are 3 memory blocks free. In the sixth cycle, job 10 is the only remaining job to be process and lastly in the seventh cycle, all jobs are successfully process and executed and all the memory blocks are now free. WORST-FIT Worst-fit memory allocation is opposite to best-fit. It allocates free available block to the new job and it is not the best choice for an actual system. In the illustration, on the first cycle, job 5 is in waiting queue while job 1 to job 4 and job 6 are the jobs to be first process. After then, job 5 occupies the free block replacing job 2. Block 5 is now free to accommodate the next job which is job 8 but since the size in block 5 is not enough for job 8, so job 8 is in waiting queue. Then on the next cycle, block 3 accommodate job 8 while job 1 and job 5 remain on their memory block. In this cycle, there are 2 memory blocks are free. In the fourth cycle, only job 8 on block 3 remains while job 1 and job 5 are respectively replace by job 9 and job 10. Just the same in the previous cycle, there are still two free memory blocks. At fifth cycle, job 8 finish its job while the job 9 and job 10 are still on block 2 and block 4 respectively and there is additional memory block free. The same scenario happen on the sixth cycle. Lastly, on the seventh cycle, both job 9 and job 10 finish its process and in this cycle, all jobs are successfully process and executed. And all the memory blocks are now free. SCAN disk Scheduling Algorithm In operating systems, seek time is very important. Since all device requests are linked in queues, the seek time is increased causing the system to slow down. Disk Scheduling Algorithms are used to reduce the total seek time of any request. Disk scheduling algorithms are used to allocate the services to the I/O requests on the disk [1]. Since seeking disk requests is time consuming, disk scheduling algorithms try to minimize this latency. If desired disk drive or controller is available, request is served immediately. If busy, new request for service will be placed in the queue of pending requests. When one request is completed, the Operating System has to choose which pending request to service next. The OS relies on the type of algorithm it needs when dealing and choosing what particular disk request is to be processed next. The objective of This algorithm is performed by moving the R/W head back-and-forth to the innermost and outermost track. As it scans the tracks from end to end, it process all the requests found in the direction it is headed. This will ensure that all track requests, whether in the outermost, middle or innermost location, will be traversed by the access arm thereby finding all the requests. This is also known as the Elevator algorithm. Using the same sets of example in FCFS the solution are
  • 11. as follows: (THM) = (50-0) + (180-0) = 50 + 180 (THM) = 230 Seek Time = THM * Seek rate = 230 * 5ms Seek Time = 1,150 ms this algorithm works like an elevator does. In the algorithm example, it scans down towards the nearest end and when it reached the bottom it scans up servicing the requests that it did not get going down. If a request comes in after it has been scanned, it will not be serviced until the process comes back down or moves back up [5]. This process moved a total of 230 tracks and a seek time of 1,150. This is optimal than the previous algorithm. In operating systems, seek time is very important. Since all device requests are linked in queues, the seek time is increased causing the system to slow down. Disk Scheduling Algorithms are used to reduce the total seek time of any request. Disk scheduling algorithms are used to allocate the services to the I/O requests on the disk [1]. Since seeking disk requests is time consuming, disk scheduling algorithms try to minimize this latency. If desired disk drive or controller is available, request is served immediately. If busy, new request for service will be placed in the queue of pending requests. When one request is completed, the Operating System has to choose which pending request to service next. The OS relies on the type of algorithm it needs when dealing and choosing what particular disk request is to be processed next. The objective of using these algorithms is keeping Head movements to the amount as possible. The less the head to move, the faster the seek time will be. To see how it works, the different disk scheduling algorithms will be discussed and examples are also provided for better understanding on these different algorithms. Although there are other algorithms that reduce the seek time of all requests, I will only concentrate on the following disk scheduling algorithms: First Come-First Serve (FCFS) Shortest Seek Time First (SSTF) Elevator (SCAN) Circular SCAN (C-SCAN) LOOK C-LOOK This approach works like an elevator does. It scans down towards the nearest end and then when it hits the bottom it scans up servicing the requests that it didn't get going down. If a request comes in after it has been scanned it will not be serviced until the process comes back down or moves back up. This process moved a total of 230 tracks. Once again this is more optimal than the previous algorithm, but it is not the best. Operating System: Operating System (OS) is the software that manages the sharing of the resources of a computer. An operating system processes system data and user input, and responds by allocating and
  • 12. managing tasks and internal system resources as a service to users and programs of the system. At the foundation of all system software, an operating system performs basic tasks such as controlling and allocating memory, prioritizing system requests, controlling input and output devices, facilitating networking and managing file systems. Major Operating Systems include Microsoft Windows, Sun Solaris, Mac OS, and the UNIX/Linux Family. The main functions of a modern general purpose operating system is as follows UserInterface All graphics based today, the user interface includes the windows, menus and method of interaction between the user andthe computer. Prior to graphical user interfaces (GUIs), all operations were performed by typing in commands. Not extincttoday, a command-line interface is included in all major operating systems, and technical operations are commonlyexecuted from the command line by programmers and administrators. Operating systems may support optional interfaces. Although the overwhelming majority of people work with the defaultinterface, different "shells" offer variations of functionality, and "skins" provide different appearances. JobManagement Job management controls the time and sequence that applications are run. Common in the mainframe and high-end serverenvironment, IBM's job control language (JCL) was developed decades ago to schedule the daily work. The execution of shortscripts at specific times throughout the day is common in Unix/Linux servers. In a desktop environment, batch files can bewritten to perform a sequence of operations that can be scheduled to start at a given time. TaskManagement multitasking, which is the ability to simultaneously execute multiple programs, is available in all operating systems today.Critical in the mainframe and server environment, applications can be prioritized to run faster or slower depending on theirpurpose. In the desktop world, multitasking is more often than not "task switching," which keeps applications open so userscan bounce back and forth among them. DataManagement Data management keeps track of the data on the disk or in solid state storage. The application program deals with data byfile name and a particular location within the file. The operating system's file system knows where the data are physicallystored (which sectors) and interaction
  • 13. between the application and operating system is through the programming interface(API). When an application needs to retrieve or save data, it makes a call to the file system, which is in charge of opening, reading, writing and closing files. DeviceManagement Device management controls peripheral devices by sending them commands in their proprietary command language. Thesoftware routine that deals with each device is called a "driver," and the OS requires drivers for each of the peripheralsattached to the computer. When a different type of peripheral is attached, that device's driver must be added to the operatingsystem if not previously installed. Security Operating systems provide password protection to keep unauthorized users out of the system. Activity logs are maintained,which may provide time accounting for billing purposes. They also may provide backup and recovery routines for starting overin the event of a system failure. List of Jobs Size Turnaround Job 1 100k 3 Job 2 10k 1 Job 3 35k 2 Job 4 15k 1 Job 5 23k 2 Job 6 6k 1
  • 14. Job 7 25k 1 Job 8 55k 2 Job 9 88k 3 Job 10 100k 3