Coder Social home page Coder Social logo

samkit jain's Projects

bst icon bst

BST Implementation with basic BST operations.

coursera-dl icon coursera-dl

Script for downloading Coursera.org videos and naming them.

producer-consumer-posix-code icon producer-consumer-posix-code

Consider a system comprising of two producer processes, one consumer process, and two buffers as shown above. The size of each buffer is 10. Each producer process randomly creates a specific colored item: Producer_Red creates red colored items, and Producer_Blue creates blue-colored items. Each producer deposits its item in any one of the two buffers, whichever has space available. If both buffers have space available, then one of them is selected arbitrarily.. Associated with each item created by a specific producer is a local UNIX timestamp in microseconds (use the gettimeofday() function) which records the time that item was placed in the buffer. The items produced by the producers will be two strings of the form shown below: “RED unix_timestamp” or “BLUE unix_timestamp” Each producer process, after successfully depositing an item in the buffer, will write that item (essentially the “COLOR Unix_timestamp” string) to its log file called Producer_COLOR.txt (e.g. Producer_RED.txt). The consumer retrieves an item from whichever buffer an item is available, and writes it to a file named “Consumer.txt”.

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.