pintos-anon
19 years agoDon't assume 4 kB pages.
Ben Pfaff [Mon, 13 Sep 2004 03:00:49 +0000 (03:00 +0000)]
Don't assume 4 kB pages.

19 years agoMake the bitmap responsible for allocation.
Ben Pfaff [Mon, 13 Sep 2004 02:58:44 +0000 (02:58 +0000)]
Make the bitmap responsible for allocation.

19 years agoChange "stddef.h" to <stddef.h>
Ben Pfaff [Mon, 13 Sep 2004 02:14:24 +0000 (02:14 +0000)]
Change "stddef.h" to <stddef.h>

19 years agoDon't palloc_free() the initial thread, because it's not allocated
Ben Pfaff [Mon, 13 Sep 2004 02:13:52 +0000 (02:13 +0000)]
Don't palloc_free() the initial thread, because it's not allocated
from a palloc pool.

19 years agoAdd magic numbers for safety.
Ben Pfaff [Mon, 13 Sep 2004 02:13:10 +0000 (02:13 +0000)]
Add magic numbers for safety.
Fix behavior on free(NULL).

19 years agoFlush serial device on panic.
Ben Pfaff [Mon, 13 Sep 2004 01:24:28 +0000 (01:24 +0000)]
Flush serial device on panic.

19 years agoNeeds #include <console.h>.
Ben Pfaff [Mon, 13 Sep 2004 01:24:01 +0000 (01:24 +0000)]
Needs #include <console.h>.

19 years agoIntroduce "kernel" and "user" pools as a band-aid for user memory
Ben Pfaff [Mon, 13 Sep 2004 01:23:24 +0000 (01:23 +0000)]
Introduce "kernel" and "user" pools as a band-aid for user memory
pressure on kernel.

19 years agoAdd MLFQS credit.
Ben Pfaff [Sun, 12 Sep 2004 05:46:54 +0000 (05:46 +0000)]
Add MLFQS credit.

19 years agoDescribe multi-level feedback queue scheduler.
Ben Pfaff [Sun, 12 Sep 2004 05:45:47 +0000 (05:45 +0000)]
Describe multi-level feedback queue scheduler.

19 years agoWork on projects.
Ben Pfaff [Sun, 12 Sep 2004 00:00:42 +0000 (00:00 +0000)]
Work on projects.

19 years agoMake less sensitive to slow processors.
Ben Pfaff [Sat, 11 Sep 2004 23:35:48 +0000 (23:35 +0000)]
Make less sensitive to slow processors.

19 years agoUpdate initialization order.
Ben Pfaff [Sat, 11 Sep 2004 23:35:30 +0000 (23:35 +0000)]
Update initialization order.

19 years agoDo console locking.
Ben Pfaff [Sat, 11 Sep 2004 23:35:13 +0000 (23:35 +0000)]
Do console locking.
Rename printf.c to console.c to better explain its function.
Move puts() from lib to lib/{user,kernel} so it can take console lock.

19 years agoDo console locking.
Ben Pfaff [Sat, 11 Sep 2004 23:27:29 +0000 (23:27 +0000)]
Do console locking.
Rename printf.c to console.c to better explain its function.
Move puts() from lib to lib/{user,kernel} so it can take console lock.

19 years agoFormat null pointers as 0x0.
Ben Pfaff [Sat, 11 Sep 2004 23:18:06 +0000 (23:18 +0000)]
Format null pointers as 0x0.

19 years agoTurn off interrupts on output to lock out interrupt handlers that
Ben Pfaff [Sat, 11 Sep 2004 23:17:23 +0000 (23:17 +0000)]
Turn off interrupts on output to lock out interrupt handlers that
might want to write to the console.

19 years agoCall thread_yield() in timer_sleep() if interrupts are on.
Ben Pfaff [Sat, 11 Sep 2004 23:16:45 +0000 (23:16 +0000)]
Call thread_yield() in timer_sleep() if interrupts are on.

19 years agoOnly poll on output if the txq is full and interrupts are off, and
Ben Pfaff [Sat, 11 Sep 2004 23:16:03 +0000 (23:16 +0000)]
Only poll on output if the txq is full and interrupts are off, and
only one byte's worth.

