Greetings, folks! I have a compendium of questions for the forum. All comments are welcome and appreciated!
1) In C, why would I want to use fork() over threads (or vice versa)? Forking makes more sense before a call to exec(), but other than that what are the advantages/disadvantages
of fork/threads?
2) From the terminal, cat'ing /proc/cpuinfo yields (among other information):
Is there any rhyme or reason to choose 36 bits for the physical addresses? This laptop only has 2 gigs of RAM, so the (more understandable) 32 bit choice would've worked fine.
Specs for the laptop: Vostro 1500, Core 2 Duo, 2 gigs of RAM, running Ubuntu 7.04 64-bit.
3) Is there a time when a zombie child or lost process or something gets so "lost" that I wouldn't be able to kill -9 it? Like . . . somehow the jobs list doesn't include the process anymore or some such?
4) In Java, is there an easy way to find the L1/L2 cache sizes of a processor? I can think of an empirical way -- write some code that needs to load large chunks of data from memory, see how large you could make the chunks before the cache couldn't handle an entire chunk at once, thus everything would slow down a ton.
5) Regarding Sudoku -- what determines how "hard" a board is? I was thinking that you could represent that Sudoku board as a graph coloring problem -- throw edges between each node in each 3x3 box, then each node on the same vertical / horizontal line, and finally try to 9-color the whole thing. From there, I guess you could just remove colors in groups in a way that would somehow confound the final player. How do I determine if the board is "hard" or "easy" after removing some number / arrangement of colors? (I ask because I'd like to just hack together a quick Sudoku board creator for a webpage)
That is about all for now. Sorry for the long post, thanks for reading, and preemptive thanks for responding!
1) In C, why would I want to use fork() over threads (or vice versa)? Forking makes more sense before a call to exec(), but other than that what are the advantages/disadvantages
of fork/threads?
2) From the terminal, cat'ing /proc/cpuinfo yields (among other information):
Code:
address sizes : 36 bits physical, 48 bits virtual
Specs for the laptop: Vostro 1500, Core 2 Duo, 2 gigs of RAM, running Ubuntu 7.04 64-bit.
3) Is there a time when a zombie child or lost process or something gets so "lost" that I wouldn't be able to kill -9 it? Like . . . somehow the jobs list doesn't include the process anymore or some such?
4) In Java, is there an easy way to find the L1/L2 cache sizes of a processor? I can think of an empirical way -- write some code that needs to load large chunks of data from memory, see how large you could make the chunks before the cache couldn't handle an entire chunk at once, thus everything would slow down a ton.
5) Regarding Sudoku -- what determines how "hard" a board is? I was thinking that you could represent that Sudoku board as a graph coloring problem -- throw edges between each node in each 3x3 box, then each node on the same vertical / horizontal line, and finally try to 9-color the whole thing. From there, I guess you could just remove colors in groups in a way that would somehow confound the final player. How do I determine if the board is "hard" or "easy" after removing some number / arrangement of colors? (I ask because I'd like to just hack together a quick Sudoku board creator for a webpage)
That is about all for now. Sorry for the long post, thanks for reading, and preemptive thanks for responding!