Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
1
1801_OS_assignment4
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Seongjun Park
1801_OS_assignment4
Commits
f2f96da3
Commit
f2f96da3
authored
7 years ago
by
HyukSang Kwon
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
http://git.ajou.ac.kr/ckai22/1801_OS_assignment4
parents
48c07269
cf3df0ec
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+74
-0
74 additions, 0 deletions
README.md
with
74 additions
and
0 deletions
README.md
+
74
−
0
View file @
f2f96da3
Operating system Assignment 4
===================
TA Info & Assignment URL
---
-
TA Mail: ckai22@ajou.ac.kr
-
TA gitlab: http://git.ajou.ac.kr/ckai22
File Info
---
-
**main.c**
: Implements input and output
-
**alloc.h**
: Implements meta structure
-
**alloc.c**
: Implements malloc, free, and realloc
-
**Makefile**
: compiles the
-
**input**
directory: saves the input file
TEST
---
##### Test proceeds as follows.
- - -
1.
Input File name to the main function parameter.
2.
Read File (File IO)
3.
Interpret commands in File
4.
Output to stdout
##### **Command structure in File**
- - -
"Number of command lines" "Fit"
<br>
"Command" "Contents"
<br>
"Command" "Contents"
<br>
...
<br>
##### **Fit type (case sensitive)**
- - -
F: first fit
<br>
B: Best fit
<br>
W: worst fit
<br>
##### **Command type**
- - -
**s**
String: String The command to put the value into
<br>
**f**
n: nth allocation area free
<br>
**r**
n m: reallocation with m bytes in the nth allocation area
<br>
**e**
n: Allocate space without contents to n bytes
<br>
##### **Output**
- - -
“Free" "size" "content (if command is m only)"
<br>
"Free" "size" "content (if command is m only)"
<br>
...
<br>
##### **Example**
- - -
E1)
<br>
**Input**
<br>
3 F
<br>
m Think like a man of action and act like man of thought.
<br>
m Courage is very important. Like a muscle, it is strengthened by use.
<br>
m Life is the art of drawing sufficient conclusions from insufficient premises.
<br>
**Output**
<br>
0 56 Think like a man of action and act like man of thought.
<br>
0 72 Courage is very important. Like a muscle, it is strengthened by use.
<br>
0 80 Life is the art of drawing sufficient conclusions from insufficient premises.
<br>
<br>
E2)
<br>
**Input**
<br>
2 F
<br>
m Think like a man of action and act like man of thought.
<br>
f 0
<br>
**Output**
<br>
1 56
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment