Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CSEP551
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Krishna Vinnakota
CSEP551
Commits
f4c12f11
Commit
f4c12f11
authored
15 years ago
by
Austin Clements
Browse files
Options
Downloads
Patches
Plain Diff
Add the test we used in lecture to creash the IDE system when the
locks were moved around.
parent
d6cd7d08
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+1
-0
1 addition, 0 deletions
Makefile
stressfs.c
+38
-0
38 additions, 0 deletions
stressfs.c
with
39 additions
and
0 deletions
Makefile
+
1
−
0
View file @
f4c12f11
...
...
@@ -107,6 +107,7 @@ UPROGS=\
_mkdir
\
_rm
\
_sh
\
_stressfs
\
_usertests
\
_wc
\
_zombie
\
...
...
This diff is collapsed.
Click to expand it.
stressfs.c
0 → 100644
+
38
−
0
View file @
f4c12f11
// Demonstrate that moving the "acquire" in iderw after the loop that
// appends to the idequeue results in a race.
// For this to work, you should also add a spin within iderw's
// idequeue traversal loop. Spinning 40000 times demonstrated the bug
// after about 5 runs of stressfs in QEMU on a 2.1GHz CPU.
#include
"types.h"
#include
"stat.h"
#include
"user.h"
#include
"fs.h"
#include
"fcntl.h"
int
main
(
int
argc
,
char
*
argv
[])
{
int
i
;
printf
(
1
,
"stressfs starting
\n
"
);
for
(
i
=
0
;
i
<
4
;
i
++
)
{
if
(
fork
()
>
0
)
{
break
;
}
}
printf
(
1
,
"%d
\n
"
,
i
);
char
path
[]
=
"stressfs0"
;
path
[
8
]
+=
i
;
int
fd
=
open
(
path
,
O_CREATE
|
O_RDWR
);
for
(
i
=
0
;
i
<
100
;
i
++
)
printf
(
fd
,
"%d
\n
"
,
i
);
close
(
fd
);
wait
();
exit
();
}
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