[so] [tema5] rezolvarea dilemei

Silviu-Ionut Ganceanu silviug at gmail.com
Sun Jan 6 19:00:02 EET 2008


Plusand, cred ca ce vream check_ram0 de fapt este:

static void check_ram0 (size_t ppages)
{
....
    for (i = 0; i < ppages * p_sz / 4; i++) {
        read (ram_fd, &read_val, 4);
        if (read_val != SWAP_POISON) {
            check = 0;
            break;
        }
    }

    test ("ram_clean", check);
}


On Jan 6, 2008 6:49 PM, Andrei Deftu <andreideftu at yahoo.com> wrote:

> Nu, are dreptate Silviu ca se bat cap in cap testele.
> Daca ar fi sa scrii toate paginile in RAM pe care le
> aduci din swap, asta ar insemna sa pice ram_clean. De
> ce? Se acceseaza niste pagini care nu sunt in RAM. Ce
> se intampla cand se acceseaza pagini care nu sunt in
> RAM: swapin from swap. Deci in RAM file ar trebui sa
> apara poisonul din swap file.
>
> --- Catalina Caloian <catalina.caloian at gmail.com>
> wrote:
>
> > Buna.
> >
> > La 'ram_sync' ar trebui scrise in fisierul care
> > simuleaza RAM-ul si paginile
> > care au fost aduse din SWAP, indiferent de modul in
> > care au fost accesate
> > ulterior.
> >
> > Catalina
> >
> >
> >
> > _______________________________________________
> > so mailing list
> > so at cursuri.cs.pub.ro
> > http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/so
> >
>
>
>
>
>  ____________________________________________________________________________________
> Never miss a thing.  Make Yahoo your home page.
> http://www.yahoo.com/r/hs
> _______________________________________________
> so mailing list
> so at cursuri.cs.pub.ro
> http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/so
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cursuri.cs.pub.ro/pipermail/so/attachments/20080106/b081acff/attachment.htm


More information about the so mailing list