Worst ways to implement....
Worst ways to implement....
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.
...
First topic: Message Passing
1. Modulate the message onto the CPU clock.
...
- piranha
- Member
- Posts: 1391
- Joined: Thu Dec 21, 2006 7:42 pm
- Location: Unknown. Momentum is pretty certain, however.
- Contact:
Re: Worst ways to implement....
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
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
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
Re: Worst ways to implement....
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....
I think that would be pretty coolUser 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....
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.
Re: Worst ways to implement....
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.
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....
I bet there are some people/businesses out there that would definitely sacrifice the huge amount of performance needed to ensure data protection.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.
Website: https://joscor.com
Re: Worst ways to implement....
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....
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)
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)
-
- 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....
@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....
OpenGL: Render every frame in software mode to an image file (BMP?) then display the file.
Re: Worst ways to implement....
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.
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....
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...
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....
lol, nice.
Software-implemented memory paging. 'nuff said.
Software-implemented memory paging. 'nuff said.
Re: Worst ways to implement....
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.
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.