Comparison of Static and Dynamic Data Structure
Comparison of Static and Dynamic Data Structure
Dynamic Static
Dynamic-advantages Static-Advantages
• Makes the most efficient use of • The memory allocation is fixed.
RAM as it uses as much memory No problems to adding and
as it needs. removing data items.
• Easier to program .. There is no
• One does not need to know need to check upon the data
decide upon the size of the data structure size.
structure in advance. • Space reserved in RAM will be
available.
Comparison of Static and dynamic data
structure
Dynamic-Disadvantages Static-Disadvantages
• Memory allocation is dynamic-> • Insufficient memory .because
Overflow. Allow to limit exceed predefined.
and underflow it become empty.
• Difficult predict the required
• Dynamic data are slower during array size.
execution.
• Random access is allowed and
elements should be visited
sequentially.
Batch Processing
• Batch Processing system is an efficient way of processing large
volumes of data.
• Batch processing can handle large data volumes effectively and
produce timely results.
• Some programs are batched together and then executed as a group,
without the need of any intervention from the user. Only one program
is actually running at a time. While other are waiting for their turn .
When it completes, the next program in the queue runs and so on.
Until all the program in the batch are run.
Multiprogramming
• More than one program could be loaded in the main memory at a
same time ready to execute. Only one program will actually be
executed by the CPU at any one point in time. All the other programs
will be waiting for their turn.
Multitasking
• Multitasking refers to the ability of an operating system to handle
multiple tasks (processes) at the same time.
• TO ensure that high-priority tasks get the CPU time they need
promptly.
• When high priority takes over from the lower priority task currently
running.
Common Preemptive Scheduling
Algorithms
• 1. FIRST COME FIRST SERVE SCHEDULING (FCFS)
• 2. SHORTEST JOB FIRST SCHEDULING (SJF)
• 3. Priority scheduling
• 4. ROUND ROBIN Scheduling
• 5. Multilevel Queue Scheduling.
• 6. Multilevel Feedback queue scheduling.
First Come First Serve
Scheduling (FCFS)
• First Come First Serve Scheduling (FCFS):
• Description: Processes are executed in the order they arrive in the
ready queue.
• Advantages: Simple to implement.
Shortest Job First Scheduling
(SJF):
•Description: The process with the shortest execution time is selected next.
• Priority Scheduling:
• Description: Processes are assigned priorities, and the CPU is
allocated to the process with the highest priority.
• Advantages: Ensures important processes are executed first.
• Disadvantages: Lower priority processes may suffer from starvation.
Round Robin Scheduling: