Showing interest / Applying for Phd position that has just opened, before finishing Master studies Currently I am working towards Master in Computer Science degree, hoping to be done by the end of the year.
Last month a new professor moved to our University and now there are open Phd positions in his research group. I decided to work on a Master thesis provided by this group, however before starting to work on the master thesis I want to finish my exams. Additionally, I am interested for the Phd positions as I like the area of research, but I believe that it is highly unlikely that the Phd positions will remain open until I am done with the thesis. Having in mind that I have the exams to finish first, it will be ca. 6-7 months from now until I am completely done. And I believe the positions will be filled by then.

I don't know how to proceed now. I think the best asset I have in hand at the moment is the fact that I am going to work my master thesis in the group of this new professor. But other than that, there are some downsides because he does not know me as a student as he just moved to our university. Also, I don't have any publications to impress him, and my grades got slightly worse lately. 

What is the best thing to do now? There are multiple options:

1) Leave the exams aside; Start working on the thesis, after starting to work on the thesis express interest in the Phd position. Ensure that the work of the thesis is high quality so the Professor is impressed.

2) Express interest in the Phd position from now. Finish the exams, and then start working on the thesis. During the process improve the grades to impress the Professor.

The dilemma here is, if I wait long to finish everything, by then the places might be gone. On the other side, if I act as soon as possible, I think as if I don't have much in hand to impress the professor.

Please consider this question having in my the context of my exact situation and then from a general view point evaluate on what could happen in the typical case.

I am sure, here we have more experienced Professors and Graduate student that could provide insightful information and suggestions.

EDIT 1: Additionally, what is the typical time frame needed for a Phd position to be filled, I believe 6 months is more than enough, or?

EDIT 2: What if there is an application deadline? And the deadline is at least 6 months away before you get the Master degree? Is it worth applying? I believe no Professor would wait for a student to get his degree for 6 months and then give him a position? My basic instinct says "go for it" there is nothing you would loose at least you are not going to regret that you didn't do it, however when thinking rationally all the odds seem against

Thanks!
If you are currently working on a master's thesis in the group of the professor with whom you'd like to a do a PhD, the best thing to do is set up an appointment and talk to him.

As an advisor, I don't need to have a published paper to see whether someone in my own group is a competent researcher or not. I can see this by interacting with the person, through reading their project updates and emails, and by talking with other the more senior members of the research group (who sometimes will work with the students more closely than I can). 

Given that the goal of an advisor is to select people they believe will become excellent researchers rather than simply the "top students," someone who is an "internal" candidate is often a better option than taking a chance on someone whose work the faculty member hasn't been able to observe directly.

[That said, however, I think there is also something to be said for considering going somewhere else for a PhD than the place where you did your bachelor's and master's degrees, when it makes sense to do so.]