Giter VIP home page Giter VIP logo

oshwk03group's Introduction

OShwk03group
============

The implementations are as follows:


struct event
  Contains a WaitQueue (called waitQ) and an eventID.  WaitQueue is
  implemented in <linux/wait.h>.

struct event * get_event(int eventID)
  Returns a pointer to the event with id "eventID"

void initiate_global(void)
  Initiates a global event so that there is a place to build a linked
  list of other events.

int doeventopen()
  Creates a new event, returning event ID on success, -1 on failure.
  
    Implementation:
      Creates a new eventid.  Implement eventIDlist as kernel linked list.
      Add the new id to the linked list, and return the id.

int doeventclose(int eventID)
  Destroys the event with the given event ID and signal any processes
  waiting on the event to leave the event. Return number of processes
  signaled on success and -1 on failure.

    Implementation:
      Store size of waitQ, call doeventsig(eventID), removes the id from
      eventIDlist, and returns the stored size of waitQueue.

int doeventwait(int eventID)
  Blocks process until the event is signaled. Return 1 on success and
  -1 on failure.

    Implementation:
      Add the calling process to the waitQ for eventID.  (What is success
      and what is failure?)

int doeventsig(int eventID)
  Unblocks all waiting processes; ignored if no processes are blocked.
  Return number of processes signaled on success and -1 on failure.

    Implementation:
      Using wait queues (Linux Kernel Development p. 58).  Each eventid
      will have its own wait queue, specifying all tasks which are waiting
      on that event.  wake_up wakes up every task in that queue.

oshwk03group's People

Contributors

jakebrock avatar

Watchers

 avatar  avatar

Forkers

sfu-cmpt-300

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.