jos_h1 - int console_buffer[256 int nextin int nextout...

Info icon This preview shows page 1. 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> typedef struct { int regs[NumTotalRegs]; int size,number_written,number_read; char *read_buffer,*write_buffer; } PCB; 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() */
Image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: int console_buffer[256]; int nextin; int nextout; sema_t writeok; sema_t consoleWait; sema_t nelem; 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(); END_INTERFACE_FUNCTIONS...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern