Discussion:
Testing Spawn with null.exe
(too old to reply)
Timothy Finley
2005-02-16 02:54:52 UTC
Permalink
Do we only need to call Spawn(INIT_PROGRAM, "", pThread)? (Assuming you
have modified INIT_PROGRAM to point to null.exe rather than shell.exe, and
pThread is a Kernel_Thread pointer)

Tim
cs412050
2005-02-16 13:20:00 UTC
Permalink
I thought pThread is POSIX thread.
I didn't even finish the reading, but I think I am wrong.
( We use Thread concept similar to POSIX thread in geek os, but
it may not be the actual POSIX thread implementaion. )

If I am wrong, the naming is sort of confusing.
Hopefully pThread becomes ptrThread.
Post by Timothy Finley
Do we only need to call Spawn(INIT_PROGRAM, "", pThread)? (Assuming you
have modified INIT_PROGRAM to point to null.exe rather than shell.exe, and
pThread is a Kernel_Thread pointer)
Tim
Timothy Finley
2005-02-16 16:48:47 UTC
Permalink
Yea, what I mean by pThread is a pointer to a thread and not a POSIX
thread since in the Spawn function you are a passing in a pointer
to a pointer to a thread. That reference to a pointer will be used to
return a pointer to the kernel thread created for the process.

This means that I should have put "Spawn(INIT_PROGRAM, "", &pThread)"
in the previous post (note the addition of the reference operator).

Tim (cs412021)

Iulian Neamtiu
2005-02-16 16:13:24 UTC
Permalink
Yes, when you're ready to test user program loading,
comment out the TODO in Spawn_Init_Process() and replace it with a
Spawn(,,) to spawn null.exe.

When you have implemented the system calls, you will Spawn(,,) shell.exe
and leave it there. Once the shell starts, you can start programs by
typing in the program name in the command line.

Leave the shell Spawn code there for you submissions, so that we can
start testing by typing in command names.

Iulian
Post by Timothy Finley
Do we only need to call Spawn(INIT_PROGRAM, "", pThread)? (Assuming you
have modified INIT_PROGRAM to point to null.exe rather than shell.exe, and
pThread is a Kernel_Thread pointer)
Tim
Loading...