السلام عليكم .
بس اللي يطيع فهم هذا السؤال يقول ما فهم
Description:
- You have learned during the lectures that de-fragmentation (compaction)
is used to solve the external fragmentation problem.
-Write a program to simulate the de-fragmentation process on a memory.
- Assume the size of the memory is 500 Kbyte.
- A job table has the following entries: (Job number, Start address, Job size)
- In your homework, the job table is stored in a text file called: JOBS.TXT
Example of a the text file:
1 1000 400
2 1500 1300
3 3010 100
4 4031 500
The result of the new job table after the de-fragmentation process is displayed on the
screen as follows:
Program done by : Your name
************************************************************************
Job Start Address Size
************************************************************************
1 ? 400
2 ? 1300
3 ? 100
4 ? 500
2
Notes:
- The teacher will test your program on his own file.
- Each line in the file JOBS.TXT contains information about one job only.
- Do not write comma between the columns in the text file, just leave one space.
- Do not write any headline for the job table in the file.
- The number of jobs is flexible according to the lines in the file but must be less than 10.
يريد برمجه باستخدام لغة سي بلس بلس

