Professional Documents
Culture Documents
Project by
Name: Roll No:
2:
3:
Project Title
Computer with linux.
Equipments Required:
Duration:
Operating System Concepts Simulator is an application to graphically
Objectives:
simulate Operating System concepts.
Process Management
Description:
1)First Come First Serve(FCFS):
-Analogy:
This is exactly how OS's with this design let programs conduct their
business. One person (aka: process) at a time.
-Implementation:
To implement this, you can create a queue, an abstract data type (ADT)
that can be constructed from a linked list data structure. The system can
dequeue the next process from the front of the queue, run the process
until completion (or enqueue the process at the end of the line in more
complex schemes), then enqueue the process at the end of the line,
allowing the next process to use the CPU.
Advantages:
· simple
· easy and useful and understand
· first come, first served
Disadvantages:
-Analogy:
Shortest job next (SJN), also known as shortest job first (SJF) or shortest
process next (SPN), is a scheduling policy that selects for execution the
waiting process with the smallest execution time. SJN is a non-preemptive
algorithm. Shortest remaining time is a preemptive variant of SJN.
-Implementation:
-Advantage:
-Disadvantage:
Disadvantage of using shortest job next is that the total execution time of a
job must be known before execution. While it is impossible to predict
execution time perfectly, several methods can be used to estimate it, such
as a weighted average of previous execution times.
-Analogy:
Processes with the same priority are executed on first come first served
basis. Priority can be decided based on memory requirements, time
requirements or any other resource requirement.
-Implementation:
and priority.
-Advantages:
1. Simplicity.
-Disadvantages:
4)Round Robin:
-Analogy:
-Implementation:
1. The queue structure in ready queue is of First In First Out (FIFO) type.
2. A fixed time is allotted to every process that arrives in the queue. This
fixed time is known as time slice or time quantum.
3. The first process that arrives is selected and sent to the processor for
execution. If it is not able to complete its execution within the time
quantum provided, then an interrupt is generated using an automated
timer.
4. The process is then stopped and is sent back at the end of the queue.
However, the state is saved and context is thereby stored in memory. This
helps the process to resume from the point where it was interrupted.
5. The scheduler selects another process from the ready queue and
dispatches it to the processor for its execution. It is executed until the time
Quantum does not exceed.
6. The same steps are repeated until all the process are finished.
-Advantages:
-Disadvantages:
1. Low Priority tasks may wait for more time if the many tasks
are given high priority.
2. High Priority tasks may not execute the full instruction
given stipulated amount of time.
Memory Management
-Paging
· Page Faults
When a process tries to reference a page not currently present in RAM, the
processor treats this invalid memory reference as a page fault and transfers
control from the program to the operating system.
When all page frames are in use, the operating system must select a page
frame to reuse for the page the program now needs. If the evicted page
frame was dynamically allocated by a program to hold data, or if a program
modified it since it was read into RAM (in other words, if it has become
"dirty"), it must be written out to disk before being freed. If a program later
references the evicted page, another page fault occurs and the page must
be read back into RAM.
Demand paging
When pure demand paging is used, pages are loaded only when they are
referenced. A program from a memory mapped file begins execution with
none of its pages in RAM. As the program commits page faults, the
operating system copies the needed pages from the file or swap partition
containing the page data into RAM.
Initially all slots are empty, so when 1, 3, 0 came they are allocated to the
empty slots —> 3 Page Faults.
In this algorithm, pages are replaced which would not be used for
the longest duration of time in the future.
Initially all slots are empty, so when 7 0 1 2 are allocated to the empty slots
—> 4 Page faults
when 3 came it will take the place of 7 because it is not used for the longest
duration of time in the future.—>1 Page fault.
Now for the further page reference string —> 0 Page fault because they
are already available in the memory.
Initially all slots are empty, so when 7 0 1 2 are allocated to the empty slots
—> 4 Page faults
0 is already their so —> 0 Page fault.
when 3 came it will take the place of 7 because it is least recently used —
>1 Page fault
Now for the further page reference string —> 0 Page fault because they
are already available in the memory.
· Segmentation
2. Simple segmentation –
Advantages of Segmentation –
· No Internal fragmentation.
Disadvantage of Segmentation –
Theory/History:
Block Diagram:
Algorithm/Flowchart:
Application:
Conclusion:
References:
Future Scope:
Output
Add screen shot of software based project