Live data from Hacker News

Show HN: Universal Pause Button

github.com

101–110 of 174 posts

Re: Show HN: Universal Pause Button

#101
post #43
post #24

This should be a basic requirement for all games. Even before I was married my mom would call or someone would ring the doorbell. And when I was a kid I had to go down to dinner or take out the trash.

That reminds me of the old "Supervisor Key" in classic early games.

"Oh yeah, I was just working on this spreadsheet." Those were the days...

Re: Show HN: Universal Pause Button

#102
post #70

"I've already gotten great value out of the program, as there are lots of cut scenes in The Witcher 3, that I don't want to skip." The Witcher 3 pauses cutscenes when the window is not in focus. So the example is probably not the greatest.

My son has been playing Witcher 3 for the last few weeks, and literally every time I walk by, there's a cutscene. I'm pretty sure I have yet to see anything but cutscenes. It's all cutscenes. Listening to it in the background, it sounds more like an episode of Sons of Anarchy than a traditional videogame.

The script is apparently ~450,000 words! I have 28 hours of playtime but the game only shows me at 17% completion - its massive and detailed open world is stunning.

Re: Show HN: Universal Pause Button

#103
But what if the process uses a timer to update an animation? (I.e., the state of the timer determines the frame in the animation).

In that case, after unpausing, the animation would just skip ahead.

As a remedy, the pause button could also stop the system clock as seen by the process.

Re: Show HN: Universal Pause Button

#104
post #69

Earlier quoted context omitted.

"This is nice! On OSX, processes can be paused and continued too" Every once in a while I am reminded how wonderful, and perhaps unlikely, it is that I have a nice, slick, mass market consumer device (apple computer running OS X) that is honest to god UNIX underneath. And then sad, knowing that this is a brief golden age that will probably pass.

Don't say that... why would Apple change the underlyings of OS X? Blasphemy :(

They will when it conflicts with their business model. Witness protected access to media keys and the Notification Center.

Re: Show HN: Universal Pause Button

#105
post #93

You can do this to any process in Windows' Resource Monitor too - the one you can open from task manager. On the CPU tab you can right click any process and suspend it.

not seeing this in Windows 7. Is this specific to Windows 8 and above?

From Task Manager, open Resource Monitor. That's the one with green charts on the right hand side. It has different context menu than the Task Manager. Picture (on windows 8): http://thewindowsclub.thewindowsclubco.netdna-cdn.com/wp-con... I'm not sure if Windows 7 has it, though.

Re: Show HN: Universal Pause Button

#106
post #94

Earlier quoted context omitted.

SIGSTOP and SIGCONT are generic Unix signals. Where it gets more interesting is using elaborate checkpoint/restore [1] mechanisms for processes to serialize their state (open fds, watches, IPC, etc.) into an image that can then be overlayed, remotely executed, debugged and so forth. [1] https://en.wikipedia.org/wiki/Application_checkpointing

I've always thought this was a wrongheaded solution. I mean, of course, we have these apps that splay themselves all over global system resources in complex ways, and so we need to track down how they've done that, record it, and then replay it later to restore them. It's necessary. But imagine a well-behaved classical X11 app, running in something like a VM or Docker container. You execute its launcher, the VM spins…

The purpose of C/R isn't sandboxing, it has nothing to do with it. It's about managing internal state and data structures from an external agent.

C/R enables complete persistence by duplicating a process from its image, which can cut initialization and startup times by orders of magnitude, and resume service from an exact position with zero downtime, and not just basic mechanisms like socket superservers.

It lets you back up process state at any arbitrary moment, send it over the network, recalculate and reexec immediately and then thaw again for debugging it from that particular point.

It just helps enable live migrations and zero downtime recoordinations with far less complicated redundancy schemes. This includes containers. On top of it being a universal save/pause button.

Depending on the robustness of the image format, it can be made space efficient through deduplication.

C/R is quite invaluable for any scenario that involves fault tolerance, high response times, tracking down difficult bugs, low startup overhead and so on. I'm surprised why it's still such an obscure technique.

Besides, I don't think the primary use case here is even graphical apps (not that they don't work just fine). What you really want is a local indexed copy of all the execution environment details, like pipes, sockets, timers, ttys, timers, sigmasks, *fds, etc. for infrastructure.

Re: Show HN: Universal Pause Button

#107
post #69

This is nice! On OSX, processes can be paused and continued too (by name via killall, and by PID via kill): kill -STOP 1234 kill -CONT 1234 killall -STOP -c "Pandora" killall -CONT -c "Pandora" A more nuanced control is to throttle down the CPU, via cputhrottle[1]. If I'm running a CPU-intensive calculation and don't want to bog down the rest of my system I will use it to give me enough cycles for Sublime Text to wor…

"This is nice! On OSX, processes can be paused and continued too" Every once in a while I am reminded how wonderful, and perhaps unlikely, it is that I have a nice, slick, mass market consumer device (apple computer running OS X) that is honest to god UNIX underneath. And then sad, knowing that this is a brief golden age that will probably pass.

> New operating systems today tend to be just ways of reimplementing Unix. If they have a novel architecture -- and some do -- the first thing to build is the Unix emulation layer.

> How can operating systems research be relevant when the resulting operating systems are all indistinguishable?

> There was a claim in the late 1970s and early 1980s that Unix had killed operating systems research because no one would try anything else. At the time, I didn’t believe it. Today, I grudgingly accept that the claim may be true (Microsoft notwithstanding).

> A victim of its own success: portability led to ubiquity. That meant architecture didn’t matter, so now there’s only one. Linux is the hot new thing... but it’s just another Unix.

http://herpolhode.com/rob/utah2000.pdf

Re: Show HN: Universal Pause Button

#108
Having a modernized pause/break key on your keyboard can also be handy if you ever have to use software that acts stupid on purpose, like these "Safe Exam LockDown Browsers" that some schools and universities around here have started forcing upon their students. Software like this typically just run a timer or similar to make sure that only their windows are running in the foreground, but sending them a SIGSTOP stops this annoyance.

Re: Show HN: Universal Pause Button

#109
It wasn't until MGS4 before the Metal Gear Solid franchise got cutscenes which you could pause. Which was sorely needed because of how story driven the series is, and how long some of the cutscenes are -- I think the end of MGS4 was something like 1 hour, 30 min.

Re: Show HN: Universal Pause Button

#110
post #93

Earlier quoted context omitted.

not seeing this in Windows 7. Is this specific to Windows 8 and above?

From Task Manager, open Resource Monitor. That's the one with green charts on the right hand side. It has different context menu than the Task Manager. Picture (on windows 8): http://thewindowsclub.thewindowsclubco.netdna-cdn.com/wp-con... I'm not sure if Windows 7 has it, though.

Win7 has it. In task manager, go to the Performance tab, and then press the "Resource Monitor" button.

Or run `perfmon /res`.

Post reply on HN