There are many versions of QEMU emulator available on the internet. SO there are many features which are scrapped from older versions and newer versions are added. So during the installation of pintOS we had to comment line 622 in the utils.
After installing pintos on ubuntu We also need to add line in the bash file, in order to access pintos from any working directory rather than only in the utils directory. In Qemu, basic output statements are given through msg rather than printf to display on the emulator.
While we were trying to insert a module in a running kernel , It was restricting us to do so because of a protection layer that linux has to make changes into system file without valid authorization:
The solution to this issue is sudo access ,the sudo command provides a mechanism for granting administrator privileges, ordinarily only available to the root user, to normal users. This guide will show you the easiest way to create a new user with sudo access on Ubuntu, without having to modify your server's sudoers
While installing Vmware we were getting a error, it says "Service VMware Authorization failed (VMAuthdService)", and it was not getting installed.
We realised that to solve the problem a few changes had to be made in the Basic output/input program (BIOS). Before installation of vmware, first we had to disable virtualization and then had to activate it after the installation was over.
During making our project on File management system we faced a problem while including the header file #include.it reports error that it is not found. So we checked it in the include file and it was not there We later found out that to solve that issue we needed to download windows sdk. SDK stands for Software Development Kit. It is a collections of header files , source files, and other files.
Installing it will mean that you have the Header files you need to work with Windows API.
Our project was assembling a minimalist kernel which takes input from the keyboard using I/O module. To test the kernel we used QEMU as an emulator and it worked like a charm, but while booting the kernel via GRUB in VirtualBox(by Oracle) we faced a error which stopped the virtual machine.
After a bit of googling, we found out that this was a known issue of VirtualBox. Team Members: 16BCI0175 16BCI0136 16BCI0147
While on Pintos, to check if the implementation is working properly for all test cases , run the following command in pintos/src/threads/build $ make check This will run all the test cases and print the result for each test case i.e. “pass” or “fail”.
During the installing and learning Xv6 I came through a very interesting facts like-
1) Xv6 Source code is in the xv6-make file and by seeing this pdf file you can conclude that it is less then 10000 lines of code. Seriously, an Operating System within 10000 lines of code!!! This was the most impressing thing that I observed and
2)The core while loop the shell executes is shown below.
// Read and run input commands. while(getcmd(buf, sizeof(buf)) >= 0){ if(buf[0] == ’c’ && buf[1] == ’d’ && buf[2] == ’ ’){ // Clumsy but will have to do for now. // Chdir has no effect on the parent if run in the child. buf[strlen(buf)−1] = 0; // chop \n
This loop gets a command from a user, checks if it's the cd command and attempts to change directory if it is, otherwise it forks, and runs the entered command in the child process.
During the installing and learning Xv6 I came through a very interesting facts like-
1) Xv6 Source code is in the xv6-make file and by seeing this pdf file you can conclude that it is less then 10000 lines of code. Seriously, an Operating System within 10000 lines of code!!! This was the most impressing thing that I observed and
2)The core while loop the shell executes is shown below.
// Read and run input commands. while(getcmd(buf, sizeof(buf)) >= 0){ if(buf[0] == ’c’ && buf[1] == ’d’ && buf[2] == ’ ’){ // Clumsy but will have to do for now. // Chdir has no effect on the parent if run in the child. buf[strlen(buf)−1] = 0; // chop \n
This loop gets a command from a user, checks if it's the cd command and attempts to change directory if it is, otherwise it forks, and runs the entered command in the child process.
1. If theres a problem in finding a kernel error: There can be 2 reasons for this:
1. You forgot to compile Pintos kernel or compilation failed (Step 6). Check for this directory: $HOME/os-pg/pintos/src/threads/build
2. If the above mentioned directory exists, go to that directory and run the command.
2. If theres an error of this type: Prototype mismatch: sub main::SIGVTALRM () vs none at /home/rajeev/pint_os/pintos/src/utils/pintos line 935. Constant subroutine SIGVTALRM redefined at /home/rajeev/pint_os/pintos/src/utils/pintos line 927. Cannot find loader
Maybe you forgot to compile the kernel or had compilation errors. Check if you have this directory : $HOME/os-pg/pintos/src/threads/build. If you don’t have it do a “make” in threads directory.
If that is not the problem; check if your path is correct that is “$HOME” is given correctly as per your system
Our project is on Characterising the performance and power consumption of mobile apps. We used the PowerTutor App to tabulate the readings of factors such as CPU usage, power consumption etc.
1. PowerTutor gives an error of about 2-3% in the overall values and hence, it only gives an estimate idea of values.
2. It was not able to run on the OnePlus 5 mobile due to incompatibility constraints
3. Another limitation that we encountered was about a stable signal connection and the brightness of the screen to be fixed for all phones. Any difference in these conditions would result in inaccurate values
According to a research paper which suggests by carrying out experiments that for 10 seconds interval the power tutor app is accurate upto 0.8% on an average with the maximum error percentage being 2.5%. Considering only 0.8% error at an average is quite accurate for a mobile app. It gives the time series of power usage estimates for most of the hardware components, which allows mobile app developers to learn which apps make inefficient use of battery, which mainly results from the inappropriate use of mobile devices. This app can be downloaded in One plus 5 as well and it gives the overall power consumption of there smartphone but does not provide the application wise power consumption.
oneof the problem faced by us while implementing the bc_pgfault and flush_block functions in fs/bc.c. bc_pgfault in JOS was that -addr may not be aligned to a block boundary
for this we had to add a line addr = ROUNDDOWN(addr, PGSIZE);
to make the pointer to end of the page
TEAM MEMBERS Aditya Ranjan(16BCE2310) Aditya Sinha(16BCE2306)
Once you are done installing the Virtual Box. Click new to set up a new Virtual Machine. A possible error is that it might not show you 64-bit configuration even when your supervisor can support 64-bit and also all the ISOs are 64-bit.
Uninstalling and reinstalling VirtualBox made no observable difference so I booted into the BIOS settings. I have Lenovo Ideapad 300 so it can be done very easily by pressing a pin. It had enabled a bunch of BIOS passwords to make the system secure. To change this go to Security Setting -> Virtualization and enable it. Once you are done, save the settings and exit. Restart the system and bravo. It has changed.
If it has still not changed, type "turn windows features on or off" and disable "Hyper-V". That also works.
Group Members: Dikshita Salecha 16BCB0091 Kritika Mishra 16BCI0041
This Group project has been an essential source of learning & Experiencing how does the Linux Kernel work and the inter-working process among the Kernel Procedural Modules.
So mam, hereby we present to you some of the mistakes we committed while cooking a kernel and lessons learnt by committing these mistakes:
First things first, One basic misconception we had, which is that Linux itself is just a kernel, but the term is also used to referring to operating systems using the kernel. So if we want to tinker with the GUI programs, we need to install a Linux distribution then download the source of those programs separately. Also if we want to tinker with the kernel itself, the source can be obtained from the source website kernel.org.
About the Kernel modular System (KMS):
1) Each Linux distribution has its own set of programs and features you can change around to your liking, but we doubted that whether we wanted to edit everything that comes in a standard distribution like Ubuntu, as recompiling everything each time to see changes will take a while.
2) Linux is a lot to dive into for a first timer in the OS field (like us, in this case). There is a great smaller Unix-like operating system for learning called MINIX. It is used as a teaching aid in many operating system development courses worldwide.
So in the end we had fun with it because the acts of Building it, breaking it, and trying to rebuild it again was an interesting & a great learning experience!
NAME- KARTIKEYA JHA 16BCE0615 PROBLEM FACED DURING OUR PROJECT ON PINTOS IS
when I run "pintos run alarm-multiple", I got the following error
Prototype mismatch: sub main::SIGVTALRM () vs none at /home/suhas/bin/pintos line 949. Constant subroutine SIGVTALRM redefined at /home/suhas/bin/pintos line 941. Writing command line to /tmp/k5qCPWWL5b.dsk... squish-pty bochs -q exec: No such file or directory
Our project was to install and learn xv6 operating system.
We had issues while installing the xv6 operating system on macOS.
Xv6 compiles using the GNU C compiler, targeted at the x86 using ELF binaries. On BSD and Linux systems, native compilers can be used. On MacOS, which doesn’t use ELF binaries, a cross compiler had to be installed.
This is the reference we took help from to install xv6 on macOS: https://doesnotscale.com/compiling-xv6-on-os-x-10-9/
So we installed VMWare Fusion and mounted the Ubuntu 64-bit iso file on the virtual machine.
To run xv6 on Ubuntu, we need to have an emulator. We chose Qemu emulator to run xv6. The following commands were used to run xv6 on the ubuntu terminal:
sudo apt-get install qemu sudo apt-get install libc6-dev:i386 git clone https://github.com/mit-pdos/xv6-public.git xv6 chmod 700 -R xv6 cd xv6 make make qemu-nox
First of all I'd like to acknowledge the fact that this journey of a semester has proved to be really fruitful both as a student and as a person who's about to step in the real world.
In this small spam if time we faced a lot of difficulties, confusions and it felt really amazing how we overcame all of them.
The biggest mistake was when we were not able to put kemo address when we had a linker error.
We still couldn't figure out the placement of Kernal if it is centrally shared or distributed.
Learning OS with you was really an amazing feeling and I'd thank you for being so patient with us.
The project which we took up was on Pintos but then we had abort it as we had an error stating that there was a kernel panic error meaning the kernel was to be edited to make it work. So we took up a project to make a kernel and found out an interesting fact that the custom kernel should be added to the kernel of the host OS to test the kernel, it was a bit challenging.
The project on which we were working was making a kernel and we had this challenge of corrupting the whole ubuntu kernel file if something had gone wrong. We had to edit the kernel and add a menuentry to it for testing the kernel. In this process, we had corrupted the ubuntu kernel file and Ubuntu never loaded thereafter.
Our project was to install and learn xv6 operating system.
In our project, we tried to add priority scheduling to xv6. It initially employed a round robin scheduling to schedule the processes, but we implemented a system where round robin works, but it schedules a process to the CPU based on the priority of the process.
In xv6, there is no variable priority for a process. Hence, we added the attribute priority to struct proc which is a structure that represents a process control block in xv6. This will allow us to set and change the priority of a process.
To change the priority, we added a system call void chpr(int pid, int priority) that will change the priority of any process. We changed the function void scheduler() in proc.c, that implements the scheduling of the processes to implement priority based scheduling. For any process in state EMBRYO, we set the default priority to 10 in the function static struct proc* allocproc() and for any system processes, we set a higher priority to 3.
We also changed the maximum number of CPUs in xv6 to 2 from 8 in param.h, so that we can observe the state of the process to be changing from RUNNING to RUNNABLE or SLEEPING.
However, when compiling the code we are getting an interrupt from the cpu, which means we are facing some issues which we are still trying to resolve.
The project on which we are working on involved manipulating keyboard and mouse interrupts and using a simple CLI code to perform arithmetic operations using the interrupts
One of the issues that we have faced is about the keyboard interrupt handler in CentOS. Every key has a specific integer value which is given to the interrupt handler to recognise which command is given. In CentOS, this integer value was not being recognised properly which made it difficult for us to proceed with our project in this particular operating system.
Another issue was the linkage of keyboard and mouse interrupts for our project. We had used keyboard interrupts to run simple commands such as the UP arrow key will show the previous command and DOWN arrow key will return the command which has just been typed. As the mouse and keyboard interrupts work simultaneously, we were unable to perform much actions using the mouse interrupts. But we were able to identify what each button performs on the mouse or the track pad of a laptop. We were also able to disable and enable particular buttons on the track pad.
We had a problem regarding the proc.c file present in the xv6 os, that did not recognize the structure proc which was defined in the file. We also had an problem with the installation about the xv6 os on windows without using virtual box since bash for windows was present on the windows 10 updated edition. So we went to the MIT site for the xv6 os where we found the git clone website for the installation of the xv6 os software which would mask on the bash present in the system.
Team memebers Apoorv Tyagi(16BCE0097) Chanchal Kumar(16BCE0043) Durvesh Deshmukh(16BCE0392)
While doing our project keyboard and mouse handling interrupts we realised the scope for introducing new keys to the system as we noticed that each key had been assigned a specific number by which it communicates with the system but many of such keys remain unassigned specially in the case of a mouse which can be given certain values and be made to execute certain set of commands.Thus we have technically found a way to introduce new keys to the system with customised set of commands which it executes.
Team: Priyal Agrawal Jay Arun Pawar Rakshit Jain so our project topic is Implementing priority scheduling in pintos. While installing the pintos we faced an issue when we compile and make all the changes we tried to run command pintos-run alarm multiple but it showed 'no command pintos found'. we already have installed it then also then later we add the path of the variable in .bashrc After this the command 'pintos-run multiple alarm was successfully running.
TEAM: RAKSHIT JAIN 16BCE0645 JAY PAWAR PRIYAL AGGARWAL
PROBLEM: How to verify which scheduling algorithm an OS is working on or using? How we can prove that whether an OS is working on PRIORITY SCHEDULING or FCFS ROUND ROBIN?
we had a problem while making the file of MIT-JOS using qemu emulator it was saying qemu i386 not found and was not able to make the file. but then we corrected by editing the env.mk file in config folder of MIT-JOS by adding location of qemu-system-i386 to the QEMU variable for our system it was QEMU=/usr/bin/qemu-system-i386
TEAM MEMBERS: NIKITA BANGA 16BCE0099 SUMEDHA P UPADHYAY 16BCE0518 Our project was related to fog computing. The tool we used was iFogsim. But, for complete installation for iFogsim we required Netbeans. Now, the problem we faced was that the simulation was not working with windows since they are not fully compatible. The windows got hanged and stopped working. When we used Ubuntu, it started working, simulation was dynamic and the graphs were easily woking as we needed them to.
So, the project I am doing was related to software-defined wireless networking, and I was trying to learn the basic concept behind this. As for this, I have to install a emulator for this, some of the problems I was facing in this projects were: 1) Installation As this is very less know software, so it was all new to install this, basically I was working on Mininet that is UNIX based, but I am having a Windows machine, so I have to try it on virtual box and install many things other than that like Putty for port forwarding. After that also there were many problems. 2) Graphical User Interface It is very difficult to understand a coding language by other person who is not a developer, so for any demonstration I have to show them in any graphical manner, which was difficult as very less number of interface are present for this, so I have to search for them, and also I was not able to make my own, and the present one were really confusing. 3) Prerequisite Knowledge As this was something new to me, so I have to study a lot about networking only, and then I have to study about the principle of the software. You have to read the manual, research paper, theoretical knowledge is also needed.
These were the problems I was facing.
Now, I will try to explain the solution for this.
So, when you are selecting any project or you are given any project, initially try to get the theoretical knowledge of it, as it is very important, try to search for research papers, it really help and tells that what research are going on. Then try to find any manual for the software that you are using or just try to understand the previous work, that how they have done it, and if possible ask from someone who had done it before. Installation is the thing which is the first step of you project, so it must be properly installed, if any file is missing, then you have to go and again do all the steps. Always try for an Open-source software.
I think the problems I faced are very general and faced by many, so I just gave general instructions and not being specific.
our project topic is file management in xv6 we tried to add a syscall in xv6. we successfully added the syscall but it was not showing any output it was simply showing a blank output one more thing i would like to mention here is that no other syscall was working well in xv6 in most of the 'exec failed ' message was showing. we had made necessary changes in the sysproc.c ,syscall.c,syscall.h,proc.c,useys.S,user.h files . we tried to execute a simple c file also in xv6 by adding filename in the Makefile but ii always used to show error "no rule to make target filename"
We have installed virtual box and mininet as a software in our project. Mininet creates virtual network and thereby help us to understand how a load is balanced on the server side. There are many load balancing algorithm which we have also covered in our project. Clients send request to the server and how server manages it is the real question so here we used mininet and C sharp programming language to show virtually how it works.
We created three programs, one for client side ,one for server side, one for load balancer side. We then with the help of mininet created three srevers which handle the request of calculating the value of pi accurately to 12 places after decimal within seconds.This was achieved using three servers. The biggest problem we faced was of implementing it as it was done using C sharp . So to compile it and run it we installed virtual studio also.Secondly creating a virtual network on mininet was also difficult. We were also asked to study jbotsim(a library of java which simplify the problems such as creating,moving and deleting node) but since it requires a multiple network environment and it's really hard to do that in mininet that's why we were not able to implement it in our program.
When attempting to run a virtual machine created in another VMware virtualization platform, such as VMware Workstation, the VM will fail to start and the message "Unsupported and/or invalid disk type" will appear. This error occurs because the virtual disk formats associated with the different virtualization platforms are incompatible with ESX/ESXi.
Running the following command from the server console will also convert the virtual disk to a format that ESX/ESXi can understand:
Aditya Harsh 16BCE0657 My project is based on Vagrant tool, which basically provides a working virtual machine environment in a single workflow. Vagrant lowers development environment setup time, increases production parity, and enables user to work on different commanding platforms at the same time without difficulty in configuration. I had issues regarding command line and working of basic commands on my command prompt, thus I had to install cmder(commander) which has a different command line and works better with the vagrant tool.
while using Pintos timeout function you can get a common error
In orderto compile the project from the src/threads/ directory, and the initial test pintos run alarm-multiple seems to work okay but if you run make check under src/threads/build, all tests get a timeout fault
To remove this problem: Apparently, Your QEMU no longer supports the power off sequence on the port 0x8900. Here is a fix that made it work for me (found in chaOs): in the file devices/shutdown.c patch shutdown_power_off as follows:
I had some problem with respect to Nachos calls. In nachos, exec and fork have different meanings than Unix calls. The Nachos Fork and Exec routines have completely different semantic from the Unix system calls.
Exec in Nachos creates a new address space, reads a binary program into it, and then creates a new thread via Thread:Fork to run it. In Unix separate fork and exec system calls are needed to achieve the same result.
Fork in Nachos creates a new thread of control executing in an existing address space.
When a Nachos program issues an Exec system call, the parent process is executing the code associated with the Exec call. The parent will need to invoke Thread::Fork to create the new thread that executes the child process.
Thus this confusion was what I came across and this was subsequently solved as we discovered more about Nachos in our project.
We worked on installing pintos in out systems. We were able to successfully install it in our systems, there was an issue that all out make check commands were resulting in failures.
Then we found out that,
Apparently, QEMU no longer supports the power off sequence on the port 0x8900. Hence ther was an fix that made it work for us; In the file devices/shutdown.c patch shutdown_power_off as follows:
The problem I faced was, that during the cygwin implementation of nachos, I could not execute the make command and c files.
Source of problem: This was due to the absence of make and gcc libraries in the nachos bin
Solution: run the setup once again to update and when the option to select libraries, under devel ,select all files which have gcc, make or automake in their name,and install.
Note: if first you had used a 32 bit setup only use a 32 bit setup to update and same goes for the 64 bit setup.
One issue which we faced during our project was how to implement multiprogramming in NachOS if it is designed foor single proogramming.
The solution to the above problem is:-
To create new process from another process, we need to invoke system calls. SC_Exec is the system call to start a new user process. SC_Exit is the system call to exit a user process. Write codes for the system calls SC_Exec and SC_Exit assuming monoprogramming. But we can’t even test these right in that form, because calling SC_Exec means creating a user process from a user process which ‐‐ by definition is multiprogramming.We add a typical memory management for multiprogramming so that several user process can reside in main memory – hence complete the multiprogramming part.
Prototype mismatch: sub main::SIGVTALRM () vs none at /usr/class/cs140/x86_64/bin/pintos line 934. Constant subroutine SIGVTALRM redefined at /usr/class/cs140/x86_64/bin/pintos line 926. squish-pty bochs -q ======================================================================== Bochs x86 Emulator 2.2.6 Build from CVS snapshot on January 29, 2006 ======================================================================== 00000000000i[ ] reading configuration from bochsrc.txt 00000000000e[ ] user_shortcut: old-style syntax detected 00000000000i[ ] installing nogui module as the Bochs GUI 00000000000i[ ] using log file bochsout.txt PiLo hda1 Loading........ Kernel command line: run alarm-wait Pintos booting with 4,096 kB RAM... 383 pages available in kernel pool. 383 pages available in user pool. Calibrating timer... 204,600 loops/s. Boot complete. Executing 'alarm-wait': Kernel PANIC at ../../tests/threads/tests.c:60 in run_test(): no test named "alarm-wait" Call stack: 0xc0027ae5 0xc00296f3 0xc00201a4 0xc00206e3. --------------------------------------------
Solution:
We replaced the [] with '^v'. This solved our error.
We added int64_t sleep_ticks; /* time to sleep in ticks */ to the thread.h file to make the code work.
/* Timer interrupt handler. */ static void timer_interrupt (struct intr_frame *args UNUSED) { ticks++; thread_tick (); // Check each thread with wake_threads () after each tick. It is assumed that // interrupts are disabled because timer_interrupt () is an interrupt handler. thread_foreach (wake_threads, 0); }
Solution : we have to define that wake_threads () in our timer.c. It basically a function to check whether a thread has to wake up or not.
Problem: To Initialize a multicore system's cores, we send INIT IPI and INIT SIPI signals via LAPIC of BSP to other APs and make them execute vector code which initializes and makes them usable. At a given time, only a single AP can execute the vector code, while other APs wait until the previous AP has done execution - Semaphore usage. This Serial execution and bootup is very slow, We need some way to parallelize it. Solution: If we could make multiple copies of the vector code, one for each AP, all the APs could boot up in parallel. Copying a function code on runtime isnt easy and straightforward due to linkage issues. For that issue, we can create a binary 'template' code on compile time and can then copy the vector on runtime onto another memory location, and then replace all external memory references accordingly. The code may use temporary memory locations and variables which need to be allocated seperately along the code. Therefore in the template, we introduce certain magic numbers which we raplace in the copied code by memory addresses of various things. This way each code can be executed independently from another. Example AP Bootup TEMPLATE Code: AP_startup_Code: cli xor ax, ax mov ds, ax mov es, ax mov fs, ax mov gs, ax mov ss, ax xor esp, esp mov sp, 0x4284 ; magic number, replaced by address of stack xor eax, eax mov edx, 0x10 mov cr0, edx mov si, 0x3240 lgdt [ds:si] mov si, 0x3250 lidt [ds:si] mov eax, cr0 ; set bit 0 in cr0--enter pmode or eax, 1 mov cr0, eax mov ax, 0x10 ; 0x10 is the offset in the GDT to our data segment mov ds, ax ; Load all data segment selectors mov es, ax mov fs, ax mov gs, ax mov ss, ax BITS 32 mov eax, 1 mov bx, 0x1000 add dword [ds:bx], 0x1 jmp 0x08:0x00001000 hlt
Numbers like 0x4284, 0x3240, 0x3250 are place holders, which gets replaced later by memory addresses of new stack, lgdt table, lidt table respectively. Thus we can speed up the process. We apply the same thing on schedulers, thus making it possible for each core to have it's own scheduler such that true parallel computing can be achevied.
The problem faced by us was that while installing the gcc compiler in Fedora OS, after giving the command yum install gcc, we were receiving the error, file /usr/lib/audit from install of glibc-2.16-31.fc18.i686 conflicts with file from package audit-2.2.1-2.fc18.i686
In order to overcome that, we have to give the command 'yum update audit' prior to installing gcc compiler in Fedora.
Team members: Ayush Maria - 16BCE0400 K c Kowshik Kumar - 16BCE2238
Issues that we faced and the situation we had to go through during the installation, that we had to set the path variable properly and to make sure that the packages of Cygwin were also be installed which is necessary. Also we had to install mips cross compiler which is hardly available over the internet. Then we had problems with coding in java as we didn’t know java programming for now. For producer consumer there are hardly any help available online, while there were no walk through available which would help us understand the procedures. Also while doing project 1 of nachos we had to struggle with the threads because we didn't have a clear idea of what was to be modified, which leads us to an intense discussion in our group and to reach towards the conclusion, finally after researching again and going through the problems we subsequently solved the problems.
Issues that we faced during installation of pintos that it was showing a error message when we run pintos command i.e pintos run alarm-multiple that : use of literal control characters in variable name is deprecated at .pintos line 911. prototype mismatch: sub main::SIGVTALRM () vs none at ./pintos line 933 constant Subroutine SIGVTALRM redefined at ./pintos line 927. cannot find kernel.
Issues that we faced during installation of pintos that it was showing a error message when we run pintos command i.e pintos run alarm-multiple that : use of literal control characters in variable name is deprecated at .pintos line 911. prototype mismatch: sub main::SIGVTALRM () vs none at ./pintos line 933 constant Subroutine SIGVTALRM redefined at ./pintos line 927. cannot find kernel.
Problem 1- While running pintos run alarm-multiple you get some SIGVTALRM, Constant routine and prototype mismatch error.
Solution - Turns out to solve this you just need to go to the pintos file in src/utils/ and then comment out the whole SIGVTALRM function. It was at line 925 in my case but you can always use Ctrl+F.
Problem 2- While running pintos run alarm-multiple you get Cannot find Kernel error.
Solution - You must've used "$HOME/os-pg/pintos/src" in the pintos and Pintos.pm file. Thing is Perl can't understand the "$" or "~" so, you need to write the absolute path.
To find the absolute path, just open up the terminal and type 'echo $HOME'. The output should be something like this
Now open up the pintos file in src/utils and then replace the $HOME here
By whatever your absolute directory is, like this.
Do the same in Pintos.pm file. Save the files and restart the terminal. It should be working now
New thought provoking information about the latest happenings in the Operating System, Distributed Operating Systems, Virtualization, Hardware and Software, Parallel Computations etc...
There are many versions of QEMU emulator available on the internet. SO there are many features which are scrapped from older versions and newer versions are added. So during the installation of pintOS we had to comment line 622 in the utils.
ReplyDeleteAfter installing pintos on ubuntu We also need to add line in the bash file, in order to access pintos from any working directory rather than only in the utils directory.
ReplyDeleteIn Qemu, basic output statements are given through msg rather than printf to display on the emulator.
While we were trying to insert a module in a running kernel , It was restricting us to do so because of a protection layer that linux has to make changes into system file without valid authorization:
ReplyDeleteThe solution to this issue is sudo access ,the sudo command provides a mechanism for granting administrator privileges, ordinarily only available to the root user, to normal users. This guide will show you the easiest way to create a new user with sudo access on Ubuntu, without having to modify your server's sudoers
While installing Vmware we were getting a error, it says "Service VMware Authorization failed (VMAuthdService)", and it was not getting installed.
ReplyDeleteWe realised that to solve the problem a few changes had to be made in the Basic output/input program (BIOS). Before installation of vmware, first we had to disable virtualization and then had to activate it after the installation was over.
During making our project on File management system we faced a problem while including the header file #include.it reports error that it is not found. So we checked it in the include file and it was not there
ReplyDeleteWe later found out that to solve that issue we needed to download windows sdk.
SDK stands for Software Development Kit. It is a collections of header files , source files, and other files.
Installing it will mean that you have the Header files you need to work with Windows API.
Our project was assembling a minimalist kernel which takes input from the keyboard using I/O module. To test the kernel we used QEMU as an emulator and it worked like a charm, but while booting the kernel via GRUB in VirtualBox(by Oracle) we faced a error which stopped the virtual machine.
ReplyDeleteAfter a bit of googling, we found out that this was a known issue of VirtualBox.
Team Members:
16BCI0175
16BCI0136
16BCI0147
This comment has been removed by the author.
ReplyDeleteWhile on Pintos, to check if the implementation is working properly for all test cases , run the following command in pintos/src/threads/build
ReplyDelete$ make check
This will run all the test cases and print the result for each test case i.e. “pass” or “fail”.
ReplyDelete16BCE0190 Ruchir
During the installing and learning Xv6 I came through a very interesting facts like-
1) Xv6 Source code is in the xv6-make file and by seeing this pdf file you can conclude that it is less then 10000 lines of code. Seriously, an Operating System within 10000 lines of code!!! This was the most impressing thing that I observed and
2)The core while loop the shell executes is shown below.
// Read and run input commands.
while(getcmd(buf, sizeof(buf)) >= 0){
if(buf[0] == ’c’ && buf[1] == ’d’ && buf[2] == ’ ’){
// Clumsy but will have to do for now.
// Chdir has no effect on the parent if run in the child.
buf[strlen(buf)−1] = 0; // chop \n
if(chdir(buf+3) < 0)
printf(2, "cannot cd %s\n", buf+3);
continue;
}
if(fork1() == 0)
runcmd(parsecmd(buf));
wait();
}
exit();
This loop gets a command from a user, checks if it's the cd command and attempts to change directory if it is, otherwise it forks, and runs the entered command in the child process.
ReplyDelete16BCE0190 Ruchir
During the installing and learning Xv6 I came through a very interesting facts like-
1) Xv6 Source code is in the xv6-make file and by seeing this pdf file you can conclude that it is less then 10000 lines of code. Seriously, an Operating System within 10000 lines of code!!! This was the most impressing thing that I observed and
2)The core while loop the shell executes is shown below.
// Read and run input commands.
while(getcmd(buf, sizeof(buf)) >= 0){
if(buf[0] == ’c’ && buf[1] == ’d’ && buf[2] == ’ ’){
// Clumsy but will have to do for now.
// Chdir has no effect on the parent if run in the child.
buf[strlen(buf)−1] = 0; // chop \n
if(chdir(buf+3) < 0)
printf(2, "cannot cd %s\n", buf+3);
continue;
}
if(fork1() == 0)
runcmd(parsecmd(buf));
wait();
}
exit();
This loop gets a command from a user, checks if it's the cd command and attempts to change directory if it is, otherwise it forks, and runs the entered command in the child process.
This comment has been removed by the author.
ReplyDelete1. If theres a problem in finding a kernel error:
ReplyDeleteThere can be 2 reasons for this:
1. You forgot to compile Pintos kernel or compilation failed (Step 6). Check for this
directory: $HOME/os-pg/pintos/src/threads/build
2. If the above mentioned directory exists, go to that directory and run the
command.
2. If theres an error of this type:
Prototype mismatch: sub main::SIGVTALRM () vs none at /home/rajeev/pint_os/pintos/src/utils/pintos line 935.
Constant subroutine SIGVTALRM redefined at /home/rajeev/pint_os/pintos/src/utils/pintos line 927.
Cannot find loader
Maybe you forgot to compile the kernel or had compilation errors. Check if you have this directory : $HOME/os-pg/pintos/src/threads/build. If you don’t have it do a “make” in threads directory.
If that is not the problem; check if your path is correct that is “$HOME” is given correctly as per your system
GROUP MEMBERS:
1. 16BCE0020 ANUJ SINGH
2. 16BCE0114 ARYAN PUSHKAR
3. 16BCE0968 SAURABH AGARWAL
While installing VMware Workstation there was no option for Ubuntu 64-bit in dropdown button
ReplyDeleteLater we came to know that on rebooting we have to change the settings in BIOS:
VT disabled to VT enabled
Utkarsh Tandon
ReplyDelete16BCE2005
Our project is on Characterising the performance and power consumption of mobile apps.
We used the PowerTutor App to tabulate the readings of factors such as CPU usage, power consumption etc.
1. PowerTutor gives an error of about 2-3% in the overall values and hence, it only gives an estimate idea of values.
2. It was not able to run on the OnePlus 5 mobile due to incompatibility constraints
3. Another limitation that we encountered was about a stable signal connection and the brightness of the screen to be fixed for all phones. Any difference in these conditions would result in inaccurate values
Group Members:
16BBCE2041
16BCE2047
16BCB0098
RAKSHI SINHA
Delete16BCE2041
According to a research paper which suggests by carrying out experiments that for 10 seconds interval the power tutor app is accurate upto 0.8% on an average with the maximum error percentage being 2.5%. Considering only 0.8% error at an average is quite accurate for a mobile app. It gives the time series of power usage estimates for most of the hardware components, which allows mobile app developers to learn which apps make inefficient use of battery, which mainly results from the inappropriate use of mobile devices.
This app can be downloaded in One plus 5 as well and it gives the overall power consumption of there smartphone but does not provide the application wise power consumption.
oneof the problem faced by us while implementing the bc_pgfault and flush_block functions in fs/bc.c. bc_pgfault in JOS was that
ReplyDelete-addr may not be aligned to a block boundary
for this we had to add a line
addr = ROUNDDOWN(addr, PGSIZE);
to make the pointer to end of the page
TEAM MEMBERS
Aditya Ranjan(16BCE2310)
Aditya Sinha(16BCE2306)
Once you are done installing the Virtual Box. Click new to set up a new Virtual Machine. A possible error is that it might not show you 64-bit configuration even when your supervisor can support 64-bit and also all the ISOs are 64-bit.
ReplyDeleteUninstalling and reinstalling VirtualBox made no observable difference so I booted into the BIOS settings. I have Lenovo Ideapad 300 so it can be done very easily by pressing a pin. It had enabled a bunch of BIOS passwords to make the system secure. To change this go to Security Setting -> Virtualization and enable it. Once you are done, save the settings and exit. Restart the system and bravo. It has changed.
If it has still not changed, type "turn windows features on or off" and disable "Hyper-V". That also works.
Group Members:
Dikshita Salecha 16BCB0091
Kritika Mishra 16BCI0041
http://kritikamishra5.blogspot.in/2017/11/errors-faced-while-working-with-vagrant.html
ReplyDeleteWhat we learnt from cooking a Linux kernel?
Group Members:
16BCE0784- Ujjwal Seth
16BCE0760 -Raghul Krishnan
16BCE0529 - Shubham Chaudhary
16BCE0012 - Gudapati Sumanth
This Group project has been an essential source of learning & Experiencing how does the Linux Kernel work and the inter-working process among the Kernel Procedural Modules.
So mam, hereby we present to you some of the mistakes we committed while cooking a kernel and lessons learnt by committing these mistakes:
First things first,
One basic misconception we had, which is that Linux itself is just a kernel, but the term is also used to referring to operating systems using the kernel.
So if we want to tinker with the GUI programs, we need to install a Linux distribution then download the source of those programs separately.
Also if we want to tinker with the kernel itself, the source can be obtained from the source website kernel.org.
About the Kernel modular System (KMS):
1) Each Linux distribution has its own set of programs and features you can change around to your liking, but we doubted that whether we wanted to edit everything that comes in a standard distribution like Ubuntu, as recompiling everything each time to see changes will take a while.
2) Linux is a lot to dive into for a first timer in the OS field (like us, in this case). There is a great smaller Unix-like operating system for learning called MINIX. It is used as a teaching aid in many operating system development courses worldwide.
So in the end we had fun with it because the acts of Building it, breaking it, and trying to rebuild it again was an interesting & a great learning experience!
NAME- KARTIKEYA JHA 16BCE0615
ReplyDeletePROBLEM FACED DURING OUR PROJECT ON PINTOS IS
when I run "pintos run alarm-multiple", I got the following error
Prototype mismatch: sub main::SIGVTALRM () vs none at /home/suhas/bin/pintos line 949.
Constant subroutine SIGVTALRM redefined at /home/suhas/bin/pintos line 941.
Writing command line to /tmp/k5qCPWWL5b.dsk...
squish-pty bochs -q
exec: No such file or directory
Our project was to install and learn xv6 operating system.
ReplyDeleteWe had issues while installing the xv6 operating system on macOS.
Xv6 compiles using the GNU C compiler, targeted at the x86 using ELF binaries. On BSD and Linux systems, native compilers can be used. On MacOS, which doesn’t use ELF binaries, a cross compiler had to be installed.
This is the reference we took help from to install xv6 on macOS:
https://doesnotscale.com/compiling-xv6-on-os-x-10-9/
So we installed VMWare Fusion and mounted the Ubuntu 64-bit iso file on the virtual machine.
To run xv6 on Ubuntu, we need to have an emulator. We chose Qemu emulator to run xv6.
The following commands were used to run xv6 on the ubuntu terminal:
sudo apt-get install qemu
sudo apt-get install libc6-dev:i386
git clone https://github.com/mit-pdos/xv6-public.git xv6
chmod 700 -R xv6
cd xv6
make
make qemu-nox
First of all I'd like to acknowledge the fact that this journey of a semester has proved to be really fruitful both as a student and as a person who's about to step in the real world.
ReplyDeleteIn this small spam if time we faced a lot of difficulties, confusions and it felt really amazing how we overcame all of them.
The biggest mistake was when we were not able to put kemo address when we had a linker error.
We still couldn't figure out the placement of Kernal if it is centrally shared or distributed.
Learning OS with you was really an amazing feeling and I'd thank you for being so patient with us.
Yours truly
Shubham Chaudhary
Name - Krishnan Raghul
ReplyDeleteReg. No: 16BCE0760
The project which we took up was on Pintos but then we had abort it as we had an error stating that there was a kernel panic error meaning the kernel was to be edited to make it work.
So we took up a project to make a kernel and found out an interesting fact that the custom kernel should be added to the kernel of the host OS to test the kernel, it was a bit challenging.
Name - G. Sumanth
ReplyDeleteReg. No.: 16BCE0012
The project on which we were working was making a kernel and we had this challenge of corrupting the whole ubuntu kernel file if something had gone wrong. We had to edit the kernel and add a menuentry to it for testing the kernel. In this process, we had corrupted the ubuntu kernel file and Ubuntu never loaded thereafter.
Our project was to install and learn xv6 operating system.
ReplyDeleteIn our project, we tried to add priority scheduling to xv6. It initially employed a round robin scheduling to schedule the processes, but we implemented a system where round robin works, but it schedules a process to the CPU based on the priority of the process.
In xv6, there is no variable priority for a process. Hence, we added the attribute priority to struct proc which is a structure that represents a process control block in xv6. This will allow us to set and change the priority of a process.
To change the priority, we added a system call void chpr(int pid, int priority) that will change the priority of any process. We changed the function void scheduler() in proc.c, that implements the scheduling of the processes to implement priority based scheduling. For any process in state EMBRYO, we set the default priority to 10 in the function static struct proc* allocproc() and for any system processes, we set a higher priority to 3.
We also changed the maximum number of CPUs in xv6 to 2 from 8 in param.h, so that we can observe the state of the process to be changing from RUNNING to RUNNABLE or SLEEPING.
However, when compiling the code we are getting an interrupt from the cpu, which means we are facing some issues which we are still trying to resolve.
The project on which we are working on involved manipulating keyboard and mouse interrupts and using a simple CLI code to perform arithmetic operations using the interrupts
ReplyDeleteOne of the issues that we have faced is about the keyboard interrupt handler in CentOS. Every key has a specific integer value which is given to the interrupt handler to recognise which command is given. In CentOS, this integer value was not being recognised properly which made it difficult for us to proceed with our project in this particular operating system.
Another issue was the linkage of keyboard and mouse interrupts for our project. We had used keyboard interrupts to run simple commands such as the UP arrow key will show the previous command and DOWN arrow key will return the command which has just been typed. As the mouse and keyboard interrupts work simultaneously, we were unable to perform much actions using the mouse interrupts. But we were able to identify what each button performs on the mouse or the track pad of a laptop. We were also able to disable and enable particular buttons on the track pad.
We had a problem regarding the proc.c file present in the xv6 os, that did not recognize the structure proc which was defined in the file.
ReplyDeleteWe also had an problem with the installation about the xv6 os on windows without using virtual box since bash for windows was present on the windows 10 updated edition.
So we went to the MIT site for the xv6 os where we found the git clone website for the installation of the xv6 os software which would mask on the bash present in the system.
Team memebers
Apoorv Tyagi(16BCE0097)
Chanchal Kumar(16BCE0043)
Durvesh Deshmukh(16BCE0392)
While doing our project keyboard and mouse handling interrupts we realised the scope for introducing new keys to the system as we noticed that each key had been assigned a specific number by which it communicates with the system but many of such keys remain unassigned specially in the case of a mouse which can be given certain values and be made to execute certain set of commands.Thus we have technically found a way to introduce new keys to the system with customised set of commands which it executes.
ReplyDeleteTeam: Priyal Agrawal
ReplyDeleteJay Arun Pawar
Rakshit Jain
so our project topic is Implementing priority scheduling in pintos.
While installing the pintos we faced an issue when we compile and make all the changes we tried to run command pintos-run alarm multiple but it showed 'no command pintos found'. we already have installed it then also then later we add the path of the variable in .bashrc After this the command 'pintos-run multiple alarm was successfully running.
TEAM:
ReplyDeleteRAKSHIT JAIN 16BCE0645
JAY PAWAR
PRIYAL AGGARWAL
PROBLEM:
How to verify which scheduling algorithm an OS is working on or using?
How we can prove that whether an OS is working on PRIORITY SCHEDULING or FCFS ROUND ROBIN?
we had a problem while making the file of MIT-JOS using qemu emulator it was saying qemu i386 not found and was not able to make the file. but then we corrected by editing the env.mk file in config folder of MIT-JOS by adding location of qemu-system-i386 to the QEMU variable
ReplyDeletefor our system it was QEMU=/usr/bin/qemu-system-i386
TEAM MEMBERS:
ReplyDeleteNIKITA BANGA 16BCE0099
SUMEDHA P UPADHYAY 16BCE0518
Our project was related to fog computing. The tool we used was iFogsim. But, for complete installation for iFogsim we required Netbeans. Now, the problem we faced was that the simulation was not working with windows since they are not fully compatible. The windows got hanged and stopped working. When we used Ubuntu, it started working, simulation was dynamic and the graphs were easily woking as we needed them to.
Archit Jain
ReplyDelete16BCE2318
So, the project I am doing was related to software-defined wireless networking, and I was trying to learn the basic concept behind this. As for this, I have to install a emulator for this, some of the problems I was facing in this projects were:
1) Installation
As this is very less know software, so it was all new to install this, basically I was working on Mininet that is UNIX based, but I am having a Windows machine, so I have to try it on virtual box and install many things other than that like Putty for port forwarding. After that also there were many problems.
2) Graphical User Interface
It is very difficult to understand a coding language by other person who is not a developer, so for any demonstration I have to show them in any graphical manner, which was difficult as very less number of interface are present for this, so I have to search for them, and also I was not able to make my own, and the present one were really confusing.
3) Prerequisite Knowledge
As this was something new to me, so I have to study a lot about networking only, and then I have to study about the principle of the software. You have to read the manual, research paper, theoretical knowledge is also needed.
These were the problems I was facing.
Now, I will try to explain the solution for this.
So, when you are selecting any project or you are given any project, initially try to get the theoretical knowledge of it, as it is very important, try to search for research papers, it really help and tells that what research are going on.
Then try to find any manual for the software that you are using or just try to understand the previous work, that how they have done it, and if possible ask from someone who had done it before.
Installation is the thing which is the first step of you project, so it must be properly installed, if any file is missing, then you have to go and again do all the steps.
Always try for an Open-source software.
I think the problems I faced are very general and faced by many, so I just gave general instructions and not being specific.
our project topic is file management in xv6 we tried to add a syscall in xv6. we successfully added the syscall but it was not showing any output it was simply showing a blank output one more thing i would like to mention here is that no other syscall was working well in xv6 in most of the 'exec failed ' message was showing.
ReplyDeletewe had made necessary changes in the sysproc.c ,syscall.c,syscall.h,proc.c,useys.S,user.h files .
we tried to execute a simple c file also in xv6 by adding filename in the Makefile but ii always used to show error "no rule to make target filename"
Team Member:
ReplyDeleteArpit Saxena (16BCI0016)
Shaleen Kachhara (16BCI0055)
Mihir Singh (16BCB0002)
We have installed virtual box and mininet as a software in our project. Mininet creates virtual network and thereby help us to understand how a load is balanced on the server side. There are many load balancing algorithm which we have also covered in our project. Clients send request to the server and how server manages it is the real question so here we used mininet and C sharp programming language to show virtually how it works.
We created three programs, one for client side ,one for server side, one for load balancer side. We then with the help of mininet created three srevers which handle the request of calculating the value of pi accurately to 12 places after decimal within seconds.This was achieved using three servers. The biggest problem we faced was of implementing it as it was done using C sharp . So to compile it and run it we installed virtual studio also.Secondly creating a virtual network on mininet was also difficult.
We were also asked to study jbotsim(a library of java which simplify the problems such as creating,moving and deleting node) but since it requires a multiple network environment and it's really hard to do that in mininet that's why we were not able to implement it in our program.
This comment has been removed by the author.
ReplyDeleteYash Dwivedi
ReplyDelete16BCE0987
When attempting to run a virtual machine created in another VMware virtualization platform, such as VMware Workstation, the VM will fail to start and the message "Unsupported and/or invalid disk type" will appear. This error occurs because the virtual disk formats associated with the different virtualization platforms are incompatible with ESX/ESXi.
Running the following command from the server console will also convert the virtual disk to a format that ESX/ESXi can understand:
vmkfstools -i .vmdk .vmdk
Aditya Harsh
ReplyDelete16BCE0657
My project is based on Vagrant tool, which basically provides a working virtual machine environment in a single workflow. Vagrant lowers development environment setup time, increases production parity, and enables user to work on different commanding platforms at the same time without difficulty in configuration.
I had issues regarding command line and working of basic commands on my command prompt, thus I had to install cmder(commander) which has a different command line and works better with the vagrant tool.
while using Pintos timeout function you can get a common error
ReplyDeleteIn orderto compile the project from the src/threads/ directory, and the initial test pintos run alarm-multiple seems to work okay but if you run make check under src/threads/build, all tests get a timeout fault
To remove this problem:
Apparently, Your QEMU no longer supports the power off sequence on the port 0x8900. Here is a fix that made it work for me (found in chaOs): in the file devices/shutdown.c patch shutdown_power_off as follows:
void
shutdown_power_off (void)
{
// ...
printf ("Powering off...\n");
serial_flush ();
outw (0xB004, 0x2000); // <-- Add this line
// ...
}
16BCE0100
ReplyDeleteRishabh Vallecha
I had some problem with respect to Nachos calls. In nachos, exec and fork have different meanings than Unix calls. The Nachos Fork and Exec routines have completely different semantic from the Unix system calls.
Exec in Nachos creates a new address space, reads a binary program into it, and then creates a new thread via Thread:Fork to run it. In Unix separate fork and exec system calls are needed to achieve the same result.
Fork in Nachos creates a new thread of control executing in an existing address space.
When a Nachos program issues an Exec system call, the parent process is executing the code associated with the Exec call. The parent will need to invoke Thread::Fork to create the new thread that executes the child process.
Thus this confusion was what I came across and this was subsequently solved as we discovered more about Nachos in our project.
This comment has been removed by the author.
ReplyDeleteWe worked on installing pintos in out systems.
ReplyDeleteWe were able to successfully install it in our systems, there was an issue that all out make check commands were resulting in failures.
Then we found out that,
Apparently, QEMU no longer supports the power off sequence on the port 0x8900.
Hence ther was an fix that made it work for us;
In the file devices/shutdown.c patch shutdown_power_off as follows:
void
shutdown_power_off (void)
{
// ...
printf ("Powering off...\n");
serial_flush ();
outw (0xB004, 0x2000); // <-- Add this line
// ...
}
16BCE0091
ReplyDeleteSiddhant Chaudhary
The problem I faced was, that during the cygwin implementation of nachos, I could not execute the make command and c files.
Source of problem:
This was due to the absence of make and gcc libraries in the nachos bin
Solution: run the setup once again to update and when the option to select libraries, under devel ,select all files which have gcc, make or automake in their name,and install.
Note: if first you had used a 32 bit setup only use a 32 bit setup to update and same goes for the 64 bit setup.
16BCE0135 Saurav Panigrahi
ReplyDeleteOne issue which we faced during our project was how to implement multiprogramming in NachOS if it is designed foor single proogramming.
The solution to the above problem is:-
To create new process from another process, we need to invoke system calls.
SC_Exec is the system call to start a new user process.
SC_Exit is the system call to exit a user process.
Write codes for the system calls SC_Exec and SC_Exit assuming
monoprogramming. But we can’t even test these right in that form, because calling SC_Exec means creating a user process from a user process which ‐‐ by definition is multiprogramming.We add a typical memory management for multiprogramming so that several user process can reside in main memory – hence complete the multiprogramming part.
16BCE0944
ReplyDeleteAKSHAY ARORA
The error we were getting:
Prototype mismatch: sub main::SIGVTALRM () vs none at /usr/class/cs140/x86_64/bin/pintos line 934.
Constant subroutine SIGVTALRM redefined at /usr/class/cs140/x86_64/bin/pintos line 926.
squish-pty bochs -q
========================================================================
Bochs x86 Emulator 2.2.6
Build from CVS snapshot on January 29, 2006
========================================================================
00000000000i[ ] reading configuration from bochsrc.txt
00000000000e[ ] user_shortcut: old-style syntax detected
00000000000i[ ] installing nogui module as the Bochs GUI
00000000000i[ ] using log file bochsout.txt
PiLo hda1
Loading........
Kernel command line: run alarm-wait
Pintos booting with 4,096 kB RAM...
383 pages available in kernel pool.
383 pages available in user pool.
Calibrating timer... 204,600 loops/s.
Boot complete.
Executing 'alarm-wait':
Kernel PANIC at ../../tests/threads/tests.c:60 in run_test(): no test named "alarm-wait"
Call stack: 0xc0027ae5 0xc00296f3 0xc00201a4 0xc00206e3.
--------------------------------------------
Solution:
We replaced the [] with '^v'.
This solved our error.
We added
int64_t sleep_ticks; /* time to sleep in ticks */
to the thread.h file to make the code work.
/* Timer interrupt handler. */
ReplyDeletestatic void
timer_interrupt (struct intr_frame *args UNUSED)
{
ticks++;
thread_tick ();
// Check each thread with wake_threads () after each tick. It is assumed that
// interrupts are disabled because timer_interrupt () is an interrupt handler.
thread_foreach (wake_threads, 0);
}
Solution :
we have to define that wake_threads () in our timer.c. It basically a function to
check whether a thread has to wake up or not.
16BCE0737 Sneha Chakrabarty
ReplyDeleteProblem: To Initialize a multicore system's cores, we send INIT IPI and INIT SIPI signals via LAPIC of BSP to other APs and make them execute vector code which initializes and makes them usable. At a given time, only a single AP can execute the vector code, while other APs wait until the previous AP has done execution - Semaphore usage. This Serial execution and bootup is very slow, We need some way to parallelize it.
Solution: If we could make multiple copies of the vector code, one for each AP, all the APs could boot up in parallel. Copying a function code on runtime isnt easy and straightforward due to linkage issues. For that issue, we can create a binary 'template' code on compile time and can then copy the vector on runtime onto another memory location, and then replace all external memory references accordingly. The code may use temporary memory locations and variables which need to be allocated seperately along the code. Therefore in the template, we introduce certain magic numbers which we raplace in the copied code by memory addresses of various things. This way each code can be executed independently from another.
Example AP Bootup TEMPLATE Code:
AP_startup_Code:
cli
xor ax, ax
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax
xor esp, esp
mov sp, 0x4284 ; magic number, replaced by address of stack
xor eax, eax
mov edx, 0x10
mov cr0, edx
mov si, 0x3240
lgdt [ds:si]
mov si, 0x3250
lidt [ds:si]
mov eax, cr0 ; set bit 0 in cr0--enter pmode
or eax, 1
mov cr0, eax
mov ax, 0x10 ; 0x10 is the offset in the GDT to our data segment
mov ds, ax ; Load all data segment selectors
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax
BITS 32
mov eax, 1
mov bx, 0x1000
add dword [ds:bx], 0x1
jmp 0x08:0x00001000
hlt
Numbers like 0x4284, 0x3240, 0x3250 are place holders, which gets replaced later by memory addresses of new stack, lgdt table, lidt table respectively. Thus we can speed up the process.
We apply the same thing on schedulers, thus making it possible for each core to have it's own scheduler such that true parallel computing can be achevied.
Sambarta Mukherjee
ReplyDelete16BEC0355
The problem faced by us was that while installing the gcc compiler in Fedora OS, after giving the command
yum install gcc,
we were receiving the error,
file /usr/lib/audit from install of glibc-2.16-31.fc18.i686 conflicts with file from package audit-2.2.1-2.fc18.i686
In order to overcome that, we have to give the command 'yum update audit' prior to installing gcc compiler in Fedora.
Anubhav Gupta - 16BCE2297
ReplyDeleteTeam members:
Ayush Maria - 16BCE0400
K c Kowshik Kumar - 16BCE2238
Issues that we faced and the situation we had to go through during the installation, that we had to set the path variable properly and to make sure that the packages of Cygwin were also be installed which is necessary. Also we had to install mips cross compiler which is hardly available over the internet. Then we had problems with coding in java as we didn’t know java programming for now.
For producer consumer there are hardly any help available online,
while there were no walk through available which would help us understand the procedures. Also while doing project 1 of nachos we had to struggle with the threads because we didn't have a clear idea of what was to be modified, which leads us to an intense discussion in our group and to reach towards the conclusion, finally after researching again and going through the problems we subsequently solved the problems.
suraj Rath 16BCE0111
ReplyDeleteTeam Members:
Pratiksha Sharma 16BCE0534
Issues that we faced during installation of pintos that it was showing a error message when we run pintos command i.e pintos run alarm-multiple that :
use of literal control characters in variable name is deprecated at .pintos line 911.
prototype mismatch: sub main::SIGVTALRM () vs none at ./pintos line 933
constant Subroutine SIGVTALRM redefined at ./pintos line 927.
cannot find kernel.
Pratiksha Sharma 16BCE0534
ReplyDeleteTeam Members:
Suraj Rath 16BCE0111
Issues that we faced during installation of pintos that it was showing a error message when we run pintos command i.e pintos run alarm-multiple that :
use of literal control characters in variable name is deprecated at .pintos line 911.
prototype mismatch: sub main::SIGVTALRM () vs none at ./pintos line 933
constant Subroutine SIGVTALRM redefined at ./pintos line 927.
cannot find kernel.
Problem 1- While running pintos run alarm-multiple you get some SIGVTALRM, Constant routine and prototype mismatch error.
ReplyDeleteSolution - Turns out to solve this you just need to go to the pintos file in src/utils/ and then comment out the whole SIGVTALRM function. It was at line 925 in my case but you can always use Ctrl+F.
https://stackoverflow.com/questions/38989352/pintos-installation-sigvtalrm-redefined-error
Problem 2- While running pintos run alarm-multiple you get Cannot find Kernel error.
Solution - You must've used "$HOME/os-pg/pintos/src" in the pintos and Pintos.pm file. Thing is Perl can't understand the "$" or "~" so, you need to write the absolute path.
To find the absolute path, just open up the terminal and type 'echo $HOME'. The output should be something like this
Now open up the pintos file in src/utils and then replace the $HOME here
By whatever your absolute directory is, like this.
Do the same in Pintos.pm file.
Save the files and restart the terminal. It should be working now