viuavm-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Viuavm-commits] [SCM] Viua VM branch issue-6329ca01-implement-i-o-instr


From: git
Subject: [Viuavm-commits] [SCM] Viua VM branch issue-6329ca01-implement-i-o-instructions updated. v0.9.0-2542-g791d80d
Date: Fri, 20 Sep 2019 23:26:08 +0200 (CEST)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Viua VM".

The branch, issue-6329ca01-implement-i-o-instructions has been updated
  discards  a44c5a43b2a2f13b90f48cf1f599fdc3ff5ed428 (commit)
  discards  a218e611189610a37823fa159cb29296c06faac4 (commit)
  discards  b635ac4ba7d3051cda3b7e657973b5c970c48d5f (commit)
  discards  72d6fc265019697e32314ac8e2ba371abb0ac22e (commit)
  discards  be9797950e8855d19313cfe21e68e63a690b764b (commit)
  discards  3420e6eefc6308c93b2a615e457530c766844016 (commit)
  discards  02a31cf486cec86a7438b2dd9eb233bc15daf295 (commit)
  discards  7c208d5c10b260f886954ec89f036d74b14528a6 (commit)
  discards  6f82c723175cbc294aa7694ec659619b4c930fc5 (commit)
  discards  4604c8dd279b479d2c0115537336cf1be4a2220a (commit)
  discards  b8ec5d8ecacc1a74e2ad6f8a54b8d53dbb9717df (commit)
  discards  f0cb8c5c42bd18386cb2061a496cce4876efe778 (commit)
  discards  c27cb6f302f17dec4b3e5474c942812b93e8d17d (commit)
  discards  bf8b495f7ebe902ec477368a7e6c9fa5687a63f9 (commit)
  discards  804d70bf7969a7ccbb848fe46141802f4d845bdd (commit)
  discards  a060472a17984040a1df4356879484a02df14e0a (commit)
  discards  44a4cf329be07610e5e4eb097365a9a8506a6f02 (commit)
  discards  fe221bf4aadbae703588ae74d1723e1dba19936a (commit)
  discards  908f5dca05f839c1a6d9274250f77430754709a8 (commit)
  discards  9db35b003cbf5efd2b0f617074aeb3ab25c03382 (commit)
  discards  a58155761160ba6e2a48eaa3a5aeb188ccac96cb (commit)
  discards  f5441fa5a602ae63760629e9ca5c4859436d3777 (commit)
  discards  cf99a5bdee0b066ed3f1d513f18521dd3fa27a22 (commit)
  discards  88cc36746afb8b506b5f4f9b3cc73cd1641bd13a (commit)
  discards  a084ad796f384e309786414a3be7a60547088bca (commit)
  discards  e5f54b094e9a4ceb3165abf01c8df0f01c199902 (commit)
  discards  44a8c23277da297d102eba7565025a6d67525f3c (commit)
  discards  68c5f598d264318192fc954946f65b13c5558e72 (commit)
  discards  c360ff5804e13b6ece8d75399d96a2b9e60a0ef3 (commit)
  discards  5d56e892a5b0982ff729f25ce88cc127401336a8 (commit)
  discards  46dc1357e8b789abf49f6a5c73ede70d16587f21 (commit)
  discards  8d1f7ecf4579867d5fe2c39b52f9fde46d51fc7d (commit)
  discards  0e4b8074c5b4be8497e2efd4fd68f1e019bb81e5 (commit)
  discards  d92eaf2dd636b8d04337af6d93034f72fd2afe9a (commit)
  discards  0569f940ae89b47a7a9b43af313d6c19cf387089 (commit)
       via  791d80de8f34617c6931c64f4361f8096ddc73a1 (commit)
       via  72a06c50068bf35a9f9bfbce0121a8c9d9b7b7d4 (commit)
       via  de30807a57e3ef332b34cda4a9f384147eb38693 (commit)
       via  1cd691d28274156d1dbc768267f416fd897e4f62 (commit)
       via  01ce085f2d22092ae849344942330ab19e819bc3 (commit)
       via  f27d242bd04e1d09af1c0fe7c78e438d08d30202 (commit)
       via  44912781f7534acf11e2e9dcdf9e4fa44b0fe5d7 (commit)
       via  70c547fe30eaa97aa12ecbbaf9d475344f7f46fd (commit)
       via  891a7b73b0a56220d0b8fa3f3a5a1537852e282a (commit)
       via  72a4c165484d64954003f18deabaf57453fcfd70 (commit)
       via  d9ee8429b84e525e5b27dbe7701f258e0f98c457 (commit)
       via  da84957ccd4cca2b768fcbf2c53c392df9d9c85e (commit)
       via  aabdc92bd511b5e5bee5db65cdd06bb81410ad2f (commit)
       via  2d1ccb7bbb429e8f1178abe1315392f42bf1ef42 (commit)
       via  5d9dc36ab6cee3c46f7a4be41296657d463beb2c (commit)
       via  97a4249de79e3ed35b6bde56af6a2a575a2b5d17 (commit)
       via  b8643701a341efc64578930483d4dc2ee4bc01a4 (commit)
       via  b28a9502a21319b8b081a5023a3cf93a9db421ff (commit)
       via  710e6b036fe0bb6814b1bc5f6e64876e9107e445 (commit)
       via  085130ba53570a40b289d905e325938bd56ee325 (commit)
       via  a5751daaecaaed5e3fd3e0bb85577dec359b9793 (commit)
       via  900459a304d4cff1cc21806f672ba20490962db9 (commit)
       via  25913ea03d9f32505d84caf1c1dcfa7c1df0724b (commit)
       via  88a9d33e2401c0ae0c39c45e81be688904f359a1 (commit)
       via  30cfdc1c99512617a527149e200aa032f7e0adeb (commit)
       via  292a956166abe8996ab9a0cd284c520e4ae2543f (commit)
       via  a022e397afbb9865df7fd25a40f2201468e1179f (commit)
       via  aeac09c5bad42f76f63d5b0281fbbbd266fad496 (commit)
       via  a8b88273687bf1ab394eec4395157ebcf8cd34af (commit)
       via  3a7bf8b9b5d32b0bd4a6f56d7add1df996769981 (commit)
       via  20fa10f99a9c63db40b5801794d44d4a8d4874f9 (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (a44c5a43b2a2f13b90f48cf1f599fdc3ff5ed428)
            \
             N -- N -- N (791d80de8f34617c6931c64f4361f8096ddc73a1)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 791d80de8f34617c6931c64f4361f8096ddc73a1
Author: Marek Marecki <address@hidden>
Date:   Fri Sep 20 23:19:39 2019 +0200

    Fix test
    
    Yep, the stringification changed. Not a big deal.

commit 72a06c50068bf35a9f9bfbce0121a8c9d9b7b7d4
Author: Marek Marecki <address@hidden>
Date:   Fri Sep 20 23:18:29 2019 +0200

    Concatenate to always print a single string
    
    This will make the write to stdout atomic and prevent the VM from
    preempting a process between printing the first and second part of the
    message.

commit de30807a57e3ef332b34cda4a9f384147eb38693
Author: Marek Marecki <address@hidden>
Date:   Fri Sep 20 23:17:06 2019 +0200

    Silence logs
    
    They were useful during the initial development phase, but now are just
    noise. Leave them in the source tree, though, in case you will be
    debugging (and that's not an "if" - it's a "when") the code later.

commit 1cd691d28274156d1dbc768267f416fd897e4f62
Author: Marek Marecki <address@hidden>
Date:   Sat Sep 14 18:06:31 2019 +0200

    Update the "Hello World!" example in README
    
    It was using the print instruction but we have something better now.

commit 01ce085f2d22092ae849344942330ab19e819bc3
Author: Marek Marecki <address@hidden>
Date:   Fri Sep 20 21:38:23 2019 +0200

    Interactions without fd should just fail
    
    If we don't have any means of detecting and performing the actual I/O
    operation then what's the point?

commit f27d242bd04e1d09af1c0fe7c78e438d08d30202
Author: Marek Marecki <address@hidden>
Date:   Sat Sep 14 18:07:00 2019 +0200

    Fix crash when void was used as target of io_wait instruction
    
    The VM would crash on null pointer dereference.

commit 44912781f7534acf11e2e9dcdf9e4fa44b0fe5d7
Author: Marek Marecki <address@hidden>
Date:   Sat Sep 14 17:30:28 2019 +0200

    Implement io_close instruction

commit 70c547fe30eaa97aa12ecbbaf9d475344f7f46fd
Author: Marek Marecki <address@hidden>
Date:   Thu Sep 12 18:36:36 2019 +0200

    Simple example using sockets
    
    Yay, we're talking over a network!

commit 891a7b73b0a56220d0b8fa3f3a5a1537852e282a
Author: Marek Marecki <address@hidden>
Date:   Sun Sep 8 18:35:32 2019 +0200

    Move select(3)-ing code out of interactions to scheduler

commit 72a4c165484d64954003f18deabaf57453fcfd70
Author: Marek Marecki <address@hidden>
Date:   Sat Sep 7 18:43:37 2019 +0200

    Expose file descriptors and I/O kind of interactions
    
    This will be needed to move the select(3)-ing code out of every
    interaction's code and into the scheduler (meaning less duplicated
    code).

commit d9ee8429b84e525e5b27dbe7701f258e0f98c457
Author: Marek Marecki <address@hidden>
Date:   Sat Sep 7 18:00:29 2019 +0200

    Make the std::posix::network module work with IO_fd
    
    If we have a type for file descriptors we should use it instead of
    sticking with raw integers.

commit da84957ccd4cca2b768fcbf2c53c392df9d9c85e
Author: Marek Marecki <address@hidden>
Date:   Sat Sep 7 18:00:13 2019 +0200

    Stringify IO_fd in a useful way

commit aabdc92bd511b5e5bee5db65cdd06bb81410ad2f
Author: Marek Marecki <address@hidden>
Date:   Sat Sep 7 17:59:53 2019 +0200

    Expose the underlying file descriptor of IO_fd

commit 2d1ccb7bbb429e8f1178abe1315392f42bf1ef42
Author: Marek Marecki <address@hidden>
Date:   Sat Sep 7 12:25:23 2019 +0200

    Move IO_interaction type to another namespace
    
    IO_interaction is not related to viua::types::Value so there was no good
    reason why it should be put inside viua::types namespace. Therefore, it
    was moved to viua::scheduler::io which is a more suitable place for it.

commit 5d9dc36ab6cee3c46f7a4be41296657d463beb2c
Author: Marek Marecki <address@hidden>
Date:   Sat Sep 7 11:42:09 2019 +0200

    Deduce references

commit 97a4249de79e3ed35b6bde56af6a2a575a2b5d17
Author: Marek Marecki <address@hidden>
Date:   Sun Sep 1 23:30:21 2019 +0200

    std::posix::io::open/1 now returns IO_fd instead of a bare integer

commit b8643701a341efc64578930483d4dc2ee4bc01a4
Author: Marek Marecki <address@hidden>
Date:   Sun Sep 1 23:28:51 2019 +0200

    Fix: make IO_fd not copyable
    
    Which copy of IO_fd should own the underlying file descriptor? What to
    do about owning copy going out of scope before the non-owning copies?
    Just refuse to copy IO_fd values and be done with it.

commit b28a9502a21319b8b081a5023a3cf93a9db421ff
Author: Marek Marecki <address@hidden>
Date:   Sun Sep 1 23:26:40 2019 +0200

    Fix an ancient bug
    
    Arguments passed to functions were always copied instead of being moved
    due to inverted condition the VM was using to determine when to move and
    when to copy.
    
    I am *astonished* that it took so long to detect. No less amazing is
    that the first non-copyable type (IO_fd) was introduced only recently,
    several years after the project started.

commit 710e6b036fe0bb6814b1bc5f6e64876e9107e445
Author: Marek Marecki <address@hidden>
Date:   Sat Aug 31 21:40:02 2019 +0200

    Fix io_write
    
    It is now able to use IO_fd values passed as ports instead of just raw
    integers.

commit 085130ba53570a40b289d905e325938bd56ee325
Author: Marek Marecki <address@hidden>
Date:   Sat Aug 31 21:39:33 2019 +0200

    IO_fd may own the file descriptor or may have just borrowed it
    
    It "owns" the file descriptor if it was used to create it. Owning IO_fd
    is responsible for proper shutdown of the file descriptor when the port
    goes out of scope.
    
    It "borrows" the file descriptor when it is used as a wrapper for a raw
    integer representing one. Borrowing IO_fd is not responsible for the
    shutdown of the file descriptor borrowed and is only used as a wrapper
    providing I/O interactions.

commit a5751daaecaaed5e3fd3e0bb85577dec359b9793
Author: Marek Marecki <address@hidden>
Date:   Fri Aug 30 17:04:45 2019 +0200

    Use std::posix::io::open/1 in I/O example
    
    The file descriptor is leaked. I/O open should return IO_fd port instead
    of a bare integer.

commit 900459a304d4cff1cc21806f672ba20490962db9
Author: Marek Marecki <address@hidden>
Date:   Fri Aug 30 17:03:36 2019 +0200

    Add a module with POSIX I/O functions
    
    This should implement and expose not only functions, but also ports to
    be used by the I/O instructions.

commit 25913ea03d9f32505d84caf1c1dcfa7c1df0724b
Author: Marek Marecki <address@hidden>
Date:   Fri Aug 30 17:01:25 2019 +0200

    Update copyright notice

commit 88a9d33e2401c0ae0c39c45e81be688904f359a1
Author: Marek Marecki <address@hidden>
Date:   Fri Aug 30 16:50:24 2019 +0200

    Read from supplied file descriptor instead of stdin
    
    Hardcoded value was useful to make testing easy, but now it's time to
    move beyond that.

commit 30cfdc1c99512617a527149e200aa032f7e0adeb
Author: Marek Marecki <address@hidden>
Date:   Tue Aug 27 22:27:32 2019 +0200

    I/O requests are attached to the kernel, not a process
    
    This avoids the segmentation faults that could have happened if an I/O
    request outlived the process that spawned it. When it went out of scope
    it tried to automatically cancel or abort itself by going through the
    process interface and, since the process was already destroyed, crashed
    the whole VM.
    
    Now this will not happen since the kernel outlives any other object.
    
    Sending I/O requests may be useful and attaching them to the kernel
    instead of to a process makes this possible.

commit 292a956166abe8996ab9a0cd284c520e4ae2543f
Author: Marek Marecki <address@hidden>
Date:   Sun Aug 25 09:37:34 2019 +0200

    Basic write interaction works
    
    With this change in place the most essential I/O (reading from standard
    input and writing to standard output) works without foreign modules,
    using just VM opcodes.
    
    What is left to be done is creating more interactions then refactoring
    common code out (while making provisions for custom interactions that
    are not implemented with POSIX I/O system calls). The scheduler should
    be rewritten to just fetch (file descriptors, opcode, data) tuples and
    wait for several I/O requests in parallel - we are already using the
    select(3) call, but wait for just one file descriptor which is terribly
    inefficient.
    
    Also, prevent sending I/O request handles between processes for now
    since destroying them causes segmentation fault. A better scheme for
    aborting and cancelling requests should be devised - an I/O request
    being cancelled after it goes out of scope and was not waited for MUST
    NOT crash the VM.
    
    Another thing is to prevent several I/O schedulers from fetching I/O
    requests for the same file descriptor. We would not want to run several
    writes in parallel to avoid corrupting the data. Something like this is
    probably needed:
    
        auto q = std::queue<I/O request*>{};
        auto q_map = std::map<fd, std::queue<I/O request>>{};
        auto fd_grabbed_by = std::map<fd, I/O scheduler*>{};
    
    The 'q' field is used to notify the schedulers about work. A scheduler
    then checks the fd associated with the request and checks if it is free
    to run it - the condition is true if no scheduler has grabbed the fd, or
    if the scheduler that did grab the fd is the scheduler checking. If the
    scheduler may run the request it fetches the real request (not just the
    pointer); otherwise it checks the next request on the queue.
    
    Maybe reads and writes can be run in parallel? Should it be configurable
    when opening the port? The I/O subsystem will definitely grow more
    complex...

commit a022e397afbb9865df7fd25a40f2201468e1179f
Author: Marek Marecki <address@hidden>
Date:   Tue Aug 20 22:37:06 2019 +0200

    Add design doc for "new I/O"

commit aeac09c5bad42f76f63d5b0281fbbbd266fad496
Author: Marek Marecki <address@hidden>
Date:   Tue Aug 20 22:36:29 2019 +0200

    Add an example assembly program for I/O
    
    A simple demonstration of how to use the I/O instructions. It reads data
    from standard input.

commit a8b88273687bf1ab394eec4395157ebcf8cd34af
Author: Marek Marecki <address@hidden>
Date:   Tue Aug 20 16:48:55 2019 +0200

    Cancel I/O requests automatically when they go out of scope
    
    An I/O interaction *MUST* have a handle existing if is to be carried out
    by the I/O scheduler. An I/O interaction may be marked as "fire and
    forget" if the handle is to be dropped, but the default is to keep
    trying as long as there is anybody interested in seeing the result of
    the request and abort otherwise.

commit 3a7bf8b9b5d32b0bd4a6f56d7add1df996769981
Author: Marek Marecki <address@hidden>
Date:   Thu Jul 18 21:11:15 2019 +0200

    Add I/O instructions and basic I/O scheduler
    
    These instructions will also require a new scheduler type to be added to
    the runtime and at least a few more types besides the I/O port and I/O
    request so the work will be a bit more involved than with a typical new
    instruction addition.
    
    Use IO_fd as dumb file descriptor wrapper and let IO_port just be the
    core type for all I/O ports. Using the IO_fd port type the most basic
    I/O interaction - reading from standard input - already works. This
    means that standard input can be read without any foreign libraries or
    tricks - just by using the I/O instructions and specifying and integer
    as file descriptor.
    
    Reading from standard input using IO_fd and IO_read_interaction can be
    cancelled and is non-blocking. Smooth sailing from now on as the basics
    are all there. The underlying implementation is ugly as hell and
    horribly inefficient but the user-facing interface (i.e. the actual I/O
    instructions) is OK and should not change substantially now.

commit 20fa10f99a9c63db40b5801794d44d4a8d4874f9
Author: Marek Marecki <address@hidden>
Date:   Thu May 16 17:29:03 2019 +0200

    Try something

-----------------------------------------------------------------------

Summary of changes:
 io.asm                                          |  4 +--
 sample/asm/exceptions/terminating_processes.asm |  9 ++++--
 src/kernel/kernel.cpp                           | 18 +++++++----
 src/scheduler/io/scheduler.cpp                  | 41 ++++++++++++++++---------
 tests/tests.py                                  |  2 +-
 5 files changed, 47 insertions(+), 27 deletions(-)


hooks/post-receive
-- 
Viua VM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]