Skip to content
Open
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ UPROGS=\
_stressfs\
_usertests\
_wc\
_sanity\
_zombie\

fs.img: mkfs README $(UPROGS)
Expand Down Expand Up @@ -249,7 +250,7 @@ qemu-nox-gdb: fs.img xv6.img .gdbinit

EXTRA=\
mkfs.c ulib.c user.h cat.c echo.c forktest.c grep.c kill.c\
ln.c ls.c mkdir.c rm.c stressfs.c usertests.c wc.c zombie.c\
ln.c ls.c mkdir.c rm.c stressfs.c usertests.c wc.c sanity.c zombie.c\
printf.c umalloc.c\
README dot-bochsrc *.pl toc.* runoff runoff1 runoff.list\
.gdbinit.tmpl gdbutil\
Expand Down
16 changes: 16 additions & 0 deletions defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,22 @@ void userinit(void);
int wait(void);
void wakeup(void*);
void yield(void);
void clock(void);
int wait2(int* retime, int* rutime, int* stime);
int set_prio(int);


//mudanças aqui
void clock(void);
int wait2(int* retime, int* rutime, int* stime);
int set_prio(int);
int user_yield();
void update_counters(void);

void clock(void);
int wait2(int* retime, int* rutime, int* stime);
int set_prio(int);


// swtch.S
void swtch(struct context**, struct context*);
Expand Down
7 changes: 5 additions & 2 deletions param.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@
#define MAXOPBLOCKS 10 // max # of blocks any FS op writes
#define LOGSIZE (MAXOPBLOCKS*3) // max data blocks in on-disk log
#define NBUF (MAXOPBLOCKS*3) // size of disk block cache
#define FSSIZE 1000 // size of file system in blocks

#define FSSIZE 1000 // size of file system in blocks
#define INTERV 5 // time slice in clock cycles
#define P1TO2 200 // time waiting before promotion from priority 1 to 2
#define P2TO3 100 // time waiting before promotion from priority 2 to 3
#define P3TO4 50 // time waiting before promotion from priority 3 to 4
Loading