19 years agoDeclare start symbol for linker's use.
Ben Pfaff [Sat, 11 Sep 2004 23:08:19 +0000 (23:08 +0000)]
Declare start symbol for linker's use.

19 years agoReally make it safe to call printf() from any context.
Ben Pfaff [Sat, 11 Sep 2004 22:43:06 +0000 (22:43 +0000)]
Really make it safe to call printf() from any context.

19 years agoComments.
Ben Pfaff [Sat, 11 Sep 2004 22:05:30 +0000 (22:05 +0000)]
Comments.

19 years agoAdd a little demo/test code for the `threads' project.
Ben Pfaff [Sat, 11 Sep 2004 19:32:54 +0000 (19:32 +0000)]
Add a little demo/test code for the `threads' project.

19 years agoIncrease queue size to 64.
Ben Pfaff [Sat, 11 Sep 2004 19:31:13 +0000 (19:31 +0000)]
Increase queue size to 64.

19 years agoRewrite loader, improving comments greatly.
Ben Pfaff [Sat, 11 Sep 2004 19:29:05 +0000 (19:29 +0000)]
Rewrite loader, improving comments greatly.
Also: load GDT relative to at LOADER_PHYS_BASE.

19 years agoUse ln -f for linking Makefile into build dir.
Ben Pfaff [Sat, 11 Sep 2004 18:48:38 +0000 (18:48 +0000)]
Use ln -f for linking Makefile into build dir.

19 years agoAdd timer_sleep() that takes an argument in timer ticks.
Ben Pfaff [Fri, 10 Sep 2004 00:19:06 +0000 (00:19 +0000)]
Add timer_sleep() that takes an argument in timer ticks.
Remove timer_msleep(), timer_usleep(), timer_nsleep()
and add corresponding timer_ms2ticks(), timer_us2ticks(), and
timer_ns2ticks() to make the conversions.

19 years agoAdd comment.
Ben Pfaff [Thu, 9 Sep 2004 22:43:45 +0000 (22:43 +0000)]
Add comment.

19 years agoAdd some prototypes.
Ben Pfaff [Thu, 9 Sep 2004 22:43:32 +0000 (22:43 +0000)]
Add some prototypes.

19 years agoRename run_queue to ready_list.
Ben Pfaff [Thu, 9 Sep 2004 22:43:28 +0000 (22:43 +0000)]
Rename run_queue to ready_list.

19 years agoAdd new syscall stubs.
Ben Pfaff [Thu, 9 Sep 2004 22:43:12 +0000 (22:43 +0000)]
Add new syscall stubs.

19 years agoAdd syscalls.
Ben Pfaff [Thu, 9 Sep 2004 22:38:20 +0000 (22:38 +0000)]
Add syscalls.

19 years agoAdd comment.
Ben Pfaff [Thu, 9 Sep 2004 22:38:14 +0000 (22:38 +0000)]
Add comment.

19 years agoAdd some former CS140 TAs.
Ben Pfaff [Thu, 9 Sep 2004 22:37:59 +0000 (22:37 +0000)]
Add some former CS140 TAs.

19 years agoInitial projects.
Ben Pfaff [Thu, 9 Sep 2004 22:37:50 +0000 (22:37 +0000)]
Initial projects.

19 years agoAdd `projects' files authors.
Ben Pfaff [Thu, 9 Sep 2004 21:15:35 +0000 (21:15 +0000)]
Add `projects' files authors.

19 years agoAllow students to easily disable VM.
Ben Pfaff [Thu, 9 Sep 2004 20:55:11 +0000 (20:55 +0000)]
Allow students to easily disable VM.

19 years ago#error if TIMER_FREQ too high.
Ben Pfaff [Thu, 9 Sep 2004 19:24:59 +0000 (19:24 +0000)]
#error if TIMER_FREQ too high.
Configurable time slice.
Make timer_msleep() round up to nearest timer tick.

