Os Nguyenvanvietquang 20213583
Os Nguyenvanvietquang 20213583
Os Nguyenvanvietquang 20213583
TRƯỜNG ĐIỆN-ĐIỆN TỬ
2.3 Result
This is the result after the finished make check process:
Thus, the mlfqs test cases have been passed successfully, the
advanced scheduler works well.
III. Argument Passing
3.1. Design
a. Data Structure and Function
*In the process.c, add:
void parse_filename(char *src, char *dest) : shortens a file
name from an input string
void construct_esp(char *file_name, void **esp) : constructs a
stack frame index for user program execution
* tid_t process_excute() (const char *file_name)
• Parse the string of file_name
• Forward first token as name of new process to
thread_create() function
* static void start_process() (void *file_name_)
• Parse file_name
• Save tokens on user stack of new process.
* char *strtok_r (char *s, const char *delimiters, char
**save_ptr) /* string.h */
• Receive a string (s) and delimiters and parse them by
delimiters
* Thread name
• Before: Entire command line is passed to thread_create()
• After modification: Forward only first token of command
line to first argument of thread_create()
“echo x y z” → only use “echo” for name of
process
At the time of submission, I'm still having some trouble with the
hex_dump() function to print the stack value and I'll still try to
fix it.
Link github: