Is paging obsolete
Is paging obsolete
With modern computers coming with 4+ gigs of RAM, has paging become obsolete?
Re: Is paging obsolete
NOOO!!!!!!! PAGING MAKES THE WORLD GO ROUND!!!!!
- NickJohnson
- Member
- Posts: 1249
- Joined: Tue Mar 24, 2009 8:11 pm
- Location: Sunnyvale, California
Re: Is paging obsolete
What can you possibly mean by that? Even if all of the physical memory area is filled (even though it's not, even if you have 4 GB of RAM, because of ACPI tables and such), you don't get the protection and flexibility of paging. It's much much easier to implement multiple processes if they can be completely separated and think they are at the same memory addresses. And with 64 bit systems, having 4 GB of RAM is barely anything compared to the full address space. Unless you have a mechanism that is better than paging for virtual memory management, paging is the best thing out there, and virtual memory is really important. I'm guessing you haven't written a real memory manager yet, or you wouldn't ask this.
Re: Is paging obsolete
I just thought about it again, and hes gotta mean swapping, thats why he brought up the 4gb, because with so much RAM swapping is a lot less necessary. Read up on virtual address spaces, paging and swapping so you can be a little more clear on your question
- NickJohnson
- Member
- Posts: 1249
- Joined: Tue Mar 24, 2009 8:11 pm
- Location: Sunnyvale, California
Re: Is paging obsolete
I would agree partially that *swapping* is obsolete, at least in some cases. I'm not planning to implement it on my OS for quite a while, and I've configured it out of my Linux system entirely. But for servers, it can be quite useful. And the way software seems to be headed, no amount of memory will really ever be enough (soon enough, it will be eight GIGs and constantly swapping ).
Re: Is paging obsolete
NickJohnson wrote:I would agree partially that *swapping* is obsolete, at least in some cases. I'm not planning to implement it on my OS for quite a while, and I've configured it out of my Linux system entirely. But for servers, it can be quite useful. And the way software seems to be headed, no amount of memory will really ever be enough (soon enough, it will be eight GIGs and constantly swapping ).
You can thank bloated virtual machines and lazy programmers for that.
Re: Is paging obsolete
Whatever the case, its all made possible by paging
But to better answer your question, it is not obsolete, paging is just a concept for creating virtual addresses. In can be implemented differently on different architectures, but the core idea remains the same. You are interpretting an address as a list of tables that describes how you can access that address, and where it resides in physical memory
But to better answer your question, it is not obsolete, paging is just a concept for creating virtual addresses. In can be implemented differently on different architectures, but the core idea remains the same. You are interpretting an address as a list of tables that describes how you can access that address, and where it resides in physical memory
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
Re: Is paging obsolete
A swap/page partition/file is not obsolete, neither is paging.. systems that lack both concepts are obsolete.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Is paging obsolete
Desktop systems that lack strong memory protection or swapping are obsolete. With paging leading the memory protection market.
No paging or memory protection needed on f.x. a Nintendo Wii
No paging or memory protection needed on f.x. a Nintendo Wii
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
Re: Is paging obsolete
Those are toys, not computers.. they're probably the only exception for a shitty operating system.Combuster wrote:No paging or memory protection needed on f.x. a Nintendo Wii
Although, don't most of those systems have browsers now? without paging or memory protection.. some malicious Goomba could steal your shrooms.
- Colonel Kernel
- Member
- Posts: 1437
- Joined: Tue Oct 17, 2006 6:06 pm
- Location: Vancouver, BC, Canada
- Contact:
Re: Is paging obsolete
The way I see it, as developers we'd love to be able to at least pretend that we have infinite memory. Designing systems that can tolerate low-memory conditions is really, really hard.
With virtual memory and 64-bit address spaces, we can basically pretend that we have an infinite amount of address space, which is convenient. But without swapping, the physical memory limitation stays and the degree of multitasking the user can do goes down accordingly. Lots of stuff is hardly ever used and not needed in memory for the long term anyway (e.g. -- app initialization code)... Why give up the ability of the OS to leave it on disk for you?
There are plenty of systems written in unmanaged code by very hard-working programmers that still consume way too much memory. There are a lot of reasons why software turns out the way it does, most of them due to organizational behaviour, economics, and human psychology. Insulting most of the world's developers is offensive and a huge oversimplification.
With virtual memory and 64-bit address spaces, we can basically pretend that we have an infinite amount of address space, which is convenient. But without swapping, the physical memory limitation stays and the degree of multitasking the user can do goes down accordingly. Lots of stuff is hardly ever used and not needed in memory for the long term anyway (e.g. -- app initialization code)... Why give up the ability of the OS to leave it on disk for you?
dude101 wrote:You can thank bloated virtual machines and lazy programmers for that.
There are plenty of systems written in unmanaged code by very hard-working programmers that still consume way too much memory. There are a lot of reasons why software turns out the way it does, most of them due to organizational behaviour, economics, and human psychology. Insulting most of the world's developers is offensive and a huge oversimplification.
Top three reasons why my OS project died:
- Too much overtime at work
- Got married
- My brain got stuck in an infinite loop while trying to design the memory manager
- mathematician
- Member
- Posts: 437
- Joined: Fri Dec 15, 2006 5:26 pm
- Location: Church Stretton Uk
Re: Is paging obsolete
Don't forget that in the early eighties a top of the range home computer had 64kb of memory - max. Then the PC came on the market with a maximum 1mb of memory, and nobody could imagine how anybody could ever fill it up. Then, when 32 bit processors came along, it was more than obvious that PCs would never have 4gb of memory inside them. A PC isn't a Cray, you know. And now we have 64 bit processors, and everybody is saying.......NickJohnson wrote:I would agree partially that *swapping* is obsolete, at least in some cases. I'm not planning to implement it on my OS for quite a while, and I've configured it out of my Linux system entirely. But for servers, it can be quite useful. And the way software seems to be headed, no amount of memory will really ever be enough (soon enough, it will be eight GIGs and constantly swapping ).
If history has anything to teach, it is that nothing in the world of computing is too extravagent to come true. Would you want to take a bet that, twenty years from now, somebody won't be complaining because the processor in their PC only has measly 1024 cores?
The continuous image of a connected set is connected.
- gravaera
- Member
- Posts: 737
- Joined: Tue Jun 02, 2009 4:35 pm
- Location: Supporting the cause: Use \tabs to indent code. NOT \x20 spaces.
Re: Is paging obsolete
No. I think he was really referring to the Horde of UniMonkeys. Those people who learned most of what they know about computing at Uni, and studied really really hard, and struggled to understand (ZOMG!! WTF is a POINTER???:?:) basic concepts, working hard to 'pass' exams, and then come out after three years believing they are 'Programmers'. You know the type: "Oh my god!! Why the hell do they use Hexadecimal so much when we have Decimal???? GAAAAAAAAAH"Colonel Kernel wrote:dude101 wrote:You can thank bloated virtual machines and lazy programmers for that.
There are plenty of systems written in unmanaged code by very hard-working programmers that still consume way too much memory. There are a lot of reasons why software turns out the way it does, most of them due to organizational behaviour, economics, and human psychology. Insulting most of the world's developers is offensive and a huge oversimplification.
And the classic: "Wow. What's the difference between using an array and a Linked list?"
They get 'training' to 'get a job'. By the way: If you identify with that, then, yes. You ARE a UniMonkey. A generic object spawned every three years by some institute's random-patterned engine.
Yup. Those kinds really are to blame. They don't understand **** about what they're programming. I mean: you see whole TEAMS of 'Programmers' (UniMonkeys) assigned to do a simple File Handling Module for a program.
Something a kid could do in a day. They are assigned a 'Project Manager', who gives them a week to do it. I mean...how incompetent.
And it's STILL inefficient. And in your post you defended a 'Hard Working Programmer', saying that their code can still come out below the mark in tpite of their hard work; Listen: Hard work doesn't cut it. A UniMonkey tries to implement a simple function, and doesn't understand the intricacies of the language. They think so statically.
Let me give you an example:
Code: Select all
//A REAL programmer's implementation:
int strlen(register const char *str)
{
register unsigned int i=0; // Increase speed of constantly used function.
while(str[i++]){}; //Preserve the address of str. The user will most likely need it after.
return i;
};
//A UniMonkey...
int strlen(const char *str)
{
int len; //(1)
while(str++ != '\0') //(2)
{
len++; //(3)
}
return len; //Here's the irritating part. He'll argue that: "But...it works."
};
(1)Uninitialized local variable. Smart. Yeah. So the garbage from the stack is just in there, waiting to cause undefined behaviour. Brilliant. Of course, he doesn't even know what the stack is. Nah. He thinks that he's dealing with a memory location. Of course.
(2) The fool just learned last week that Arrays in C/C++ are really just pointers. So, hey, "I can just advance the pointer!"
(3)He is doing TWO increments on each loop, for NO REASON.
/*"But it works!". No, it doesn't. It modifies the pointer. And even if it did, that's not the point, you idiot. (1) The function modifies the pointer, and therefore causes unforeseen effects, (2) It's half as fast as a proper implementation should be, (3) your overall style of absolutely n00bish coding is going to be reflected in every function, and line of code you write.
This may not seem so big right now, but this function is going to be called by everyone on the team. They'll take about a week to realize (UniMonkeys) that the reason they keep getting strange output is because their pointers are advanced beyond their bounds, and then not even notice that your code is inefficient.
(1)Code speed
(2)Code SANITY
and (3)Code memory efficiency?
17:56 < sortie> Paging is called paging because you need to draw it on pages in your notebook to succeed at it.
-
- Member
- Posts: 524
- Joined: Sun Nov 09, 2008 2:55 am
- Location: Pennsylvania, USA
Re: Is paging obsolete
Actually modifying the pointer would have no effect in C/C++ because a copy of the pointer is made for the call. Thats why you can't just do
to swap variables, because it will have no effect on the original a and b from the caller.
Also the first strlen() should have 'const char* const str' as the parameter so the pointer value is constant as well as what it points to. But thats just being a const nazi
Code: Select all
void swap(char* a,char* b)
{
char* temp = a;
a = b;
b = temp;
}
Also the first strlen() should have 'const char* const str' as the parameter so the pointer value is constant as well as what it points to. But thats just being a const nazi
- gravaera
- Member
- Posts: 737
- Joined: Tue Jun 02, 2009 4:35 pm
- Location: Supporting the cause: Use \tabs to indent code. NOT \x20 spaces.
Re: Is paging obsolete
But you get my drift. I don't think Universities are turning out the best produce. I started my day job the Wednesday of th eweek before (my first job ) and I'm working on a dev team for a Programming Company called Illuminat, and receiving 3/4 the wages of the other guys since I'm 17. but already the Project Manager is asking my opinion and stuff for the projects they work on.
The other guys in there make the most stupid mistakes in their code. I mean: honestly: big men, and they can't understand that "Okay, you don't need separate arrays for sotring client names because we have structures."
They actually think that structs are only used when contructing linked lists. But they "don't use those, cos they're too time consuming, and arrays are better. You just use the index variable on all the different arrays."
So a customer's data is stored as arrays of name, age, address, etc separately.
I mean: the first time I saw something like that, I was confused. I actually looked over the code three times, to make sure I wasn't just missing something. I was like: "I can't possible be seeing this."
But no. There it was.
The other guys in there make the most stupid mistakes in their code. I mean: honestly: big men, and they can't understand that "Okay, you don't need separate arrays for sotring client names because we have structures."
They actually think that structs are only used when contructing linked lists. But they "don't use those, cos they're too time consuming, and arrays are better. You just use the index variable on all the different arrays."
So a customer's data is stored as arrays of name, age, address, etc separately.
I mean: the first time I saw something like that, I was confused. I actually looked over the code three times, to make sure I wasn't just missing something. I was like: "I can't possible be seeing this."
But no. There it was.
17:56 < sortie> Paging is called paging because you need to draw it on pages in your notebook to succeed at it.