19 years agoAdd TAGS, tags targets.
Ben Pfaff [Wed, 8 Sep 2004 00:58:15 +0000 (00:58 +0000)]
Add TAGS, tags targets.

19 years agoSpecifications.
Ben Pfaff [Wed, 8 Sep 2004 00:22:42 +0000 (00:22 +0000)]
Specifications.

19 years agoUpdate name to Pintos.
Ben Pfaff [Wed, 8 Sep 2004 00:08:35 +0000 (00:08 +0000)]
Update name to Pintos.

19 years agoFix license: we don't want export clause.
Ben Pfaff [Wed, 8 Sep 2004 00:07:56 +0000 (00:07 +0000)]
Fix license: we don't want export clause.

19 years agoSome bochs/qemu tools.
Ben Pfaff [Wed, 8 Sep 2004 00:02:26 +0000 (00:02 +0000)]
Some bochs/qemu tools.

19 years agoInitial list.
Ben Pfaff [Wed, 8 Sep 2004 00:01:49 +0000 (00:01 +0000)]
Initial list.

19 years agoImplement keyboard device.
Ben Pfaff [Tue, 7 Sep 2004 23:49:15 +0000 (23:49 +0000)]
Implement keyboard device.

19 years agoMove serial interrupt queue into new file intq.c.
Ben Pfaff [Tue, 7 Sep 2004 23:49:03 +0000 (23:49 +0000)]
Move serial interrupt queue into new file intq.c.
Remove serial receive code.

19 years agoAdd tolower(), toupper().
Ben Pfaff [Tue, 7 Sep 2004 23:47:31 +0000 (23:47 +0000)]
Add tolower(), toupper().

19 years agoPrepare to remove serial receive path.
Ben Pfaff [Tue, 7 Sep 2004 20:38:10 +0000 (20:38 +0000)]
Prepare to remove serial receive path.

19 years agoFirst stab at interrupt-driven serial.
Ben Pfaff [Tue, 7 Sep 2004 06:23:02 +0000 (06:23 +0000)]
First stab at interrupt-driven serial.
Receive doesn't work.

19 years agoDefault to INTR_OFF for unregistered interrupts.
Ben Pfaff [Tue, 7 Sep 2004 06:22:05 +0000 (06:22 +0000)]
Default to INTR_OFF for unregistered interrupts.
Add assert.
Add comment.

19 years agoAdd comment.
Ben Pfaff [Tue, 7 Sep 2004 06:21:06 +0000 (06:21 +0000)]
Add comment.

19 years agoAdd isblank().
Ben Pfaff [Tue, 7 Sep 2004 06:20:53 +0000 (06:20 +0000)]
Add isblank().

19 years agoComment.
Ben Pfaff [Mon, 6 Sep 2004 15:44:56 +0000 (15:44 +0000)]
Comment.

19 years agoFix up header guards.
Ben Pfaff [Mon, 6 Sep 2004 05:45:49 +0000 (05:45 +0000)]
Fix up header guards.

19 years agoDon't want -DKERNEL_LOAD_PAGES on every kernel.bin prereq.
Ben Pfaff [Mon, 6 Sep 2004 05:45:41 +0000 (05:45 +0000)]
Don't want -DKERNEL_LOAD_PAGES on every kernel.bin prereq.

19 years agoFix up header guards.
Ben Pfaff [Mon, 6 Sep 2004 05:38:45 +0000 (05:38 +0000)]
Fix up header guards.

19 years agoRemove unwanted files.
Ben Pfaff [Mon, 6 Sep 2004 05:28:24 +0000 (05:28 +0000)]
Remove unwanted files.

19 years agoREmove unwanted files.
Ben Pfaff [Mon, 6 Sep 2004 05:27:22 +0000 (05:27 +0000)]
REmove unwanted files.

19 years agoRename printk() to printf().
Ben Pfaff [Mon, 6 Sep 2004 05:19:18 +0000 (05:19 +0000)]
Rename printk() to printf().
Create user library by separating kernel library into kernel-specific
and kernel-independent bits.
Break up lib.c by standard header.
Break up lib.h by standard header.
Write our own standard headers for <stdarg.h>, etc.,
and stop using compiler include path.

