-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Juan Mesaglio <[email protected]>
- Loading branch information
0 parents
commit b1d37a7
Showing
36 changed files
with
977 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# A.L.GO - Pruebas preliminares y finales | ||
|
||
Dentro de este repositorio encontraran scripts que por el momento les van a servir para ver que su TP va funcionando. | ||
|
||
Los scripts deben estar correctamente redactados, cualquier consulta o inconveniente con los mismos por favor crear un issue en el [foro](https://faq.utnso.com.ar/foro) | ||
|
||
[Documento de Pruebas Preliminares](https://faq.utnso.com.ar/tp-c-comenta-pruebas) | ||
|
||
> Los resultados seran los mismos que en la implementacion de C | ||
Los `scripts_kernel` tienen valores default en algunas vairables de entorno: | ||
|
||
- KERNEL_HOST => localhost | ||
- KERNEL_PORT => 8080 | ||
|
||
Para cambiar el valor puede definir una variable en la terminal y volver a correr el script. Pueden hacerlo con algo [como](https://medium.com/@aviator2012/how-to-set-env-variables-on-our-local-terminal-63bb3165606b), `export KERNEL_HOST=192.168.1.10`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
SET AX 1 | ||
SET BX 1 | ||
SET CX 1 | ||
SET DX 1 | ||
IO_GEN_SLEEP Interfaz1 10 | ||
SET EAX 1 | ||
SET EBX 1 | ||
SET ECX 1 | ||
SET EDX 1 | ||
EXIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
SET AX 1 | ||
IO_GEN_SLEEP Interfaz1 1 | ||
SET BX 1 | ||
IO_GEN_SLEEP Interfaz1 1 | ||
SET CX 1 | ||
IO_GEN_SLEEP Interfaz1 1 | ||
SET DX 1 | ||
IO_GEN_SLEEP Interfaz1 1 | ||
SUM AX BX | ||
IO_GEN_SLEEP Interfaz1 1 | ||
SUM BX CX | ||
IO_GEN_SLEEP Interfaz1 1 | ||
SUM CX DX | ||
IO_GEN_SLEEP Interfaz1 1 | ||
SUM DX AX | ||
IO_GEN_SLEEP Interfaz1 1 | ||
EXIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
SET AX 1 | ||
SET BX 1 | ||
SUM AX BX | ||
IO_GEN_SLEEP Interfaz1 10 | ||
SET EAX 14554560 | ||
SET EBX 11598720 | ||
SET ECX 417574 | ||
SET EDX 450746 | ||
SUM EDX EAX | ||
SUM EDX EBX | ||
SUM EDX ECX | ||
IO_GEN_SLEEP Interfaz2 5 | ||
SUM AX BX | ||
SUB AX BX | ||
EXIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
SET AX 1 | ||
SET BX 1 | ||
SUM AX BX | ||
EXIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
SET AX 1 | ||
SET BX 1 | ||
SET CX 1 | ||
SET DX 1 | ||
SET EAX 1000 | ||
SET EBX 1000 | ||
SET ECX 1000 | ||
SET EDX 1000 | ||
SET SI 0 | ||
SET DI 64 | ||
EXIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
SET AX 1 | ||
SET BX 1 | ||
SET CX 1 | ||
SET DX 1 | ||
SET PC 0 | ||
EXIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
SET EAX 0 | ||
SET EBX 1 | ||
SET ECX 14554560 | ||
SUM EAX EBX | ||
SUB ECX EBX | ||
JNZ EAX 0 | ||
EXIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
|
||
if [ -z "$KERNEL_PORT" ]; then | ||
echo "The KERNEL_PORT is not set" | ||
echo "Using default port 8080" | ||
KERNEL_PORT=8080 | ||
fi | ||
|
||
if [ -z "$KERNEL_HOST" ]; then | ||
echo "The KERNEL_HOST is not set" | ||
echo "Using default host localhost" | ||
KERNEL_HOST=localhost | ||
fi | ||
|
||
curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ | ||
--header 'Content-Type: application/json' \ | ||
--data '{ | ||
"pid": 1, | ||
"path": "/scripts_memoria/LOCK_A" | ||
}' | ||
|
||
curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ | ||
--header 'Content-Type: application/json' \ | ||
--data '{ | ||
"pid": 2, | ||
"path": "/scripts_memoria/LOCK_B" | ||
}' | ||
|
||
curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ | ||
--header 'Content-Type: application/json' \ | ||
--data '{ | ||
"pid": 3, | ||
"path": "/scripts_memoria/LOCK_C" | ||
}' | ||
|
||
curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ | ||
--header 'Content-Type: application/json' \ | ||
--data '{ | ||
"pid": 4, | ||
"path": "/scripts_memoria/LOCK_D" | ||
}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
|
||
if [ -z "$KERNEL_PORT" ]; then | ||
echo "The KERNEL_PORT is not set" | ||
echo "Using default port 8080" | ||
KERNEL_PORT=8080 | ||
fi | ||
|
||
if [ -z "$KERNEL_HOST" ]; then | ||
echo "The KERNEL_HOST is not set" | ||
echo "Using default host localhost" | ||
KERNEL_HOST=localhost | ||
fi | ||
|
||
curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ | ||
--header 'Content-Type: application/json' \ | ||
--data '{ | ||
"pid": 1, | ||
"path": "/scripts_memoria/IO_A" | ||
}' | ||
|
||
curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ | ||
--header 'Content-Type: application/json' \ | ||
--data '{ | ||
"pid": 2, | ||
"path": "/scripts_memoria/IO_B" | ||
}' | ||
|
||
curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ | ||
--header 'Content-Type: application/json' \ | ||
--data '{ | ||
"pid": 3, | ||
"path": "/scripts_memoria/IO_C" | ||
}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
|
||
if [ -z "$KERNEL_PORT" ]; then | ||
echo "The KERNEL_PORT is not set" | ||
echo "Using default port 8080" | ||
KERNEL_PORT=8080 | ||
fi | ||
|
||
if [ -z "$KERNEL_HOST" ]; then | ||
echo "The KERNEL_HOST is not set" | ||
echo "Using default host localhost" | ||
KERNEL_HOST=localhost | ||
fi | ||
|
||
curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ | ||
--header 'Content-Type: application/json' \ | ||
--data '{ | ||
"pid": 1, | ||
"path": "/scripts_memoria/PLANI_1" | ||
}' | ||
|
||
curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ | ||
--header 'Content-Type: application/json' \ | ||
--data '{ | ||
"pid": 2, | ||
"path": "/scripts_memoria/PLANI_2" | ||
}' | ||
|
||
curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ | ||
--header 'Content-Type: application/json' \ | ||
--data '{ | ||
"pid": 3, | ||
"path": "/scripts_memoria/PLANI_3" | ||
}' | ||
|
||
curl --location --request PUT 'http://$KERNEL_HOST:$KERNEL_PORT/process' \ | ||
--header 'Content-Type: application/json' \ | ||
--data '{ | ||
"pid": 4, | ||
"path": "/scripts_memoria/PLANI_4" | ||
}' |
Oops, something went wrong.