Worst ways to implement....

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
scs
Posts: 10
Joined: Mon Sep 29, 2008 12:44 pm

Worst ways to implement....

Post 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.
...
User avatar
piranha
Member
Member
Posts: 1391
Joined: Thu Dec 21, 2006 7:42 pm
Location: Unknown. Momentum is pretty certain, however.
Contact:

Re: Worst ways to implement....

Post 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 :lol:
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
scs
Posts: 10
Joined: Mon Sep 29, 2008 12:44 pm

Re: Worst ways to implement....

Post 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.
Pyrofan1
Member
Member
Posts: 234
Joined: Sun Apr 29, 2007 1:13 am

Re: Worst ways to implement....

Post 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 :oops:
DLBuunk
Member
Member
Posts: 39
Joined: Sun May 18, 2008 9:36 am
Location: The Netherlands

Re: Worst ways to implement....

Post by DLBuunk »

Graphics: put the system in Vmode and let the BIOS do it, repeat this for every pixel to be drawn.
If you don't know what to say, please shut up.
kubeos
Member
Member
Posts: 138
Joined: Tue Jan 30, 2007 2:31 pm
Location: Kamloops BC, CANADA
Contact:

Re: Worst ways to implement....

Post 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. :lol:
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Re: Worst ways to implement....

Post 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. :lol:
I bet there are some people/businesses out there that would definitely sacrifice the huge amount of performance needed to ensure data protection. :wink:
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Re: Worst ways to implement....

Post 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)
scs
Posts: 10
Joined: Mon Sep 29, 2008 12:44 pm

Re: Worst ways to implement....

Post 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)
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Re: Worst ways to implement....

Post by pcmattman »

@scs: Now I really want to think about how to implement such a filesystem... Look what you've started! :D The really scary thing is that I can almost see how it would work (obviously some tricky implementation concerns to worry about).
CodeCat
Member
Member
Posts: 158
Joined: Tue Sep 23, 2008 1:45 pm
Location: Eindhoven, Netherlands

Re: Worst ways to implement....

Post by CodeCat »

OpenGL: Render every frame in software mode to an image file (BMP?) then display the file.
jgraef
Member
Member
Posts: 47
Joined: Wed Jan 16, 2008 7:37 am
Location: Wonsheim, Germany

Re: Worst ways to implement....

Post 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.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: Worst ways to implement....

Post 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...
CodeCat
Member
Member
Posts: 158
Joined: Tue Sep 23, 2008 1:45 pm
Location: Eindhoven, Netherlands

Re: Worst ways to implement....

Post by CodeCat »

lol, nice.

Software-implemented memory paging. 'nuff said.
scs
Posts: 10
Joined: Mon Sep 29, 2008 12:44 pm

Re: Worst ways to implement....

Post 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.
Post Reply