MadhavBahl / MadhavBahl/OperatingSystem-Algorithms

The code doesn't show exact output

Open
#5 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
26
Forks
13
PR merge metrics
No merged PRs in 30d

Description

when the process once got allocated,it again searches to another block of size greater.
The modification should be done as given below:
The flag should be used which checks for the process which is already allocated into the block.
int flag1[n];
for(i=0;i=jobSize[i] && blockSize[j]>0 && flag1[i]==0) {
alloc[i]=j;
flag1[i]=1;

blockSize[j]=blockSize[j]-jobSize[i];

}
}
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the allocation logic that uses blockSize, jobSize, alloc, and nb; the issue does not name a source file or test. First reproduce the incorrect allocation behavior and inspect how a process is marked after allocation. Done means an already allocated process is not searched against later blocks and the resulting output is exact.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.