jos_h2

jos_h2 - sema_t writers; sema_t readers; } JOS_GLOBALS;

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
#include "simulator.h" #include "dllist.h" #include <pthread.h> #include <synch.h> #include "jrb.h" typedef struct { int regs[NumTotalRegs]; int size,number_written,number_read; char *read_buffer,*write_buffer; int sbrk_ptr; int User_Base; int User_Limit; int pid; int exit_value; struct PCB *parent; JRB children; sema_t waiter_sem; Dllist waiters; } PCB; typedef struct { int base; int limit; } Mem_Slot; typedef struct { Dllist readyq; /* Ready queue */ PCB *running; /* Pointer to the currently running process's PCB */ PCB *nulljob; /* Pointer to a 'null' job -- we'll set running to this when we run noop() */ PCB *sentinel_pcb; int console_buffer[256]; int nextin; int nextout; JRB jrb_pid,jrb_mem; sema_t writeok; sema_t consoleWait; sema_t nelem;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: sema_t writers; sema_t readers; } JOS_GLOBALS; BEGIN_INTERFACE_FUNCTIONS extern JOS_GLOBALS JG; extern jos_scheduler(); extern void do_write(PCB *pcb); extern void do_read(PCB *pcb); extern void do_console_read(); extern void do_ioctl(PCB *pcb); extern void do_fstat(PCB *pcb); extern void do_getpagesize(PCB *pcb); extern void do_sbrk(PCB *pcb); extern void do_execve(PCB *pcb); extern void do_getpid(PCB *pcb); extern void do_fork(PCB *pcb); extern void do_finish_fork(PCB *pcb); extern void do_exit(PCB *pcb); extern void do_getdtablesize(PCB *pcb); extern void do_close(PCB *pcb); extern void do_wait(PCB *pcb); extern void do_getppid(PCB *pcb); END_INTERFACE_FUNCTIONS...
View Full Document

Page1 / 2

jos_h2 - sema_t writers; sema_t readers; } JOS_GLOBALS;

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online