19 years agocvsignore
Ben Pfaff [Mon, 6 Sep 2004 05:02:39 +0000 (05:02 +0000)]
cvsignore

19 years agoRemove NDEBUG.
Ben Pfaff [Sun, 5 Sep 2004 23:19:48 +0000 (23:19 +0000)]
Remove NDEBUG.

19 years agoAdd .cvsignore.
Ben Pfaff [Sun, 5 Sep 2004 21:56:04 +0000 (21:56 +0000)]
Add .cvsignore.

19 years agoRedo makefiles.
Ben Pfaff [Sun, 5 Sep 2004 21:55:24 +0000 (21:55 +0000)]
Redo makefiles.
Adjust all #include lines appropriately.

19 years agoNicer way to generate kernel.lds.s.
Ben Pfaff [Sun, 5 Sep 2004 16:34:36 +0000 (16:34 +0000)]
Nicer way to generate kernel.lds.s.

19 years ago%#X uses 0X not 0x.
Ben Pfaff [Sun, 5 Sep 2004 16:29:37 +0000 (16:29 +0000)]
%#X uses 0X not 0x.

19 years agoLicense info.
Ben Pfaff [Sun, 5 Sep 2004 08:49:31 +0000 (08:49 +0000)]
License info.

19 years agoAdd license info.
Ben Pfaff [Sun, 5 Sep 2004 08:49:16 +0000 (08:49 +0000)]
Add license info.

19 years agoSystem call interface.
Ben Pfaff [Sun, 5 Sep 2004 08:30:04 +0000 (08:30 +0000)]
System call interface.

19 years agoHandle bit_cnt of 0 properly.
Ben Pfaff [Sun, 5 Sep 2004 08:29:42 +0000 (08:29 +0000)]
Handle bit_cnt of 0 properly.

19 years agoDon't try to allocate file that's too big in filehdr_allocate.
Ben Pfaff [Sun, 5 Sep 2004 08:29:30 +0000 (08:29 +0000)]
Don't try to allocate file that's too big in filehdr_allocate.

19 years agofile_write_at() mustn't free bounce buffer.
Ben Pfaff [Sun, 5 Sep 2004 08:14:47 +0000 (08:14 +0000)]
file_write_at() mustn't free bounce buffer.

19 years agofree() on a null pointer is a no-op.
Ben Pfaff [Sun, 5 Sep 2004 08:14:23 +0000 (08:14 +0000)]
free() on a null pointer is a no-op.

19 years agoFix some new printf bugs.
Ben Pfaff [Sun, 5 Sep 2004 08:12:37 +0000 (08:12 +0000)]
Fix some new printf bugs.

19 years agoAdd comments.
Ben Pfaff [Sun, 5 Sep 2004 07:59:21 +0000 (07:59 +0000)]
Add comments.

19 years agoReorganize.
Ben Pfaff [Sun, 5 Sep 2004 07:58:46 +0000 (07:58 +0000)]
Reorganize.
Add strnlen().
Add comments.
Remove nonstandard types in parse_conversion().
Use 4-digit grouping for hexadecimal with %'.
Add rest of ctype functions.

19 years agoAdd comments.
Ben Pfaff [Sun, 5 Sep 2004 07:56:32 +0000 (07:56 +0000)]
Add comments.
Add assertions.
Make dir_destroy() do nothing on null pointer.
Rename FILENAME_LEN_MAX to NAME_MAX.
Make dir_add() fail too-long names.
Free structure on failure in filehdr_allocate().
Implement filehdr_print().
Add copyright notice to filesys.c.
Change %L to %ll--it's standard!

19 years agoAdd copyright notice to synch.h.
Ben Pfaff [Sun, 5 Sep 2004 07:53:53 +0000 (07:53 +0000)]
Add copyright notice to synch.h.
Reuse list_elem in struct thread for semaphore's wait list.
Add comments.

19 years agoDocument strtok_r().
Ben Pfaff [Sat, 4 Sep 2004 19:52:45 +0000 (19:52 +0000)]
Document strtok_r().

19 years agoAdd comments.
Ben Pfaff [Fri, 3 Sep 2004 06:46:08 +0000 (06:46 +0000)]
Add comments.

19 years agoAdd hash.c to lib sources (!).
Ben Pfaff [Fri, 3 Sep 2004 06:45:20 +0000 (06:45 +0000)]
Add hash.c to lib sources (!).

19 years agoAdd comments.
Ben Pfaff [Fri, 3 Sep 2004 06:44:52 +0000 (06:44 +0000)]
Add comments.

19 years agoComments.
Ben Pfaff [Fri, 3 Sep 2004 06:33:35 +0000 (06:33 +0000)]
Comments.

19 years agoReorganize, add comments.
Ben Pfaff [Fri, 3 Sep 2004 06:25:44 +0000 (06:25 +0000)]
Reorganize, add comments.

19 years agoAdd list_head(), list_tail().
Ben Pfaff [Fri, 3 Sep 2004 06:25:36 +0000 (06:25 +0000)]
Add list_head(), list_tail().

19 years agoAdd comments.
Ben Pfaff [Fri, 3 Sep 2004 05:19:47 +0000 (05:19 +0000)]
Add comments.

19 years agoImprove comment.
Ben Pfaff [Fri, 3 Sep 2004 02:32:44 +0000 (02:32 +0000)]
Improve comment.

19 years agoReorganize.
Ben Pfaff [Thu, 2 Sep 2004 23:53:23 +0000 (23:53 +0000)]
Reorganize.

19 years agoAdd comments.
Ben Pfaff [Thu, 2 Sep 2004 23:52:22 +0000 (23:52 +0000)]
Add comments.
Rename bitmap_storage_size() as bitmap_file_size(), make conditional
on FILESYS.

19 years agoDestroy PT pages in addrspace_destroy().
Ben Pfaff [Thu, 2 Sep 2004 23:28:07 +0000 (23:28 +0000)]
Destroy PT pages in addrspace_destroy().

19 years agoReorganization, comments.
Ben Pfaff [Thu, 2 Sep 2004 23:27:56 +0000 (23:27 +0000)]
Reorganization, comments.

19 years agoUpdate.
Ben Pfaff [Thu, 2 Sep 2004 22:53:58 +0000 (22:53 +0000)]
Update.

19 years agoSource file origins.
Ben Pfaff [Thu, 2 Sep 2004 22:53:05 +0000 (22:53 +0000)]
Source file origins.

19 years agoFix leak. Add comments. Restructure slightly.
Ben Pfaff [Thu, 2 Sep 2004 22:41:32 +0000 (22:41 +0000)]
Fix leak.  Add comments.  Restructure slightly.

19 years agoChange --gstabs+ to --gstabs in ASFLAGS to support older assemblers.
Ben Pfaff [Thu, 2 Sep 2004 22:09:56 +0000 (22:09 +0000)]
Change --gstabs+ to --gstabs in ASFLAGS to support older assemblers.

19 years agoAdd comments.
Ben Pfaff [Thu, 2 Sep 2004 22:04:57 +0000 (22:04 +0000)]
Add comments.

19 years agoMake linking of start.S less brittle.
Ben Pfaff [Thu, 2 Sep 2004 21:50:25 +0000 (21:50 +0000)]
Make linking of start.S less brittle.

19 years agoAdd comments.
Ben Pfaff [Thu, 2 Sep 2004 21:40:16 +0000 (21:40 +0000)]
Add comments.

19 years agoDon't destroy current thread's pagedir before activating a different
Ben Pfaff [Thu, 2 Sep 2004 21:03:03 +0000 (21:03 +0000)]
Don't destroy current thread's pagedir before activating a different
one (!).
thread_wake() needs to run with interrupts off.

19 years agoComments.
Ben Pfaff [Thu, 2 Sep 2004 20:59:49 +0000 (20:59 +0000)]
Comments.

19 years agoActivate the base page directory if pagedir_activate() is passed a
Ben Pfaff [Thu, 2 Sep 2004 20:59:40 +0000 (20:59 +0000)]
Activate the base page directory if pagedir_activate() is passed a
null pointer.