Sistemas Operativos - Mooshak 1 Mooshak O Mooshak (Leal and Silva, 2003) é um sistema para gerir concursos de programação. Para a sua utilização no âmbito da unidade curricular de Sistemas Operativos, far-se-á uso da versão alojada numa das máquinas do Departamento, acessível por http:// mooshak.deei.fct.ualg.pt/. As versões de bash e gcc instaladas nessa máquina são: Mooshak (Leal and Silva, 2003) is a system for managing programming contests. Its use during the Operating Systems unit will resort to the version hosted in one of the Department s machines, accessible in http://mooshak.deei. fct.ualg.pt/. bash and gcc versions installed in that machine are: user@deei-mooshak:~$ bash --version bash --version GNU bash, version 3.1.17(1)-release (i486-pc-linux-gnu) Copyright (C) 2005 Free Software Foundation, Inc. user@deei-mooshak:~$ gcc --version gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. user@deei-mooshak:~$ gcc -v Using built-in specs. Target: i486-linux-gnu Configured with:../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.1 --enable- cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --with-tune=i686 --enable-checking=release i486-linux-gnu 1
Thread model: posix gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) Neste documento, apresentam-se os passos necessários para o registo numa prova e para a submissão de um exercício. Pode também ver a sequência de passos necessários ao registo e submissão acedendo à Tutoria Electrónica. In this document the necessary steps to register in a contest and to submit an exercise are presented. The sequence of necessary steps for registration and submission can also be seen by accessing Tutoria Electrónica. 2 Registo no Mooshak 1. Aceda a http://mooshak.deei.fct.ualg.pt/~mooshak Escolha 2. Registar em concursos em-linha Goto http://mooshak.deei.fct.ualg.pt/~mooshak Choose 2. Register for on-line contest 2. Contest: SO0910T 3. Name: preencha o seu identificador que deve ter a forma <Nome Próprio>_<Apelido>_<número de aluno> fill in your identifier that must have the format <First Nameo>_<Last Name>_<student number> 4. Email: 5. Groups: preencha o seu endereço de correio electrónico fill in your email address escolha students choose students Depois desse registo o sistema enviará de uma palavra-passe para a caixa de correio electrónico que indicou. Guarde essa mensagem cuidadosamente, pois não poderá alterar a palavra-passe. After that registration the system will send a password to the email address that was supplied. Save that password carefully as you will not be able to change it. 2
3 Exercício / Exercise Escreva um programa em C que produza a mensagem Bom dia a todos! seguida por uma mudança de linha. Write a C program that will produce the message Bom dia a todos! followed by a line feed. 1. Crie na sua área um ficheiro com o seguinte código: Create in your working area a file with the following code: #include <stdio.h> int main(void){ printf("bom dia a todos!\n"); return(0); } 2. Para entrar no sistema, na página de acesso (Fig. 1) seleccione Login. To enter the system, in the access page (Fig. 1) select Login. Figura 1: Página de acesso ao Mooshak / Mooshak access page 3
3. Seleccione o concurso SO091009T (Fig. 2), e identificando-se com as credenciais que recebeu na sua caixa de correio electrónico, Select the contest SO091009T (Fig. 2), and usind the credentials that you received in your mailbox, Figura 2: Autenticação no Mooshak / Mooshak authentication 4. estará em condições de submeter o seu trabalho (Fig. 3). you will have the conditions to submit your work (Fig. 3). Figura 3: Estado do concurso / State of the contest 4
5. Verifique que o problema seleccionado é o correcto (neste caso, o problema A) e prima o botão Procurar e escolha o ficheiro com a solução do problema Verify that the selected problem is the correct one (in this case, problem A) and press the button Procurar and choose the file with the problem s solution Figura 4: Escolha da solução ao problema / Choice of the problem s solution 5
6. e submeta-o, escolhendo Submit (Fig. 5) e confirmando a sua escolha (Fig. 6) and submit it, by choosing Submit (Fig. 5) and confirming your choice (Fig. 6) Figura 5: Submissão da solução ao problema / Submission of the solution of the problem Figura 6: Confirmação da escolha da solução / Confirmation of the choice of the solution 6
7. Uma solução correcta do problema é aceite ( Fig 7). A correct solution is accepted ( Fig 7). Figura 7: Solução aceite / Accepted solution Referências José Paulo Leal and Fernando Silva. Mooshak: a web-based multi-site programming contest system. Software Practice & Experience, 33(6):567 581, 2003. URL http://www.ncc.up.pt/mooshak/. 7