afilgueira / hilolay Goto Github PK
View Code? Open in Web Editor NEWULTs library
ULTs library
Así como está y según las instrucciones del repo, no compila en la VM de Lubuntu de la cátedra (la que tiene GUI).
Error: declaración de una variable dentro de la condición del for (Sólo se permite en C99)
ults.c: In function ‘test’:
ults.c:5:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int i = 0; i < 20; i++) {
^
ults.c:5:5: note: use option -std=c99 or -std=gnu99 to compile your code
ults.c: In function ‘main’:
ults.c:18:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
for(int i=0; i < 5; i++) {
^
Viendo los "yield"s y quizas alguna cosa mas (las e/s? algo asi?) estaria bueno trackear los tiempos y poder mostrar el gantt de lo que se ejecuto
Alternatives:
for (new_ult = &ults[0];new_ult->state != FREE; new_ult++) {
if (new_ult == &ults[MAX_ULTS]) {
lib_log("Cannot create a new ULTs!");
return ERROR_TOO_MANY_ULTS;
}
}
for (new_ult = &ults[0]; new_ult != &ults[MAX_ULTS] && new_ult->state != FREE; new_ult++);
if (new_ult == &ults[MAX_ULTS]) {
lib_log("Cannot create a new ULTs!");
return ERROR_TOO_MANY_ULTS;
}
new_ult = &ults[0];
while (new_ult != &ults[MAX_ULTS] && new_ult->state != FREE){
new_ult++;
}
if (new_ult == &ults[MAX_ULTS]) {
lib_log("Cannot create a new ULTs!");
return ERROR_TOO_MANY_ULTS;
}
Hoy en dia no la soporta. Chequear esto
Linkeada a #6
La funcion de init deberia permitir elegir el algoritmo y alguna cosa mas de configuracion
Que hagan yield al finalizarlas. Me gustaria tener una funcion generica, que reciba otra funcion por parametro, y de ahi descomponer en un set de 8-10 funciones "nuestras" que la usen
Esto es muy amplio, lo se... veamos que onda
Actualmente usa el vector de TCBs como "cola" y busca asi el siguiente que este "ready"
La planificacion actual chequea si no hay otros ults en ready. Deberiamos evitar eso, y si es necesario hacer un cambio de contexto "con el mismo", en favor de simplificar el codigo
Depende de #8
La biblioteca podría "ignorar" la señal (y dejarla encolada por ej) mientras nosotros "deshabilitamos las interrupciones"
Veamos que se puede hacer con esto
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.