Page 1 of 2
Worst ways to implement....
Posted: Sat Oct 04, 2008 9:54 am
by scs
OK, here's a forum game I thought of randomly. You pick an OS feature and think of the worst, most insane ways to implement it. Feel free to change topic every few posts.
First topic: Message Passing
1. Modulate the message onto the CPU clock.
...
Re: Worst ways to implement....
Posted: Sat Oct 04, 2008 10:01 am
by piranha
Memory Management that has 2 copies of memory: One is a buffer, the other is the rest of real memory (that acts as real memory), while the buffer doesn't act as memory (invisible to all but the memory manager).
When any changes are requested to the memory manager, it will, a) Update the buffer with the request, b) Check the stack, or other memory changes made to real memory.
On each timer interrupt, it syncs the buffer into real memory.
-JL
Re: Worst ways to implement....
Posted: Sat Oct 04, 2008 10:23 am
by scs
User Interface: Map parts of RAM into video memory. The user may increment and decrement bytes with the mouse wheel, drag and drop bytes around memory, and execute areas with the right mouse button. Keyboard hotkeys change the current memory page.
Re: Worst ways to implement....
Posted: Sat Oct 04, 2008 1:06 pm
by Pyrofan1
User Interface: Map parts of RAM into video memory. The user may increment and decrement bytes with the mouse wheel, drag and drop bytes around memory, and execute areas with the right mouse button. Keyboard hotkeys change the current memory page.
I think that would be pretty cool
Re: Worst ways to implement....
Posted: Sat Oct 04, 2008 3:24 pm
by DLBuunk
Graphics: put the system in Vmode and let the BIOS do it, repeat this for every pixel to be drawn.
Re: Worst ways to implement....
Posted: Sat Oct 04, 2008 5:59 pm
by kubeos
File I/O
Everytime a byte is written to a file, save it to the disk, then reload the file to make absolutely certain that a user never loses his precious data.
Re: Worst ways to implement....
Posted: Sat Oct 04, 2008 8:20 pm
by 01000101
kubeos wrote:File I/O
Everytime a byte is written to a file, save it to the disk, then reload the file to make absolutely certain that a user never loses his precious data.
I bet there are some people/businesses out there that would definitely sacrifice the huge amount of performance needed to ensure data protection.
Re: Worst ways to implement....
Posted: Sat Oct 04, 2008 9:14 pm
by earlz
devices: reinitialize device after each use to make sure it's in a good state. (this is how my floppy driver worked.. lmao)
Re: Worst ways to implement....
Posted: Sun Oct 05, 2008 9:45 am
by scs
Filesystem:
All data is a pointer to other data. Pointers can be used as data if they are dereferenced through another pointer, although multiple layers of dereferencing are possible. When a byte is written to disk, the disk is searched for bytes matching the input values. Then, a pointer to the bytes located is written to disk. The disk is initialised with random bytes so that data can be found on the disk most of the time.
(
Deduplication to the extreme)
Re: Worst ways to implement....
Posted: Mon Oct 06, 2008 12:43 am
by pcmattman
@scs: Now I really want to think about how to implement such a filesystem... Look what you've started!
The really scary thing is that I can almost see how it would work (obviously some tricky implementation concerns to worry about).
Re: Worst ways to implement....
Posted: Mon Oct 06, 2008 4:44 am
by CodeCat
OpenGL: Render every frame in software mode to an image file (BMP?) then display the file.
Re: Worst ways to implement....
Posted: Mon Oct 06, 2008 4:55 am
by jgraef
Accessing physical pages:
Copy data from virtual memory to an identify mapped buffer. Then disable Paging, copy the data from the buffer to the physical destination and enable Paging again.
Re: Worst ways to implement....
Posted: Mon Oct 06, 2008 5:45 am
by AJ
Ive thought of some really bad ways to do things:
For the sake of supporting "Legacy", make the entire system start in a 16 bit mode, use a line on the keyboard controller to allow the CPU to address more RAM (and ensure that there are lots of "standard" ways to enable this line), continue to provide slow 16 bit BIOS functions, ensure that the only well supported video standards either provide a low resolution, low number of colours or are slow to render. Oh, wait a minute...
Re: Worst ways to implement....
Posted: Mon Oct 06, 2008 7:20 am
by CodeCat
lol, nice.
Software-implemented memory paging. 'nuff said.
Re: Worst ways to implement....
Posted: Mon Oct 06, 2008 9:29 am
by scs
Scheduling:
All processes are scheduled in order of priority. If two processes have the same priority, a small assembly routine in the program is used in a Corewars-like game, where they compete for memory. The process that wins gets the CPU time. Processes without the routine will have a stub function substituted.