]>
Devi Nivas Git - cs3210-lab0.git/log
summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
rsc [Mon, 17 Jul 2006 01:53:43 +0000 (01:53 +0000)]
no more cons_putc; real_cons_putc -> cons_putc
rsc [Mon, 17 Jul 2006 01:52:13 +0000 (01:52 +0000)]
add uint and standardize on typedefs instead of unsigned
rsc [Mon, 17 Jul 2006 01:51:47 +0000 (01:51 +0000)]
cleaner
rsc [Mon, 17 Jul 2006 01:36:39 +0000 (01:36 +0000)]
goodbye PushRegs
rsc [Mon, 17 Jul 2006 01:36:32 +0000 (01:36 +0000)]
cleaner
rsc [Mon, 17 Jul 2006 01:25:22 +0000 (01:25 +0000)]
nitpicks
rsc [Sun, 16 Jul 2006 16:55:52 +0000 (16:55 +0000)]
Eliminate annoying Pseudodesc structure.
Eliminate unnecessary parts of mmu.h.
rsc [Sun, 16 Jul 2006 16:06:03 +0000 (16:06 +0000)]
various little fixes that should have been in earlier checkins
rsc [Sun, 16 Jul 2006 16:05:37 +0000 (16:05 +0000)]
more idiomatic c
rsc [Sun, 16 Jul 2006 16:04:44 +0000 (16:04 +0000)]
no memlayout.h
rsc [Sun, 16 Jul 2006 16:04:15 +0000 (16:04 +0000)]
was empty; gone
rsc [Sun, 16 Jul 2006 16:03:51 +0000 (16:03 +0000)]
fix main return type
rsc [Sun, 16 Jul 2006 16:00:03 +0000 (16:00 +0000)]
add %s to cprintf for cons_puts
rsc [Sun, 16 Jul 2006 15:50:13 +0000 (15:50 +0000)]
Keep interrupts disabled during startup.
rsc [Sun, 16 Jul 2006 15:41:47 +0000 (15:41 +0000)]
standardize on not using foo_ prefix in struct foo
rsc [Sun, 16 Jul 2006 15:40:51 +0000 (15:40 +0000)]
rename swtch.S to setjmp.S
rsc [Sun, 16 Jul 2006 15:40:05 +0000 (15:40 +0000)]
standardize on #include "foo" not <foo>
rsc [Sun, 16 Jul 2006 15:38:56 +0000 (15:38 +0000)]
add minimal comments to generator vector table
rsc [Sun, 16 Jul 2006 15:38:13 +0000 (15:38 +0000)]
remove acquire1 and release1
rsc [Sun, 16 Jul 2006 15:38:00 +0000 (15:38 +0000)]
add cons_puts for atomic (readable) output
rsc [Sun, 16 Jul 2006 15:36:31 +0000 (15:36 +0000)]
Add user.h for prototypes.
Add cons_puts for cleaner output.
rsc [Sun, 16 Jul 2006 15:35:18 +0000 (15:35 +0000)]
tidy up
rsc [Sun, 16 Jul 2006 02:09:45 +0000 (02:09 +0000)]
Don't kill process when inside kernel.
rsc [Sun, 16 Jul 2006 02:04:58 +0000 (02:04 +0000)]
more name cleanup
rsc [Sun, 16 Jul 2006 01:52:22 +0000 (01:52 +0000)]
remove non-idiomatic increment/decrement
rsc [Sun, 16 Jul 2006 01:49:03 +0000 (01:49 +0000)]
Rename fd_reference to more suggestive fd_incref.
(Fd_reference sounds like it might just return the ref count.)
rsc [Sun, 16 Jul 2006 01:47:40 +0000 (01:47 +0000)]
Attempt to clean up newproc somewhat.
Also remove all calls to memcpy in favor of
memmove, which has defined semantics when
the ranges overlap. The fact that memcpy was
working in console.c to scroll the screen is not
guaranteed by all implementations.
rsc [Sun, 16 Jul 2006 01:15:28 +0000 (01:15 +0000)]
New scheduler.
Removed cli and sti stack in favor of tracking
number of locks held on each CPU and explicit
conditionals in spinlock.c.
rsc [Sun, 16 Jul 2006 01:12:57 +0000 (01:12 +0000)]
Undo change from this morning that wasn't intended to get in.
rsc [Sat, 15 Jul 2006 17:24:54 +0000 (17:24 +0000)]
move everything having to do with proc_table_lock into proc.c
rsc [Sat, 15 Jul 2006 17:23:17 +0000 (17:23 +0000)]
silence load_icode signedness warning
rsc [Sat, 15 Jul 2006 17:17:00 +0000 (17:17 +0000)]
Add void for ANSI C
rsc [Sat, 15 Jul 2006 17:13:56 +0000 (17:13 +0000)]
Change fetchint, fetcharg, and putint to return -1 on error, 0 on success.
They had been returning 0 on error, 1 on success, but all the callers
were checking for return value < 0.
rtm [Sat, 15 Jul 2006 12:03:57 +0000 (12:03 +0000)]
no more recursive locks
wakeup1() assumes you hold proc_table_lock
sleep(chan, lock) provides atomic sleep-and-release to wait for condition
ugly code in swtch/scheduler to implement new sleep
fix lots of bugs in pipes, wait, and exit
fix bugs if timer interrupt goes off in schedule()
console locks per line, not per byte
kaashoek [Wed, 12 Jul 2006 17:19:24 +0000 (17:19 +0000)]
and the file
kaashoek [Wed, 12 Jul 2006 17:00:54 +0000 (17:00 +0000)]
extract lapic code from mp.c
rtm [Wed, 12 Jul 2006 15:35:33 +0000 (15:35 +0000)]
passes both usertests
exit had acquire where I meant release
swtch now checks that you hold no locks
rtm [Wed, 12 Jul 2006 11:15:38 +0000 (11:15 +0000)]
i think my cmpxchg use was wrong in acquire
nesting cli/sti: release shouldn't always enable interrupts
separate setup of lapic from starting of other cpus, so cpu() works earlier
flag to disable locking in console output
make locks work even when curproc==0
(still crashes in clock interrupt)
rtm [Wed, 12 Jul 2006 09:10:25 +0000 (09:10 +0000)]
cvs add spinlock.h
fix race in schedule()
rtm [Wed, 12 Jul 2006 01:48:35 +0000 (01:48 +0000)]
no more big kernel lock
succeeds at usertests.c pipe test
rtm [Tue, 11 Jul 2006 18:45:27 +0000 (18:45 +0000)]
give each cpu its own clock, so that preemption works on cpu 1
rtm [Tue, 11 Jul 2006 17:39:45 +0000 (17:39 +0000)]
pre-empt both user and kernel, in clock interrupt
usertest.c tests pre-emption
kill()
rsc [Tue, 11 Jul 2006 01:07:40 +0000 (01:07 +0000)]
Changes to allow use of native x86 ELF compilers, which on my
Linux 2.4 box using gcc 3.4.6 don't seem to follow the same
conventions as the i386-jos-elf-gcc compilers.
Can run make 'TOOLPREFIX=' or edit the Makefile.
curproc[cpu()] can now be NULL, indicating that no proc is running.
This seemed safer to me than having curproc[0] and curproc[1]
both pointing at proc[0] potentially.
The old implementation of swtch depended on the stack frame layout
used inside swtch being okay to return from on the other stack
(exactly the V6 you are not expected to understand this).
It also could be called in two contexts: at boot time, to schedule
the very first process, and later, on behalf of a process, to sleep
or schedule some other process.
I split this into two functions: scheduler and swtch.
The scheduler is now a separate never-returning function, invoked
by each cpu once set up. The scheduler looks like:
scheduler() {
setjmp(cpu.context);
pick proc to schedule
blah blah blah
longjmp(proc.context)
}
The new swtch is intended to be called only when curproc[cpu()] is not NULL,
that is, only on behalf of a user proc. It does:
swtch() {
if(setjmp(proc.context) == 0)
longjmp(cpu.context)
}
to save the current proc context and then jump over to the scheduler,
running on the cpu stack.
Similarly the system call stubs are now in assembly in usys.S to avoid
needing to know the details of stack frame layout used by the compiler.
Also various changes in the debugging prints.
kaashoek [Mon, 10 Jul 2006 19:06:48 +0000 (19:06 +0000)]
queue with disk requests
kaashoek [Mon, 10 Jul 2006 16:27:15 +0000 (16:27 +0000)]
oops
kaashoek [Mon, 10 Jul 2006 13:08:37 +0000 (13:08 +0000)]
read the disk using interrupts
kaashoek [Thu, 6 Jul 2006 21:47:22 +0000 (21:47 +0000)]
disable all interrupts when acquiring lock
user program that makes a blocking system call
kaashoek [Wed, 5 Jul 2006 20:00:14 +0000 (20:00 +0000)]
timer interrupts
disk interrupts (assuming bochs has a bug)
rtm [Sat, 1 Jul 2006 21:26:01 +0000 (21:26 +0000)]
swtch saves callee-saved registers
swtch idles on per-CPU stack, not on calling process's stack
fix pipe bugs
usertest.c tests pipes, fork, exit, close
kaashoek [Wed, 28 Jun 2006 16:44:41 +0000 (16:44 +0000)]
disable interrupts when holding kernel lock
kaashoek [Wed, 28 Jun 2006 16:35:03 +0000 (16:35 +0000)]
timer interrupts
rtm [Tue, 27 Jun 2006 14:35:53 +0000 (14:35 +0000)]
file descriptors
pipes
rtm [Mon, 26 Jun 2006 20:31:52 +0000 (20:31 +0000)]
system call return values
initialize 2nd cpu's idt
kaashoek [Mon, 26 Jun 2006 16:40:43 +0000 (16:40 +0000)]
stick mpstack in cpu structure
rtm [Mon, 26 Jun 2006 15:11:19 +0000 (15:11 +0000)]
system call arguments
rtm [Sat, 24 Jun 2006 22:47:06 +0000 (22:47 +0000)]
boot more than two CPUs, each on own initial stack
rtm [Thu, 22 Jun 2006 20:50:32 +0000 (20:50 +0000)]
bug in trapret
rtm [Thu, 22 Jun 2006 20:47:23 +0000 (20:47 +0000)]
compile "user programs"
curproc array
rtm [Thu, 22 Jun 2006 15:51:57 +0000 (15:51 +0000)]
send console output to parallel port
kaashoek [Thu, 22 Jun 2006 15:28:09 +0000 (15:28 +0000)]
oops
kaashoek [Thu, 22 Jun 2006 01:28:57 +0000 (01:28 +0000)]
checkpoint. booting second processor. stack is messed up, but thanks to cliff
and plan 9 code, at least boots and gets into C code.
kaashoek [Wed, 21 Jun 2006 01:53:07 +0000 (01:53 +0000)]
start on MP; detect MP configuration
rtm [Fri, 16 Jun 2006 20:29:25 +0000 (20:29 +0000)]
checkpoint
rtm [Thu, 15 Jun 2006 19:58:01 +0000 (19:58 +0000)]
sleep, wakeup, wait, exit
rtm [Thu, 15 Jun 2006 16:02:20 +0000 (16:02 +0000)]
primitive fork and exit system calls
rtm [Tue, 13 Jun 2006 22:08:20 +0000 (22:08 +0000)]
fix some trap bugs
rtm [Tue, 13 Jun 2006 15:50:40 +0000 (15:50 +0000)]
foo
rtm [Tue, 13 Jun 2006 15:50:06 +0000 (15:50 +0000)]
more or less take traps/interrupts
rtm [Mon, 12 Jun 2006 15:27:13 +0000 (15:27 +0000)]
xx
rtm [Mon, 12 Jun 2006 15:22:12 +0000 (15:22 +0000)]
import