Code Monkey home page Code Monkey logo

coursematerials's People

Contributors

2ndchance avatar aaronmorgenegg avatar ammonhepworth avatar austin-michaelw avatar benjamincall avatar bhandley24 avatar chancelish avatar christopher42 avatar codystevens avatar davidbrowning avatar divadev avatar efair4 avatar haleynwheeler avatar higgsch avatar jarencampbell avatar jazames avatar josephsundberg avatar juyoung101 avatar ksundberg avatar mandibarton avatar notadamking avatar obstructor avatar philipnelson5 avatar pianomanfrazier avatar sailanarmo avatar tjonesy avatar troenoel avatar unknownjoe796 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

coursematerials's Issues

dev goes out of bounds on devices

In Simulation.cpp this line appears twice: auto dev = jobs[job].tasks[jobs[job].cur].device; followed by some form of devices[dev]. When stepping though however, dev is sometimes outside the bounds of devices.

Job: 3 dev: 2 size: 2
Job: 3 dev: 2 size: 2
Job: 4 dev: 2 size: 2
Job: 6 dev: 2 size: 2
Job: 3 dev: 2 size: 2
Job: 3 dev: 2 size: 2
Job: 4 dev: 2 size: 2
Job: 1 dev: 2 size: 2
Job: 9 dev: 2 size: 2
Job: 9 dev: 2 size: 2

Device not initialized

It appears that the FifoReadyQueue for each device may not actually be initialized. I am getting a segfault when a job is pushed onto a device queue. From the debugger it looks like the queue is pointing at garbage memory.

queue {Cannot access memory at address 0x40d5fbde00000000

#0  0x000000000041ddb9 in __gnu_cxx::new_allocator<int>::construct<int, int const&> (this=0x6483f0, __p=0xbf800000) at /usr/include/c++/5/ext/new_allocator.h:120
#1  0x000000000041dbe1 in std::allocator_traits<std::allocator<int> >::construct<int, int const&> (__a=..., __p=0xbf800000) at /usr/include/c++/5/bits/alloc_traits.h:530
#2  0x000000000041da96 in std::deque<int, std::allocator<int> >::push_back (this=0x6483f0, __x=@0x7fffffffda64: 2) at /usr/include/c++/5/bits/stl_deque.h:1521
#3  0x000000000041d9ff in std::queue<int, std::deque<int, std::allocator<int> > >::push (this=0x6483f0, __x=@0x7fffffffda64: 2) at /usr/include/c++/5/bits/stl_queue.h:216
#4  0x000000000041d94c in cs3100::FifoReadyQueue::add (this=0x6483e8, x=2) at /home/taylor/OneDrive/Documents/Classes/CS3100/Projects/scheduler/FifoReadyQueue.cpp:5
#5  0x00000000004204aa in cs3100::Simulation::scheduleIo (this=0x648ba0, job=2) at /home/taylor/OneDrive/Documents/Classes/CS3100/Projects/scheduler/Simulation.cpp:57
#6  0x000000000042088b in cs3100::Simulation::jobDone (this=0x648ba0, job=2, time=4.34699965) at /home/taylor/OneDrive/Documents/Classes/CS3100/Projects/scheduler/Simulation.cpp:85
#7  0x0000000000420011 in cs3100::Simulation::<lambda()>::operator()(void) const (__closure=0x649180) at /home/taylor/OneDrive/Documents/Classes/CS3100/Projects/scheduler/Simulation.cpp:48
#8  0x00000000004217c3 in std::_Function_handler<void(), cs3100::Simulation::scheduleJob()::<lambda()> >::_M_invoke(const std::_Any_data &) (__functor=...) at /usr/include/c++/5/functional:1871
#9  0x0000000000422718 in std::function<void ()>::operator()() const (this=0x649180) at /usr/include/c++/5/functional:2267
#10 0x0000000000420c50 in cs3100::Simulation::run (this=0x648ba0) at /home/taylor/OneDrive/Documents/Classes/CS3100/Projects/scheduler/Simulation.cpp:129
#11 0x0000000000427159 in main () at /home/taylor/OneDrive/Documents/Classes/CS3100/Projects/scheduler/scheduler_main.cpp:77#0  0x000000000041ddb9 in __gnu_cxx::new_allocator<int>::construct<int, int const&> (this=0x6483f0, __p=0xbf800000) at /usr/include/c++/5/ext/new_allocator.h:120


Priority Queue backwards

Events are run from greatest time to lowest time. The priority needs reversed so they go lowest to highest.

Task incrementation issues

It appears that on the 3rd or so task of a job incrementing fails. The next task it pulls up tends to be either the same task or a the first task of the job, or just a garbage task that makes no sense.

Devices not created

devices are never created so when an IO job is scheduled there is a segfault.

Extra Job Schedule (Working simulation code attatched)

I was able to work around or fix every bug except for there is an odd edge case where a single job is scheduled an extra time. This happens every time the simulator is run but only happens once per run. I cannot figure out where it is getting scheduled.
I worked around that by ignoring ioDone and jobDone for tasks that are already finished. My fixed version of the simulator is attatched. scheduler.tar.gz

More SegFaults

I appear to randomly be getting segfaults when pushing items onto FifoReadyQueues whether it is a device queue or the event queue.

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.