Dsy Network www | forum | my | didattica | howto | wiki | el goog | stats | blog | dona | rappresentanti
Homepage
 Register   Calendar   Members  Faq   Search  Logout 
.dsy:it. : Powered by vBulletin version 2.3.1 .dsy:it. > Didattica > Corsi N - Z > Sistemi operativi I > domanda compitino
  Last Thread   Next Thread
Author
Thread    Post New Thread    Post A Reply
susy
.amico.

User info:
Registered: Aug 2007
Posts: 29 (0.00 al dì)
Location:
Corso:
Anno:
Time Online: 14:29:20 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
domanda compitino

Ciao ragazzi, questa era una domanda del secondo compitino di sisop (che non ho passato, porca miseria se lo odio sto esame):
che cosa ritorna questa funzione:

return (pp - pages) << pgshift

sono andata a vedere nel file kern/pmaps.h ma non riesco a capire cosa fa!

Aiuti?

26-06-2014 16:24
Click Here to See the Profile for susy Click here to Send susy a Private Message Find more posts by susy Add susy to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Cronovirus
dsy core staff

User info:
Registered: Jun 2012
Posts: 471 (0.11 al dì)
Location:
Corso: Magistrale in Informatica
Anno: 2
Time Online: 4 Days, 2:45:03: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Restituisce l'indirizzo fisico corrispondente al frame pp!
pp - pages : aritmetica dei puntatori, ottieni il NUMERO del frame a cui corrisponde pp
<< pgshift : moltiplica il numero precedentemente trovato per la dimensione di una pagina, così da avere un indirizzo fisico!

In conclusione era la funzione page2pa(struct PageInfo *pp).
È chiaro o ci sono dei dubbi? :)

26-06-2014 16:47
Click Here to See the Profile for Cronovirus Click here to Send Cronovirus a Private Message Find more posts by Cronovirus Add Cronovirus to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
susy
.amico.

User info:
Registered: Aug 2007
Posts: 29 (0.00 al dì)
Location:
Corso:
Anno:
Time Online: 14:29:20 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Gia è più chiaro, ma il frame di cosa? Perchè ricordo vagamente alcune delle risposte e riguardavano se non sbaglio la page directory e la page table o qualcosa del genere!

26-06-2014 17:15
Click Here to See the Profile for susy Click here to Send susy a Private Message Find more posts by susy Add susy to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Cronovirus
dsy core staff

User info:
Registered: Jun 2012
Posts: 471 (0.11 al dì)
Location:
Corso: Magistrale in Informatica
Anno: 2
Time Online: 4 Days, 2:45:03: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

La memoria è suddivisa in frame (o pagine) da 4K ciascuna: l'array pages rappresenta tali pagine (infatti è di dimensione npages, ovvero il numero totale di pagine fisiche presenti nel sistema).
Quindi facendo pp - pages hai il numero (progressivo) di pagina fisica a cui corrisponde pp.
Devi entrare nell'ottica che la struttura pages rappresenta i frame fisici e che questa è una funzione che ti permette di passare dalla struttura che rappresenta il frame fisico, al frame fisico reale!

P.s qui le page directory e le page table non c'entrano nulla!!

26-06-2014 17:31
Click Here to See the Profile for Cronovirus Click here to Send Cronovirus a Private Message Find more posts by Cronovirus Add Cronovirus to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 03:28.    Post New Thread    Post A Reply
  Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread | Add to Bookmarks

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
 

Powered by: vBulletin v2.3.1 - Copyright ©2000 - 2002, Jelsoft Enterprises Limited
Mantained by dsy crew (email) | Collabora con noi | Segnalaci un bug | Archive | Regolamento | Licenze | Thanks | Syndacate
Pagina generata in 0.030 seconds (81.46% PHP - 18.54% MySQL) con 22 query.